user12052: 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?

user-1: Probably becaue pixel format is wrong, add to command: -pix_fmt yuv420p

user1871: Youtube requires a video stream but your image is a single frame. Loop it to create a stream and terminate output when audio ends by adding -shortest.
ffmpeg -loop 1 -i black.png -i 'input.mp3' -c:v libx264 -tune stillimage -shortest 'output.mp4'

I don't remember if YT accepts MP3 in MP4. If it does, you can keep -c:a copy. -pix_fmt yuv420p is usually required, but YT will re-encode anyway to that pixel format.

user1760: 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.


12052: <p>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.</p>

<p>Using ffmpeg, I have tried this command, and a few adjacent variants:</p>

<p><code>ffmpeg -i 'black.png' -i 'input.mp3' -c:v libx264 -tune stillimage -c:a copy 'output.mp4'</code></p>

<p><em>(where <code>black.png</code> is a PNG file that is 640×480 pixels).</em></p>

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

<blockquote>
  <p>Processing abandoned. The video could not be processed. </p>
</blockquote>

<p>What could be the reason?</p>
 -1: <p>Probably becaue pixel format is wrong, add to command: -pix_fmt yuv420p</p>
 1871: <p>Youtube requires a video <em>stream</em> but your image is a single frame. Loop it to create a stream and terminate output when audio ends by adding -shortest.</p>

<pre><code>ffmpeg -loop 1 -i black.png -i 'input.mp3' -c:v libx264 -tune stillimage -shortest 'output.mp4'
</code></pre>

<p>I don't remember if YT accepts MP3 in MP4. If it does, you can keep <code>-c:a copy</code>. <code>-pix_fmt yuv420p</code> is usually required, but YT will re-encode anyway to that pixel format.</p>
 1760: <p>Alternatively you can have <code>ffmpeg</code> generate the black video with the <a href="https://ffmpeg.org/ffmpeg-filters.html#color" rel="noreferrer">color source filter</a> instead of making an image:</p>

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

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