tags:

views:

38

answers:

1

I'm working on a project and i'm trying to capture a webcam and use a codex to save the file to the hard disk. but i can't find a program for it ?

It would be cool if the program is controllable from the outside but its not necessary.

(it has to capture the audio to)

A: 

vlc can do the recording and conversion directly if given the proper command line options (that however is not trivial but reasonably well documented).

Also there is the library libvlc that you can use to do anything that vlc does; I only used it for playback but I suppose that capturing and saving to file should be not too difficult.

You didn't tell your platform, but both vlc and libvlc are windows/linux/osx and so that shouldn't be a big problem.

This is for example a vlc command line I use to start recording from my webcam

vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-width=320 :v4l2-height=240
    --sout "#transcode{vcodec=x264,acodec=mpga,vb=800,ab=128}
            :standard{access=file,dst=capture.avi}"
6502