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?
libfdk_aac
. It has better quality per bitrate than ffmpeg's built-in AAC encoder. Also, don't forget-movflags +faststart
to put the MOOV atom at the front of the file (essential for streaming).