Search code examples
youtubeffmpegmp3jpegmp4

ffmpeg adding jpg and mp3 together to make a video for upload on YouTube


I am trying to take album art and join it with a track. The file formats in question are jpg and mp3. I have a working ffmpeg command

ffmpeg -y -i *.jpg -i *.mp3 -c:a copy result.avi

that creates a video that plays well in VLC, but when I upload it to YouTube, it gets stuck in processing. The video will play on YouTube in low 240p, but I would like the image to be of 1440 pixel quality. I know YouTube prefers mp4, and that the video I am creating only has a single image. How can I make some changes so the video will be accepted by YouTube and display correctly? YouTube test link: https://www.youtube.com/watch?v=0t2A4erG4II&feature=youtu.be


Solution

  • This works!!

    ffmpeg -loop 1 -i *.jpg -i *.mp3 -c:v libx264 -tune stillimage -c:a aac -strict experimental -b:a 192k -pix_fmt yuv420p -shortest out.mp4