Producing Participatory Media
Week 6 - February 24

Class Stream


  • Flash Streaming
  • SMIL Layout and simple interactivity
  • MP3 Audio Streaming

  • Streaming with Flash
    Flash follows it's own rules and doesn't abide by many of the standards we have talked about. In some cases this is good, in others not so great. It is good that it is very easy to get going but doesn't offer some of the delivery flexibility offered by more standard based streaming systems (such as streaming to consumer electronics devices like set-top-boxes or mobile phones). It also is easy to do server side programming with but that is a topic for another day.

    Here are the steps to follow to quickly start streaming with Flash:
  • Get an account on a Flash Communication Server (ask Nancy)
  • Create a folder in your account and take note of the name. I used "stream"
  • Use a Flash based encoder such as: this one to broadcast.
  • Use a Flash based player such as: this one to receive.

  • The player is a slightly modified version of our previous Flash video player.
    Download the Flash Project for the Player

    The broadcaster is from the below article:

    Further Reference:
    Building a Broadcaster and a Receiver in Flash (with the Flash Communication Server)

    SMIL - Synchronized Multimedia Integration Language
    SMIL is an XML based markup language for creating streaming presentations that integrate several elements such as a slide show with audio or two simultaneous videos. It offers some fairly powerful layout capabilities as well as synchronization and other time based elements. SMIL is a standard endorsed by the W3C and exists in a variety of players including both QuickTime and Real (with some support in Flash and Windows Media).

    The Basics
    Below is a the basic structure of a SMIL file.
      layout tags -->
                <!-- body tags 

    SMIL single tags always end with a "/" like XML (which is what SMIL is).

    Example File

    Example File

    Example File

    Images, Audio and Video
    <audio ...> <video ...>
    Example File
    Another Example

    SMIL 2.0
    Namespaces, Enhanced Functionality, Profiles

    QuickTime Example:
    <smil xmlns:qt="" qt:autoplay="true">
    <!-- XML Namespace --> <!-- QT SML Extension: autoplay -->
    <root-layout width="600" height="240" background-color="black" />
    <region id="video_region" left="0" top="0" width="320" height="240" z-index="1" />
    <region id="image_region" left="300" top="0" width="300" height="240" z-index="2" />
    <img src="" alt="An Image" region="image_region" dur="10s" />
    <img src="" alt="Another Image" region="image_region" dur="10s" />
    <video src="" region="video_region" dur="20s">
    <anchor show="new" href="" /> <!-- Shows in the Browser -->
    This Example

    Real Namespace Specifications:

    <smil xmlns=""

    Saving as a QT Movie
    The first eight characters of the file must be "SMILtext" in order for QuickTime to treat it as a movie file. You can simply change the extension from SMIL to MOV and you should be all set.
    Previous to name change
    Following name change

    QT Text Tracks
    While you can include plain text in QT SMIL presentations you can't do much about how that text looks. In order to have more control over how and when the text is displayed you should use a QuickTime Text Track.

    The easiest way to create a QT Text file is to create a plain text document in your favorite text editor and then to import it into QuickTime Pro. You then export it using the Export command and choosing "Text to Text". At this point you can edit the descriptors to change the font, color, timing and more. See below for a link to Apple's list of descriptors.

    Here is the content of a text file that I created:
    Hi My Name is Shawn
    This Class is called Producing Participatory Media
    It is a **FUN** class!!! ;-)
    Download this example

    Following exporting it it became:
    {QTtext}{font:Geneva}{plain}{size:12}{textColor: 65535, 65535, 65535}{backColor: 0, 0, 0}{justify:center}{timeScale:600}{width:160}{height:48}{timeStamps:absolute}{language:0}{textEncoding:0}
    {textBox: 0, 0, 50, 160}Hi My Name is Shawn
    {textBox: 0, 0, 50, 160}This Class is called Producing Participatory Media
    {textBox: 0, 0, 50, 160}It is a **FUN** class!!! ;-)
    Download this example

    Of course, you don't need to use QT Pro to create a file such as this, you can simply follow the same format and create this file in any text editor.
    Here is the modified version that I created:
    {QTtext}{font:New York}{Bold}{size:14}{textColor: 0, 65535, 65535}{backColor: 0, 65535, 0}{justify:center}{timeScale:600}{width:300}{height:120}{timeStamps:absolute}{language:0}{textEncoding:0}[00:00:00.000]{textBox: 0, 0, 50, 160}Hi My Name is Shawn[00:00:01.000]
    {textBox: 0, 0, 50, 160}This Class is called Producing Participatory Media
    {textBox: 0, 0, 50, 160}It is a **FUN** class!!! ;-)

    Download this example

    Putting it all together

    As illustrated in the above diagram, SMIL which contains pointers to media (audio, video, text, images) should be uploaded to your webserver along with your images and video and further more can be embedded just like a QuickTime movie or a RealMedia document into a webpage. You use the same embedded player HTML code as described above for putting a movie in your page. Instead of creating a link directly to a movie (possibly using a QTML file) you create a link to your SMIL document (also possibly using a QTML file for compatibility purposes).

    For more information:
    SMIL 1.0 Spec
    QT Text Track Descriptors
    QuickTime and SMIL (in depth)
    QuickTime Text Tracks Tutorial
    SMIL Authoring (notes from a course at Michigan State, very good)
    SMIL: Multimedia for the Masses
    Layouts in SMIL
    s o u n d s c r e e n Great information concerning many aspects of QuickTime delivery

    MP3 Audio Streaming

    MP3 Streaming has become the defacto method for streaming music on the internet. While QuickTime, Real and Windows Media offer a plethora of features and capabilities, they generally have a higher cost (related to servers, encoding software and so on) and therefore a higher barrier of entry. They also generally only work with their particular players and content types. Although their is a plethora of content available in each of the formats and broadcasting organizations will generally go with one of them because of their DRM (Digital Rights Management) support, the sheer volume of people utilizing MP3 streaming eclipses them all. MP3 streaming support is built into almost every desktop multimedia player as well. Last but not least, MP3 streaming utilizes HTTP and therefore is able to get through firewalls quite a bit easier than the other streaming methods.

    MP3 Stream Players:

    and a hundred others including:
    Zinf: (formerly known as FreeAmp)

    Some MP3 Streaming Servers and Services:
    Live 365: (A service for people to run their own streaming radio stations)
    Shoutcast: (The original MP3 streaming solution, made by the folks who created WinAMP)
    Icecast: (Originally, an Open Source clone of Shoutcast, now much more)
    QuickTime/Darwin Streaming Server: or
    Of course there are about a hundred other servers and systems that support this as well.

    QuickTime Streaming Server (For MacOS X)
    Darwin Streaming Server (For Windows, Linux and more)

    QTSS Admin Guide:
    Darwin Streaming Server Administrator's Guide:

    QuickTime/Darwin Streaming Server has very good support for MP3 Streaming, specifically in the form of playlist broadcasting. The server side playlist can simulate a live broadcast with a queue of MP3 files that are played and streamed out to the audience via the server.

    The administrative interface to the server: http://your-ip-address:1220/ offers a web based interface for creating and managing these playlists.

    This is the mount point for a playlist that I setup for demonstration:

    Of course, you can also do it via the command line as well if you install your own QT Streaming Server (I can provide one at ITP should you need it). This would allow you to dynamically generate playlists of your own content.

    [Command Line Instructions Coming Soon]

    Creating Links to MP3 streams: [Shamelessly borrowed from the Darwin Streaming Server Administrator's Guide]

    If you want to put an MP3 playlist on the web, you need to create an audio metafile that directs the web browser to your playlist and opens the user’s MP3 player. There are two types of audio metafile you can use: M3U and PLS. To create the audio metafile, use a text editor to create the file, include the proper extension (“.m3u” for M3U metafiles and “.pls” for PLS metafiles) at the end of the filename, and format it as described here.

    The M3U file contains a single line of text in this format: http://your.ip.addr:8000/mountpoint

    A PLS file uses this format:
    Title1=Playlist Title

    Place the .m3u or .pls file in the same directory as your web site and link to it just as you would link any other downloadable file. Most web browsers are configured to open .m3u and .pls files using the user’s MP3 player automatically.
    The M3U file for the ppm_playlist contains the following line:

    The file is uploaded to a webserver:

    Here is the content of an example PLS file:
    [Another Playlist]
    Title1=Some Title
    Title2=Another Title

    Here is the file uplaoded to stage: