Extract thumbnail from video

by Jeff Haynie on May 24, 2007 · Comments

Here’s some simple code to extract a thumbnail of a video from to a JPEG file using FFMEG:

ffmpeg -i mymovie.mov -vcodec mjpeg -vframes 1 -an -f rawvideo -s 64x64 foo.jpg

You can also use PNG instead (although its much bigger in size):

ffmpeg -i movie.mov -vcodec png -vframes 1 -an -f rawvideo -s 64x64 foo.png

Convert your movie to a flash player format (FLV):

ffmpeg -i mymovie.mov -y -ar 22050 -ab 64 -f flv -s 320x240 foo.flv

Technorati technorati tags: , ,

Popularity: 45% [?]

If you enjoyed this post, make sure you subscribe to my RSS feed!

  • maya_v
    What about alpha channel support?
  • Hello,

    Most of the videos star with black screen.Can we create a thumbnail for a delay of say 10 secs so that we can avoid black thumbnail :)

    Onkar M
  • godvirus
    Use "-ss <secs>" to skip <secs> seconds. Worked for me when I put it before the -vframes option.</secs></secs>
  • short and sweet ...
  • Paul
    Thanks for the thumbnail tip. I use it all the time now...major time-saver.
blog comments powered by Disqus

Previous post: Which web framework is right for your business?

Next post: And…they’re off