video, ffmpeg, mencoder, flv
Posted by Wim Koorenneef on 2008-12-31 17:27 CET
I just bought a new webcam, a Logitech Quickcam Vision Pro (Mac version, 046d:09a6) with hardware controlled autofocus. Pictures are really sharp and the autofocus is cool too. Anyway, i needed to capture a small video with sound. Here's the ffmpeg command i used.
ffmpeg -t 10 -f video4linux2 -s 320x240 -r 30 -i /dev/video0 -f oss -i /dev/dsp1 -f mp4 webcam.mp4
No need to compile ffmpeg, this works out of the box!
Posted by Wim Koorenneef on 2008-12-28 11:00 CET
If you ever need to make a time lapse video of a series of jpeg images, try this:
mencoder -ovc copy -mf w=320:h=240:fps=6:type=jpg 'mf://*.jpg' -o time_lapse-test.avi
I used a bunch of small webcam images made with motion and it worked like a charm.
Posted by Wim Koorenneef on 2007-08-12 12:21 CEST
You can use ffmpeg if you only need one image from a movie. I needed this to publish a starting picture of a small flash video on the net using the excellent flv player of Jeroen Wijering.
ffmpeg -itsoffset -5 -i movie.mpeg -vcodec png -vframes 1 -an -f rawvideo -s 360x288 movie.png
The itsoffse option tells you where to extract the image (in seconds). Of course you probably want to convert this to a jpeg image. Convert is part of the imagemagick package.
Posted by Wim Koorenneef on 2006-11-17 20:17 CET
My phone plays video's so I decided to convert an old Will & Grace episode from a PAL resolution AVI to a 320x240 MP4 with ffmpeg. Here's the command:
ffmpeg -i will_and_grace.avi -f mp4 -vcodec mpeg4 -maxrate 1000 -b 700 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 128 -s 320x240 -aspect 4:3 out.mp4
I had to compile a new ffmpeg though as the ffmpeg that comes with Ubuntu doesn't support mp3 or aac encoding. Here's the configure command: