Can ImageMagick make thumbnails from video?
Solution 1:
You can extract thumbnails from videos with ImageMagick like so (from here - another answer claims that ImageMagick uses ffmpeg 'under the hood', so I don't know if this will actually be any faster than just using ffmpeg):
convert input.mp4[100] thumbnail.png
the [100]
tells ImageMagick to take the 100th frame from input.mp4
. I've tested it on a H.264 video stream in an MP4 container. Obviously you can use whatever ImageMagick options you want, including deinterlacing as described in your link.
ImageMagick is really for dealing with individual images, though; for video, you should just use ffmpeg. Obviously there is some overlap here, since you're dealing with an individual frame, but I'd say that deinterlacing is more of a video-processing task.
You should use the yadif filter for deinterlacing. You can add it to your existing line thusly:
ffmpeg -ss 600 -i input.mp4 -vframes 1 -s 420x270 -filter:v 'yadif' output.png
when working with filters, I prefer to use the scale filter rather than -s
:
ffmpeg -ss 600 -i input.mp4 -vframes 1 -filter:v 'yadif,scale=420:270' output.png
Solution 2:
ImageMagick shells out to ffmpeg with this command:
ffmpeg -v -1 -vframes %S -i "%i" -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z"
So the short answer is "no" (since it does not do it itself).