page content

How can I set up streaming files in my directory ?

The Web server has built-in HTTP streaming capability for multimedia files. Different types of media require different setups on the server.

Many media types (Real Audio/Video, MP3, Windows Media) require a separate file, called a metafile, to tell the server "send this as streaming media, don't just start a download." Metafiles are sometimes also called playlists.

Media and metafiles have to be put into the public/ folder of your site. The Media file is the file you want to stream, the metafile is just a simple text file. Macintosh users should be aware to save it with Unix linefeeds. This can be done with the BBEdit utility: save as: options: Unix linefeeds.

MPEG video files (.mpg, .mpeg, .mpa) stream themselves by default, without the need for a metafile. This doesn't give you the ability to set up playlists, however. There's a new metafile spec (.mxu) for MPEG video playlists; it's not very widely supported, but you can give it a try if you like. Syntax is the same as for .m3u audio metafiles.

RAM File (Realmedia streaming format) :

Name of metafile to create: example.ram

Content of metafile: http://www.my_site.org/example.rm

The link in your refering HTML file: <A HREF="example.ram">Streaming Sample</A>

To make multiple-clip playlists, just put the links to your files on separate lines in the RAM file.

MP3 Playlists, M3U Metafile :

Name of metafile to create: example.m3u

Content of metafile: http://www.my_site.org/example.mp3

The link in your refering HTML file: <A HREF="example.m3u">Streaming Sample</A>

For multi-song playlists, just put one link address on each line of the M3U file.

MP3 PLS (WinAmp style) metafile :

Name of metafile to create: example.pls

Content of metafile:

[Playlist]

NumberOfEntries=1

File1=http://www.my_site.org/example.mp3

Title1=Chanson d'Amour

Length1=21

Version=2

The link in your refering HTML file: <A HREF="example.pls">Streaming Sample</A>

Remark concerning the PLS format:

The pls format is highly proprietary and is only recognized by Winamp and few other players. Specifically, Windows Media Player does not support it, and MusicMatch Jukebox only plays the first song on the list. If you want to ensure that your playlist reaches the widest possible audience, an m3u metafile is the way to go. While the PLS format has extra features like "Title", you can adjust these properties in the MP3 file's tag anyway.

Windows Media Metafiles (ASX, WAX, WVX) :

Name of metafile to create: example.wax

Content of metafile:

<ASX version = "3.0">

<Entry>

<ref HREF="http://www.my_site.org/example.wma">

</Entry>

</ASX>

The link in your refering HTML file: <A HREF="example.wax">Streaming Sample</A>