ffmpeg: Create a black background video from audio, for Youtube upload
Alternatively you can have ffmpeg generate the black video with the color source filter instead of making an image:

ffmpeg -f lavfi -i color=c=black:s=1280x720:r=5 -i audio.mp3 -crf 0 -c:a copy -shortest output.mp4



Since it is just black video this is one case with lossless mode (-crf 0) will have a smaller file size than the default lossy mode.
The resulting file may not play in your player or device, but it will on YouTube.