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

前端 未结 2 596
无人共我
无人共我 2020-11-30 09:29

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# prog

相关标签:
2条回答
  • 2020-11-30 09:58

    As in version 4.2.2...See Section 5.4 in FFmpeg documentation

    To add an embedded cover/thumbnail:

    ffmpeg -i in.mp4 -i IMAGE -map 0 -map 1 -c copy -c:v:1 png -disposition:v:1 attached_pic out.mp4
    

    Not all muxers support embedded thumbnails, and those who do, only support a few formats, like JPEG or PNG.

    0 讨论(0)
  • 2020-11-30 10:02

    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
    
    0 讨论(0)
提交回复
热议问题