FFmpeg on Windows


A quick post to document how audio and video can be captured on Windows using FFmpeg into different container formats like MKV, MP4 and WebM.

List DirectShow devices

The following command lists the names of audio and video devices currently installed

ffmpeg -list_devices true -f dshow -i dummy

Capture from webcam and microphone

With container format mkv the default video codec is H.264 and audio codec is Vorbis. With the mp4 container format (change output.mkv to output.mp4) the video codec is H.264 and audio code is MPEG AAC. With the webm container format the video codec is the Google/On2 VP8 and audio codec is Vorbis.

ffmpeg -f dshow -i video="video device name":audio="audio device name" -r 25 -s 320x240 output.mkv

I added the -s (video size) and -r (video frame rate) options because with mkv and mp4 I was getting lots of dropped frames.

References
ffmpeg directshow

3 thoughts on “FFmpeg on Windows

  1. didnt work for me as well. Of course is see the command is correct but i got error message – “could not find video device” even though in the available input device search it found my USB web camera.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s