ffmpeg is a powerful command line tool to create, record, manipulate, stream and convert video files.
For YouTube upload:
> ffmpeg -loop 1 -framerate 1 -i image.jpg -i music.mp3 \
-c:v libx264 -preset veryslow -crf 0 -c:a copy -shortest output.mkv
A more generic approach that should work with every player:
> ffmpeg -loop 1 -i image.png -i music.mp3 -vf "scale='min(1280,iw)':-2,format=yuv420p" \
-c:v libx264 -preset veryslow -profile:v main -c:a aac -shortest -movflags \
+faststart output.mp4