Friday, June 5, 2009

WMV to FLV Conversion and Thumbnail Generation

Here are two handy command lines for converting WMV to FLV (which is a better format for hosted video), and generating thumbnails for those videos. Both use ffmpeg.

To convert from wmv to flv:
ffmpeg -i test_video_clip.wmv -ab 48 -ar 22050 -s 512x384 -g 50 -qblur 1 -pass 1 -b 800 -r 25 -y encodedvideo.flv

To generate the thumbnail:
ffmpeg -i test_video_clip.flv -an -ss 00:00:03 -an -r 1 -vframes 1 -y %d.jpg

1 comment:

Chief Bit Sampler said...

Just curious, have your gotten the first ffmpeg command to work?

I can convert wmv but not with audio.

When I try your example I get:
Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

The -an option works, but then I lose audio. Any ideas? What version of ffmpeg did you use to get this to work.