FFmpeg, how to embed cover art (image) to .m4a

前端 未结 4 1391
悲&欢浪女
悲&欢浪女 2020-12-31 15:31

Is there any way to embed cover art to m4a files?

This one works well for mp3 but doesn\'t work for m4a

ffmpeg         


        
4条回答
  •  一整个雨季
    2020-12-31 15:41

    It is possible with ffmpeg by specifying the attached_pic attribute on the image source via the -disposition parameter.

    ffmpeg -i input.m4a -i image.jpg -map 0 -map 1 -c copy -disposition:v:1 attached_pic output.m4a 
    

    Tested with ffmpeg 4.2.2.

    A similar command is also given as an example in the ffmpeg docs, however be careful that the example is for adding covers to videos but not audio files. The -disposition parameter fails silently if the wrong stream is selected.

提交回复
热议问题