[FFmpeg-user] FFmpeg can't get access to webcam when excuted via Adobe AIR?

Malte Beyer mb at powerflasher.de
Wed Sep 21 17:11:02 CEST 2011


I am trying to use FFmpeg via the NativeProcess-API in Adobe AIR 2.0. My goal is to encode the video of the webcam with H.264 and stream it to a Flash Media Server. The application will be x-platform (Win and Mac). Additionally I need to switch between different webcams during the live stream.

I already made a small prototype and I nearly managed to stream the webcam to my streaming server. I can send the stream of the webcam to the streaming server when I am using the windows console. I also can communicate with FFmpeg via AIR and I can e.g. send a local video to the streaming server when using AIR.

But I cannot manage it to send the video of the webcam to the streaming server when using AIR. I am using the same command on the command line and in AIR. It works from the command line, but it does not work from AIR.

I am using this command:

ffmpeg -f dshow -i video="Logitech QuickCam E2500":audio="Mikrofon (IDT High Definition A" -f flv rtmp://xyz

As I said it works, when executed via the command line. But when I execute the same command from AIR I get the following error message in my AIR app:

[dshow @ 01998640] Could not find video device.
video="Logitech QuickCam E2500": Input/output error

The question is: might this be a rights problem? Is it not allowed for FFmpeg to access my webcam when FFmpeg is executed via AIR? And if so, how can I solve it? Or is it some other problem?

Two other questions I was wondering about (probably much easier to answer):

-          I cannot see a solution how to send the video of the webcam to a streaming server on Mac (dshow seems to work just for Windows). Is there no chance to have input via the webcam on Mac? Just Linux and Windows?

-          What do you think about switching the cameras during runtime? Is that a problem? Will I stop the dshow-command by sending a "q" and start the next dshow-command with the different cam right after? How will this look like in the frontend? Black screen during the switch?

Thanks for your help.

Malte Beyer
Technical Director
Powerflasher GmbH
Belvedereallee 5
52070 Aachen, Germany

E    mb at powerflasher.de<mailto:mb at powerflasher.de>
W   http://www.powerflasher.de<http://www.powerflasher.de/>
B    http://blog.powerflasher.de<http://blog.powerflasher.de/>
S    Facebook<http://facebook.de/Powerflasher> | Twitter<http://twitter.com/powerflasher> | Xing<https://www.xing.com/companies/powerflashergmbh>
T    +49 241 91880 247

Powerflasher Showreel 2011<http://vimeo.com/23575601>
FDT 4 - Coding Comfort<http://www.fdt.powerflasher.com/>
Geschäftsführung: Carlo Blatz, Amtsgericht Aachen - HRB 8683, Ust-IdNr.: DE220959918

More information about the ffmpeg-user mailing list