Since the youtube is a video website, you can upload audio file (for example, mp3). We
need to convert the file into video format, for example mp4, mkv format.
We can use ffmpeg in linux to convert the audio file to video file,
and then upload it to YouTube.
reduce the picture size (option)
sudo apt-get install imagemagick
convert image.jpg -resize 1024x512! cover.jpg
Install ffmpeg and convert audio.mp3 to output.mkv with cover cover.png.
sudo apt-get install ffmpeg
ffmpeg -loop 1 -framerate 2 -i cover.png -i audio.mp3 -c:v libx264 -preset
medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p output.mkv
Reference:
http://trac.ffmpeg.org/wiki/Encode/YouTube
No comments:
Post a Comment