Skip to content

Instantly share code, notes, and snippets.

@wvega
Created March 19, 2010 20:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvega/338150 to your computer and use it in GitHub Desktop.
Save wvega/338150 to your computer and use it in GitHub Desktop.
Create video thumbnails with ffmpeg
# create a thumbnail for a video with ffmpeg
ffmpeg -itsoffset -16 -i video.flv -vcodec mjpeg -vframes 1 -an -f rawvideo -s 142x94 thumbnail.jpg
# ...
video=video.flv; ffmpeg -itsoffset -16 -i $video -vcodec mjpeg -vframes 1 -an -f rawvideo -s 142x94 "`basename $video .flv`.jpg"
# remove last charater from filename of JPG files with filename ending in M
ls *M.jpg | while read line; do echo mv $line `echo $line | sed 's/\(.*\)M.jpg/\1.jpg/'`; done
mencoder input.ogv -ovc xvid -oac mp3lame -xvidencopts pass=1 -o output.avi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment