Page 1 of 1

Webcam Video and Audio Live Capture

Posted: 17 May 2012 21:03
by Acid0057
Hi,

I'm trying to use VLC to capture the Video and Audio from my Webcam and stream it to an http address. The problem we're having is that under Mac OS X Lion 10.7.4 with VLC 2.0.1 it doesn't support live audio. Is this support coming in a future version? Thanks!

-- Acid

Re: Webcam Video and Audio Live Capture

Posted: 18 May 2012 13:09
by fkuehne
in fact, VLC 2.0.1 does already support it, but there is no GUI for it. We added a GUI for the next major release. You can already download a nightly build to get a first look.

Re: Webcam Video and Audio Live Capture

Posted: 18 May 2012 17:23
by Acid0057
Thank you for the quick reply Felix. I have downloaded the latest nightly VLC 2.1.0 32-bit. My camera's driver is only 32-bit so I need to use the 32-bit VLC (That's another story though) I can see the Video Device and Audio Device capture. Is VLC 2.1.0-git able to do both video and audio devices at the same time?

Re: Webcam Video and Audio Live Capture

Posted: 20 May 2012 14:55
by fkuehne
Yes, but we still lack the UI to do that. You want a primary (normal) input along with a so-called "input slave". Regrettably, the UI does only let do that with files at this point, so you will need to use the command line for now, which isn't too easy. I've just created ticket 6818, so I don't forget to add this.

Re: Webcam Video and Audio Live Capture

Posted: 20 May 2012 19:48
by Acid0057
How would I do it from the command line? And will it be updated with this feature in a new nightly build and the official 2.1.0?

Re: Webcam Video and Audio Live Capture

Posted: 21 May 2012 16:01
by fkuehne
The command line code is:

Code: Select all

./VLC.app/Contents/MacOS/VLC -vvvv qtcapture:// --input-slave=qtsound://
You need to go to the folder where VLC is located first. This command will launch VLC with a special playlist item. Double click / start it to have both video and audio output at the same time.

For transcoding & streaming, you'd need to append this term:

Code: Select all

--sout=#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=192}:standard{mux=ts,dst=address,access=http}
Replace dst=address with the address of your choice.

Note that this pre-release version of VLC could have problems with termination, so you might need to right-click on its dock icon to force quit it.


And yes, as soon as this feature is implemented, this will be reflected in the nightly builds. I cannot give an estimate when I'll come around to that though, since all the VLC coding I'm doing is done in my spare time. You are welcome to CC yourself to the ticket using any Open ID login (including your Google login), so you'll be notified automatically.

Re: Webcam Video and Audio Live Capture

Posted: 22 May 2012 17:04
by Acid0057
Thanks for the commands Felix! Can't wait to see this in the GUI for VLC Mac. I've tried the commands and they work fine here.

Re: Webcam Video and Audio Live Capture

Posted: 22 May 2012 17:11
by fkuehne
Glad to hear that it's working for you! As you might have guessed, I gave you the wrong ticket number. The correct one is ticket 6851.

Re: Webcam Video and Audio Live Capture

Posted: 22 May 2012 18:53
by Acid0057
I was just about to mention that Felix. Thanks!

Re: Webcam Video and Audio Live Capture

Posted: 23 May 2012 15:53
by crackstone
hey felix,

i just tried this with the latest source today (can nightlies be compared to them - i guess so - otherwise correct me).
somehow qtsound throws an assertion error when used on its own:

Code: Select all

[0x2b3108] main input debug: `qtsound://' successfully opened [0x2b3108] main input debug: Buffering 0% [0x5a4a78] main playlist debug: creating audio output Assertion failed: (bufend <= end), function block_Check, file ../../extras/package/macosx/../../../src/misc/block.c, line 65. Abort trap: 6
and when used with --input-slave it doesn't seem to like DEMUX_GET_TIME:

Code: Select all

[0x26f228] main input error: slave[0] doesn't like DEMUX_GET_TIME -> EOF [0x26f228] main input debug: slave 0 EOF
I could solve the above assertion error but it doesn't seem to go hand in hand with DEMUX_GET_TIME. Or does it?

Am I missing out on something here? What could be the reason this isn't this working for me

Re: Webcam Video and Audio Live Capture

Posted: 25 May 2012 17:10
by fkuehne
There is a core developer currently re-writing parts of the core and the module structures. This looks like a fresh regression, which I didn't notice so far and which wasn't present in the previous nightly builds. Thanks for reporting. Unless you want to hack VLC's code base, there is little you can do about this at this point, I fear.