Re: [PHP] Streaming audio

2002-11-27 Thread olinux
Not PHP, but here's a solution I use for streaming WMA
files on apache server. 

You'll need 3 files
audiofile.htm
audiofile.wax
audiofile.wma

 
[audiofile.htm]

Audio Player




  http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701";
standby="Loading Microsoft Windows Media Player
components..." type="application/x-oleobject"> 
http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/";
filename="/audio/audiofile.wax"
src="/audio/audiofile.wax" Name=NSPlay ShowControls=1
ShowDisplay=1 ShowStatusBar=1 width=290 height=320>
 





[audiofile.wax]







And audiofile.wma is of course your windows media
audio file.

olinux


> At 12:55 PM 11/27/2002 -0800, Mako Shark wrote:
> >Does anyone know how to do streaming audio with
> PHP?
> >No clue if this is even possible. I've checked
> around
> >a bit, looked at some script sites, but nothing
> seems
> >to give a clue. I *think* it might be possible to
> set
> >something like this up, but I'm not sure.
> >
> >__
> >Do you Yahoo!?
> >Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> >http://mailplus.yahoo.com
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Streaming audio

2002-11-27 Thread Morgan Hughes
On Wed, 27 Nov 2002, Tom Culpepper wrote:

  I had no idea this would be of interest to so many people...  I've
  now posted it on a server for download; it's at
http://kyhm.com/tmp/mp3-example.php.gz
  for anyone who's interested.

  There's a bunch of commented-out calls to a dprint() in the script; this
  is a function I use for syslog-based debugging.  Obviously you can't
  print debugging output to a MPEG stream!  A replacement could be cobbled
  together that looks something like this:

$dprint_file = '';
function dprint ($msg)
{
  global $dprint_file;
  if (!$dprint_file)
$dprint_file = fopen("/tmp/mp3.log", "a");
  fprintf ($dprint_file, "%s", $msg);
}

  Good luck, and if anyone makes something useful out of this, I'd like to
  hear about it!

-- 
   Morgan Hughes
   C programmer and highly caffeinated mammal.
   [EMAIL PROTECTED]
   ICQ: 79293356







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Streaming audio

2002-11-27 Thread Morgan Hughes
On Wed, 27 Nov 2002, Mako Shark wrote:

> Does anyone know how to do streaming audio with PHP?
> No clue if this is even possible. I've checked around
> a bit, looked at some script sites, but nothing seems
> to give a clue. I *think* it might be possible to set
> something like this up, but I'm not sure.

  Streaming how?  I've got a PHP script that plays MP3 files off the disk
  through an HTTP stream, that might be useful for you to start with.  I
  wrote so I could figure which MP3s were being played regularily, versus
  ones that could be deleted.  You could probably extend it by reading
  from some FIFO on your server, that another process was writing the MP3
  stream into, though you'd lose the ability to seek in it...  Mail me
  direct if you're interested.

  It includes the shoutcast metadata for updating the stream title as it
  goes, however it appears winamp ignores this data unless the response
  from the server is "ICY/1.0 200 OK" rather than the "HTTP 200 OK"...  As
  far as I can tell after checking the SAPI source and asking here, it's
  not possible to override that.

-- 
   Morgan Hughes
   C programmer and highly caffeinated mammal.
   [EMAIL PROTECTED]
   ICQ: 79293356




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Streaming audio

2002-11-27 Thread Ernest E Vogelsinger
At 21:55 27.11.2002, Mako Shark said:
[snip]
>Does anyone know how to do streaming audio with PHP?
>No clue if this is even possible. I've checked around
>a bit, looked at some script sites, but nothing seems
>to give a clue. I *think* it might be possible to set
>something like this up, but I'm not sure.
[snip] 

Actually PHP doesn't stream; that's done by streaming server software, like
RealServer, WindowsMedia, or else.

What has PHP to do with it? Some possibilities:

(a) Stream embedded in website:
Since PHP constructs the page, it generates the tag to embed the media
player (WindowsMedia, RealMedia, QuickTime). The "source" entity of the tah
pointing to the actual stream might come from the database.

(b) Stream outside the website:
Similar to (a), PHP could create the link to the stream, link data coming
from the database.

(b) Dynamic/Redirected content:
Esp. with WindowsMedia, as with RealMedia, web servers may serve meta-files
containing data that directs the player to a certain stream. These meta
files come as a specific MIME type, and they can be created on the fly
(dynamically) by PHP.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Streaming audio

2002-11-27 Thread Miles Thompson
This may seem terribly naive, but what server streams the audio, Apache 
with an additional module? Or a special audio server?

If the former, it would seem quite straightforward I would assume (which is 
how I get myself into trouble and have such *interesting* assignments), 
Apache would issue the file, using appropriate headers.

For the second, why not do a redirect to the audio server, passing the 
necessary parameters?

Not knowing the first thing about how this works, why not?

Miles Thompson

At 12:55 PM 11/27/2002 -0800, Mako Shark wrote:
Does anyone know how to do streaming audio with PHP?
No clue if this is even possible. I've checked around
a bit, looked at some script sites, but nothing seems
to give a clue. I *think* it might be possible to set
something like this up, but I'm not sure.

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php