Q:

Creating video with multiple audios and one still image for YouTube

I want to create many videos with multiple audio streams and one single picture.
For example I have 

song1.mp3
song2.mp3
song3.mp3

and one single picture. What I need to do is to create many videos and name these videos as: song1.mp4, song2.mp4, song3.mp4
I want to create many videos at once. I have this script for only one picture and one mp3, but I need to create bulk videos.
ffmpeg -loop 1 -shortest -r 0.1 -i online.mp3 -i imagen.png -ab 128k output.avi

Can you help me?

A:

First off, you need to reorder your ffmpeg options a bit. The -loop 1 should come right before the input image, and the -r 0.1 should ideally go as an output option after the image. See more on the FFmpeg wiki about creating a slideshow from images.
Then, make sure you run a recent version of ffmpeg. Download one here and do not use the one you installed with apt-get – it's very outdated.
Also, you want to use H.264 and AAC as video and audio codec, respectively, with MP4 as a container, not the MPEG-4 and MP3 combination in AVI that you will get with your current command.
Loop over all MP3 files, strip the extension, then run the ffmpeg script:
for f in *.mp3; do
    # create output filename songX.mp4
    name="${f%%.mp3}.mp4"
    # run ffmpeg command
    ffmpeg -loop 1 -i imagen.png -i "$f" \
      -r 0.1 -shortest \
      -c:v libx264 -pix_fmt yuv420p -c:a aac -strict experimental \
      -crf 18 -b:a 128k "$name"
done

What I also added is:

CRF (constant rate factor) sets the video quality (use something between 18 and 28, lower is better)
an explicit conversion to 4:2:0 subsampling – otherwise you'll get 4:4:4 if you have PNG as input, and that cannot be played back in all players

