I would like to convert some music videos to mp3 using ffmpeg.

How can I add a cover image from a specific part of the video (maybe by giving a minute and (decimal?)second) ?

1 Answer 1



ffmpeg -i video.mp4 -map 0:v:0 -map 0:a -vf trim=start='MM\:SS.mmm',trim=end_frame=1,setpts=0,scale=320:-1 -c:v:0 mjpeg -disposition:0 attached_pic out.mp3

where MM\:SS.mmm represents the time stamp of the image; (Colons should be escaped).

You don't usually to need to store a full-sized frame so I've added a scale filter.

  • hmm - it seems to work somehow - winamp shows the cover in the title informations - but the windows (7) file preview does not show the image. and also the mp3 player only on some converted videos shows them. Dec 31, 2018 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.