Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Streaming Video? (FLV or Otherwise)

by jdrago999 (Pilgrim)
on Sep 28, 2011 at 06:48 UTC ( [id://928240]=perlquestion: print w/replies, xml ) Need Help??

jdrago999 has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed Monks,

I want to stream video (as in, a video player requests video starting at a specific time (eg: 300 milliseconds), and my program starts up a stream of that video beginning at the requested time).

In the past I have gotten by with Apache and the excellent FLV::Cut or even ffmpeg. However they aren't really *streaming* solutions in that they both just pop out an FLV file beginning at the specified point-in-time within the video.

The honorable Daisuke Murase released Kamaitachi (a Perl Flash Media Server) a couple years ago. I have used it in several projects, but it also does not provide video streaming from static files.

I would expect a nonblocking, streaming server like Twiggy could handle the job if only I could connect the dots. Has anyone else out there done this?

Replies are listed 'Best First'.
Re: Streaming Video? (FLV or Otherwise)
by Anonymous Monk on Sep 28, 2011 at 07:41 UTC

    Hi, Twiggy is irrelevant to your question :)

    What you need to create is the opposite of Kamaitachi::Service::Recorder/ Service::LiveStreamingRecorder

    What you need is a Kamaitachi::Service::Streaming subclass that returns bits and pieces of .flv files (cut up using FLV::Cut )

    It appears straightforward, but given the strength of docs, you might have to learn more about RTMP

    However they aren't really *streaming* solutions in that they both just pop out an FLV file beginning at the specified point-in-time within the video.

    Sorry to tell you, but that is streaming :)

    It may not be RTMP, but it is streaming

    Its like going to the bathroom to make deposits, sometimes you're streaming, sometimes you're dumping, but its always downloading :)

    My point is this, it helps to use the correct vocabulary, helps you get answers or ask the right questions

      Sorry to tell you, but that is streaming :)

      The more I think about it, my idea of "streaming" involves allowing 10,000+ people to "stream" videos from the same server at the same time (everyone watching different videos). I'm pretty sure you can't do this with a normal http server like Apache, because you'd run out of available connections.

      My nod toward Twiggy reflects the idea that video would be streamed to all clients in chunks, depending on "where" each client is in their stream.

      I know that you have set limits on the number of open filehandles and whatnot, but that's another problem which may have its own solution.

Re: Streaming Video? (FLV or Otherwise)
by zentara (Archbishop) on Sep 28, 2011 at 16:19 UTC
    or even ffmpeg. However they aren't really *streaming* solutions in that they both just pop out an FLV file beginning at the specified point-in-time within the video.

    Hi, this is only from reading some docs, but gstreamer has a ffmpeg plugin, see gst-ffmpeg .

    I can't tell your how to setup the code, but some gst tutorial code shows:

    In Python, you can do something like this:
    
    buffer = gst.Buffer(data)
    buffer.timestamp = gst.SECOND * 10 # start at the 10th second
    buffer.duration = gst.SECOND * 3 # three seconds duration
    
    I'm sure with some digging you can find how to do it in Perl.

    See Gstreamer. The module author is very active on the gtk-perl maillist


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://928240]
Approved by Corion
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found