Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

How to connect to video driver?

by idle (Friar)
on Jan 10, 2006 at 14:22 UTC ( [id://522180]=perlquestion: print w/replies, xml ) Need Help??

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

Greetings. Is there any way to connect my script to video driver(Bt848) and show live video in browser thru flash. Thanks in advance.

Replies are listed 'Best First'.
Re: How to connect to video driver?
by mitd (Curate) on Jan 10, 2006 at 15:00 UTC

    Your question is a pretty broad and really needs more detail. When dealing with drivers knowing the underlying OS is essential. Linux, the OS I am most familiar with, uses a Video API called Video for Linux (video4linux). The next step would be a trip to CPAN to see if anyone has written Perl Modules to help you access the video API your OS uses.

    You state you want to use Flash to stream captured video. Flash has its own mechanisms for accessing video, in fact a video encoder was recently released by Macromedia so you may be able to skip Perl altogether and solve your problem directly with Flash.

    Good Luck

    PS.. if you do find some Perly solutions please come back and share them with us. I for one would be interested since I too have Brooktree 848 based video capture card in my box.

    mitd-Made in the Dark
    I've always been astonished by the absurd turns
    rivers have to make to flow under every bridge.

Re: How to connect to video driver?
by valdez (Monsignor) on Jan 10, 2006 at 16:31 UTC

    I've never tried myself but I would start from mencoder (part of mplayer) and probably ffmpeg; there is an example for a simple Flash player on Freshmeat, see Video and Audio Streaming with Flash and Open Source Tools. The author uses MING which has Perl bindings.
    I would not use Perl to grab video, I used ioctl to pilot the radio on my bt878 card and it was very painful :) Good luck!

    update: see also Video::Capture::V4l.

    Ciao, Valerio

Re: How to connect to video driver?
by zentara (Archbishop) on Jan 10, 2006 at 17:28 UTC
    It's fairly easy to grab an avi from the video card and convert it to mpg, see ztk-v4l-video-bloger/recorder for realtime video displayed in a Tk window using Mplayer. And you can convert it to flash, through swftools. But doing it in a "streaming" manner is quite new and isn't easy to do. First I don't think that flash has a "realtime stream capability", and if it does, Macromedia probably is keeping it well wrapped up in "pay-for" software.

    You probably want to look at google for 'video streaming', if you are interested; and look for GStreamer, Ogg-theora, and mp3 streaming.

    Think about this for a minute. What you are essentially asking is to set yourself up as an "internet live tv broadcast". Currently it is being done with audio, with RealPlayer streams, etc, but video is alot higher bandwidth. It will come eventually, as everyone gets wideband, but you can be sure your ISP will make you pay extra for the high-bandwidth usage that video requires. The TV companies do it through direct satellite links for their remote cameras, but they pay a hefty fee for doing it.

    So right now, you can record say 1 minute segments from your video card, convert to flash files, and make a Perl script to make automatic links to them. But they will be delayed by a minute or two, and you will might quickly use up the monthly bandwidth your ISP allocates to you.

    My DSL provider( and cable providers)will claim that you have unlimited bandwidth, but you can believe that if enough people started moving realtime video around, they will quickly slap surcharges onto the bills for excessive use.


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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-16 20:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found