Dashboard > Streaming and Networking > Home > Red5 and NetStream
Red5 and NetStream
Added by Thijs Triemstra, last edited by Thijs Triemstra on Feb 07, 2008  (view change) show comment
Labels: 


Below is a comparison of the NetStream information objects (supported by the Flash Player 6 and up) sent by Red5 vs. Flash Media Server.

Tested with:

Flash Media Server 2.0.3 on Ubuntu 6.1, this application and Red5:

NetStream information objects

- couldn't reproduce or didn't test this yet
- tested and works
- doesn't work as expected
- doesn't work at all

The following messages notify you when certain NetStream activities occur:

Code property Level property Meaning FMS Red5 Comments
NetStream.InvalidArg Error Invalid arguments were passed to a NetStream method, for example ns.seek("asdasdas"). Fixed in r1716
NetStream.Buffer.Empty Status Data is not being received quickly enough to fill the buffer. Data flow is interrupted until the buffer refills, at which time a NetStream.Buffer.Full message is sent and the stream begins playing again.  
NetStream.Buffer.Full Status The buffer is full and the stream begins playing.  
NetStream.Buffer.Flush Status Data has finished streaming, and the remaining buffer will be emptied.  
NetStream.Failed Error An error has occurred for a reason other than those listed elsewhere in this table, such as the subscriber trying to use the seek command to move to a particular location in the recorded stream, but with invalid parameters. Fixed in r1768
NetStream.Pause.Notify Status The subscriber has paused playback. Fixed in r2075
NetStream.Play.Complete Status Playback has completed. Fixed in r1808
NetStream.Play.Failed Error An error has occurred in playback for a reason other than those listed elsewhere in this table, such as the subscriber not having read access. Fixed in r1760
NetStream.Play.InsufficientBW Warning Data is playing behind the normal speed. Fixed in r1914
NetStream.Play.PublishNotify Status Publishing has begun; this message is sent to all subscribers.  
NetStream.Play.Reset Status The playlist has reset (pending play commands have been flushed). Fixed in r1751
NetStream.Play.Start Status Playback has started. Fixed in r1751
NetStream.Play.Stop Status Playback has stopped.  
NetStream.Play.StreamNotFound Error The client tried to play a live or recorded stream that does not exist. The FLV passed to the play() method can't be found.  
NetStream.Play.Switch Status The subscriber is switching from one stream to another in a playlist. Fixed in r1808
NetStream.Play.UnpublishNotify Status Publishing has stopped; this message is sent to all subscribers.  
NetStream.Play.FileStructureInvalid Status This event is sent if the player detects an MP4 with an invalid file structure.  
NetStream.Play.NoSupportedTrackFound Status This event is sent if the player does not detect any supported tracks. If there aren't any supported video, audio or data tracks found, Flash Player does not play the file.  
NetStream.Publish.BadName Error The client tried to publish a stream that is already being published by someone else. Fixed in r1547
NetStream.Publish.Idle Status The publisher of the stream has been idling for too long. Check APPSERVER-83 for more info.
NetStream.Publish.Start Status Publishing has started.  
NetStream.Record.Failed Error An error has occurred in recording for a reason other than those listed elsewhere in this table; for example, the disk is full. Fixed in r1928
NetStream.Record.NoAccess Error The client tried to record a stream that is still playing, or the client tried to record (overwrite) a stream that already exists on the server with read-only status. Fixed in r1719
NetStream.Record.Start Status Recording has started. Fixed in r1546
NetStream.Record.Stop Status Recording has stopped. Fixed in r1546
NetStream.Seek.Failed Error The subscriber tried to use the seek command to move to a particular location in the recorded stream, but failed, which happens if the stream is not seekable. Fixed in r1768
NetStream.Seek.Notify Status The subscriber has used the seek command to move to a particular location in the recorded stream. Fixed in r1783
NetStream.Unpause.Notify Status The subscriber has resumed playback. Fixed in r2075
NetStream.Unpublish.Success Status Publishing has stopped.  

If you update to the latest trunk (r1636), the following events should work as expected:

  • NetStream.Publish.BadName
  • NetStream.Record.Start
  • NetStream.Record.Stop
    Additionally, it would be cool to have an explanation what is the desired behaviour for the failing tests - not everybody has a FMS ready to compare
Posted by Joachim Bauch at Jan 19, 2007 00:10 | Permalink

"NetStream.InvalidArg" (r1716) and "NetStream.Record.NoAccess" (r1719)are both working on the trunk now.

Posted by Joachim Bauch at Feb 11, 2007 22:08 | Permalink

Only one event notification to go! Great job Joachim!

Posted by Thijs Triemstra at Apr 26, 2007 22:16 | Permalink

Thanks "NetStream.Publish.Idle" should be easy to implement as well, but I don't know exactly what to send to the client and when... Google shows only 8 results for the event name from which 2 are linked to Red5 pages.

Posted by Joachim Bauch at Apr 27, 2007 08:37 | Permalink

Yeah, I made a post on the FMS mailinglist a few days ago asking if anyone knows how to trigger NetStream.Publish.Idle but didn't get a reply (yet).. I personally never saw this one.

Posted by Thijs Triemstra at Apr 28, 2007 17:54 | Permalink
Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators