|Just another Perl shrine|
Designing a webcam video streaming client-server application in Windowsby gaggio (Friar)
|on Jan 16, 2004 at 09:52 UTC||Need Help??|
gaggio has asked for the
wisdom of the Perl Monks concerning the following question:
I just bought a webcam but I am not satisfied with it because as it was not delivered with streaming software.
I thought that Yahoo! Messenger or MSN Messenger would be fine to transmit live video to my friends, but for a couple days now the Yahoo server dropped 90% of my frames (the rate was greater than 1 frame every 15 seconds) and let's not even talk about MSN Messenger - the "bigbrotheroverbloatedsystemslowdownertrash" chat application - that takes the guts out of my old AMD K6 380 (yes, 380MHz!) laptop...
As a perl monk and as a perl hacker, my conclusion is that I have to develop myself an application that serves video as well as it is possible. Please don't tell me that to get a fast TCP/IP layer I should turn to Linux since I already know this. My requirement is to develop for the Windows platform. And in my mind, Perl is the language of choice when dealing with network transfers.
I thought that I may find in your posts some helpful information to get started on this project.
The three most important software modules that I foresee are the following:
- Video streaming server
- Video streaming client
- Video grabber
By video streaming, don't get me wrong, I am not saying that I want to replace .rm or .asx formats... My "video stream" would simply be a sequential transfer of JPEG files captured one by one from my webcam.
Having queried Perlmonks and the web, I found out that apparently there exists a Win32::Scanner module on CPAN but I am wondering if it really gets the job done because I am not sure my webcam offers a TWAIN interface... Does somebody know if instead there exists a perl interface to the VFW (Video for Windows) API? I used VFW in the past and I am sure my webcam can be accessed through it. That would get me done for the video grabber.
Now, for the streaming client and server, I thought about using UDP transfer because it is faster than TCP and it does not matter if sometimes a frame is lost due to network problems. What do you think about this? Since there are so many modules available, could you tell me which CPAN module you would use to create this part?
After I get those basic components working, I will probably want to create a small client interface (with Win32::GUI probably) and I will think about making the transfer invisible to software and hardware firewalls, that is switch to HTTP transfer and try to transform the application into an Internet Explorer plugin. I would really like to get some comments on that part as well.
Any comments appreciated!