Problem in setting video thumbnail with ffmpeg

874 Views Asked by At

I'm trying to add thumbnail to a mkv video with the following command: ffmpeg -y -i video.mkv -i image.jpg -map 1 -map 0 -c copy -disposition:0 attached_pic out.mkv. However this command replaces all frames in the video with that image and no sound. Am I doing something wrong. I'm using latest version of ffmpeg.

1

There are 1 best solutions below

0
On

What you tried works for MP4 file and not for MKV file. Try this:

ffmpeg -y -i video.mkv -i image.jpg \
       -attach image.jpg -metadata:s:t mimetype=image/jpeg \
       -c copy out.mkv