Wednesday, 4 March 2015

How To: Download Audio or Video from Youtube

It might go against the point of youtube videos a little bit, but if you want to download videos from youtube for offline viewing, there's a handy package that can do this for you. Using your favourite package manager (apt, yum, zypper) install the youtube-dl package. It may need to install a few dependencies which will vary according your system.


Basic Usage

To download a video, it's simply a case of

youtube-dl <youtube-url>

The package will download the video at the highest available resolution, but if you don't want that youtube-dl can query the available resolutions and you can choose the one you want by using the -F option.

If you only want the audio from a youtube video you can use:

youtube-dl <youtube-url>  --audio-format mp3 --audio-quality 320

which will download in mp3 format with a bitrate of 320kbps

1 comment: