Skip to main content
Participant
July 7, 2006
Question

SMIL based variable bandwidth playlists for streaming flash video from Flash Media Server 2

  • July 7, 2006
  • 3 replies
  • 354 views
I've spent most of the last couple of days crawling through the PDFs for client and server side AS, along with the technotes and samples, attempting to get a clear understanding of how to get SMIL XML based dynamic bandwidth streaming from FMS2. I've been able to code from scratch a nice NetStream based solution, but really want to use the dynamic bandwidth management and loose coupling of the SMIL based solution. Currently I've got the following setup:

Windows 2003 Server
IIS 6
serving a swf containg the following button which dynamically loads the smil file from the same directory as the swf:
on( click ){
import mx.video.*;
_root.vid_ctrl.contentPath = " http://localhost/flashVid/streams.xml";
trace( "contentPath: "+ _root.vid_ctrl.contentPath );
var listenerObject:Object = new Object();
listenerObject.metadataReceived = function(eventObject:Object):Void {
_root.vid_ctrl.setSize(vid_ctrl.preferredWidth, vid_ctrl.preferredHeight);
_root.vid_ctrl.seek(4);
trace( "contentPath after metadata: "+ _root.vid_ctrl.contentPath );
}
_root.vid_ctrl.addEventListener("metadataReceived", listenerObject);
}
[from livedocs article: http://livedocs.macromedia.com/flash/8/main/00003539.html

This is the content of the XML SMIL file:
<smil>
<head>
<meta base="rtmp://localhost/bls_videos/_definst_" />
<layout>
<root-layout width="320" height="256" />
</layout>
</head>
<body>
<switch>
<video src="Bag-mask 1 resc (512)" system-bitrate="512000" />
<video src="Bag-mask 2 resc (512)" system-bitrate="128000" />
</switch>
</body>
</smil>

I can see in my server log for the bls_videos app that a connection is being made, but no streams are showing on the streams tab, and no response on the client. The following is logged on server when the connection is made:
welcome[object Client]
Error : command msg sent before client connection has been accepted.
Error : command msg sent before client connection has been accepted.

The Welcome is a trace line I put into the main.asc to ensure it was getting called. Not sure what the error is about.

Any more detailed information on using the SMIL XML files for streaming - particularly a fully worked end to end example, would be useful.After trawling through the various online and offline docs on this subject there is very little to guide anyone.

thanks
Nick
    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    July 8, 2006
    Perhaps you might consider doing a little reading up on general forum etiquette. It's really rude to flood the board with duplicates of the same post.
    Participant
    July 9, 2006
    Was going to cross reference the posts with a shorter response which would have been much cleaner. Is the first time I've posted here and wasn't sure how the threads are monitored - some of the threads were old and unresolved, hence I was attempting to make sure I didn't slip through the cracks. I can now see that the most recent responses are topmost, so they won't be overlooked. Apologies for the multiple posts.

    Any thoughts on the issues I'm having? It seems the SMIL is very badly supported in the docs, with many people struggling to get it working. I went to a local technical bookstore yesterday and scoured all the main titles. None had much to say beyond the API definitions of contentpath and some brief examples of the SMIL XML syntax. The quest continues..

    sorry
    Nick
    July 9, 2006
    I don't work with any of the prefab components (I prefer to roll my own), but my understanding is that the recent update to the media playback compoenents addresses many of the performance issues of the last version (including some smil issues).

    http://www.adobe.com/support/flash/downloads.html#flash8