Extract video cover/thumbnail from file with embedded cover using ffmpeg

Now I've stumbled upon different posts here and there around the web for extracting a still as a thumbnail for the video.. but I can't seem to find anything related to extracting a cover thumbnail of a video that has an existing image embedded into the video as it's thumbnail.

for mp3 it's as easy as:

ffmpeg -i "file.mp3" "file.jpg"

but it's a totally different story for mp4.

Any help would be very helpful. Thank you.


Solution 1:

Use

ffmpeg -i video.mp4 -map 0:v -map -0:V -c copy cover.jpg

Cover images in MP4 aren't regular video streams but have a disposition of an attached picture.

What the command above does first is map all video streams (regular + attached pictures) and then use a negative mapping to disable all regular video streams, leaving only the attached pictures mapped.

MP4s can have attached pictures with codec JPEG, PNG or BMP. Check which one your file has, and correct the extension.