[Red5] playing back a live "flv"

Art Clarke aclarke at vlideshow.com
Fri Mar 7 11:11:05 PST 2008


Dear Gods of the Red5 Lore:

(Hopefully supplication works.)  I'm trying to do another odd thing (shame
on me).  I have a process running on my Linux box that is happily creating a
new FLV file based on a streaming source running on my Linux box.  That file
is in FLV format, but is being written to a named-pipe.

Separately I have a Java class that can read from this pipe on a thread, and
can return a ITagReader object that parses the file into Red5 Tags.

Now, what I want to do is create a new live stream on the server that uses
this file as though it were a live broadcast (like a NetStream.publish()
call from a Flash client). Put another way, each new subscriber to this
"stream" should pick up whereever all other subscribers are currently
viewing, not at the start of the file which is what the VODProvider does
right now.

And, I'm increasingly getting frustrated at my inability to figure out how
to do this.

I'd like folks advice on whether I'm approaching this the correct Red5 way.
What I think I need to do is:

0) Fire up a new thread to service my class that reads from the pipe (what's
the recommended way to set up a worker in Red5?)
1) Create a ClientBroadcastStream in my application adapter representing the
broadcast I'm going to do.
2) Find the ProviderService and register said ClientBroadcastStream
3) Call start() on the ClientBroadcastStream so as to send any appropriate
messages to folks who subscribe.
4) Pass the ClientBroadcastStream into my pipe-servicing thread, and as my
tag reader reads new tags, create RTMP messages for each audio, video and
meta tag, and then use ClientBroadcastStream.pushMessage() to send them to
any subscribers.

Is my approach sound?  Thoughts?  Advice?

- Art
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20080307/55f5cb08/attachment.html 


More information about the Red5 mailing list