ffmpeg can be used to convert mp3’s into a format suitable for uploading to youtube. The following works best for me when converting class mp3 recordings to youtube.
ffmpeg -loop 1 -framerate 2 -i pic.png -i audio.mp3 -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a aac -shortest -movflags +faststart -pix_fmt yuv420 -threads 16 output.mp4
Notes:
- Might run into issues with pic.png (not 100% sure necessary to add a picture to fool youtube into thinking upload is a video)
The issue will probably warn you about not being a multiple of 2 or something to that effect.
- I solved this hurdle by using 1)
convert pic.png -resize 200x100 out-pic.png
then 2)convert pic.png -resize 200% out-pic.png
(convert
is an imagemagick tool). You might get lucky after only (1) but I had to follow up with (2) to get it to work.
- I solved this hurdle by using 1)
- You may need to adjust
-threads 16
to whatever you system can handle. - Can also alter Quality by playing with
-preset
options.