ffmpeg stream options for mp3, cover art of mp4 I have potentially millions of HLS streaming videos to create from cover art and mp3s.  Obviously, I'd like to keep the resulting bandwidth to a minimum.  I tried various ffmpeg flags specifically suggested for this task and even some on the apple media segmenter that claimed to put a cover art in each segment(meta-file/meta-type).  I had a lot of problems getting chrome to display the cover art when playing back using HTML5 despite it working in VLC.  I ended up with a working command line like this.

ffmpeg -loop 1 -i 1k_image.jpg -i song_219kbs.mp3 -c:v libx264 -pix_fmt yuv420p  -profile:v baseline -c:a aac -strict experimental -b:a 64k -r 1 -shortest song_64k_2fps_baseline.mp4


The -pix_fmt and baseline profile seemed to be key.  Can you see anything I am doing that is unnecessary?  Is there a better way of achieving my goal?

Also, I look at several of the commercial cloud transcoding solutions and didn't see how to configure one to do this.  Did I miss the options?
If you just want to embed a cover you might consider keeping the result as mp3, for example:

ffmpeg -i original.mp3 -i cover.png -map 0:0 -map 1:0 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" -id3v2_version 3 -write_id3v1 1 result.mp3


If you are creating mp4's, e.g. for YouTube, then I suggest to split the process to two steps - first create the video movie with no audio track, duration somewhat longer than that of the audio. Then mux the video and audio together with the -shortest option which will truncate the video to the exact duration of audio. In terms of time these two steps will take a tidbit longer than a single pass but your whole workflow will be much simpler and more manageable.