Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a custom thumbnail to a .mp4 file using ffmpeg?

I am trying to find the proper ffmpeg command to add a .png or .jpg image to a .mp4 video as a thumbnail. The command will eventually automatically be executed by a C# program.

This is what I have so far:

# This does not work. It only removes the default thumbnail.
ffmpeg -i video.mp4 -i image.png -acodec copy -vcodec copy -map 0 -map 1:0 OUTPUT.mp4

Is what I want possible with ffmpeg? If so, please guide me in the right direction.

like image 792
cooder_one Avatar asked Feb 15 '19 21:02

cooder_one


People also ask

How do you make a thumbnail for a movie?

Making a video thumbnail is relatively straightforward. You can take a screenshot from your video that best explains its contents, or you can use a tool like Photoshop or Canva to overlay text or icons on the image. To make a screen capture on a PC, use the Windows Snipping Tool.

What is a custom thumbnail?

you can upload your own image and use that. It is this latter option which is a custom thumbnail – in short, it's a specific image, created by you, designed to attract attention to your video. This image does not have to be a still from the video itself!


1 Answers

Using ffmpeg 4.0, released Apr 20 2018 or newer,

ffmpeg -i video.mp4 -i image.png -map 1 -map 0 -c copy -disposition:0 attached_pic out.mp4
like image 109
Gyan Avatar answered Sep 19 '22 07:09

Gyan