TIL: Create mp3 from YouTube video

Install youtube-dl, a tool to download YouTube videos. Using apt installs a version that's too old to work, so:

pipsi install youtube-dl

Download the video from YouTube:

youtube-dl https://www.youtube.com/watch?v=nyU1Pt2IXyE

This results in a webm file. I have no idea what that is, and am relieved to discover that converting it into an mp3 requires just:

ffmpeg -I MyVideoFile.webm -vn MyAudioFile.mp3

Where -vn disables video in the output.

Comments

Comments powered by Disqus