Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What can i use to automate video snapshots

What command line util can i use to create a thumbnail preview of a video i made? I do not want a single thumb that windows make, i want a large jpg file that has 30 or less shots so i can preview the movie w/o running it.

I either need an app that can do a batch at once or a command line util so i can loop through a folder or w/e i need and feed it to the util. I was thinking of hacking up ffplay to do this, i dont know what i am getting myself into so is that recommended? (i used SDL many times, never its YUV settings nor with ffmpeg)


1 Answers

You can use ffmpeg to perform frame extraction, here's how I've done something similar

ffmpeg -i my_input_video.flv -y -an -sameq -f image2 -r 1 my_frame_%05d.jpg
  • -i my_input_video.flv specifies the input file
  • -y overwrite output files
  • -an disables audio (we're transcoding a video to a series of jpegs, we don't need audio)
  • -sameq - use same quality as source
  • -f image2 sets the output format to image2 (an image sequence)
  • The -r parameter is the frames per second, so the above command will produce one jpeg per second.

Once you have your collection of jpegs, you can use ImageMagick montage command to build a montage image.

like image 148
Paul Dixon Avatar answered Sep 17 '25 18:09

Paul Dixon