ffmpeg: Create a black background video from audio, for Youtube upload I have MP3 audio that I would like to turn into video, by joining the audio with a solid black background. I then want to upload the video to Youtube.

Using ffmpeg, I have tried this command, and a few adjacent variants:

ffmpeg -i 'black.png' -i 'input.mp3' -c:v libx264 -tune stillimage -c:a copy 'output.mp4'

(where black.png is a PNG file that is 640×480 pixels).

However, when uploading the video output.mp4 to Youtube via Creator's Studio, I get the error: 


  Processing abandoned. The video could not be processed. 


What could be the reason?
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.