Obtain solely audio in mp3 format youtube-dl . with [Quick Tip]


youtube-dl is a flexible command line device for downloading movies from YouTube and plenty of different web sites. I take advantage of it to again up my very own YouTube movies.

By default, you employ youtube-dl to obtain movies. How about extracting audio solely with youtube-dl? It’s really very simple. Let me present you the steps.

Downloading movies from web sites could also be in opposition to their insurance policies. It’s as much as you whether or not you select to obtain video or audio.

youtube-dl . obtain audio solely with

Please ensure you have put in youtube-dl in your Linux distribution first.

sudo snap set up youtube-dl

In the event you solely wish to obtain audio from a YouTube video, you need to use the -x choice with youtube-dl. This extract-audio choice converts video recordsdata to audio-only recordsdata.

youtube-dl -x video_URL

The file is saved in the identical listing from the place you ran the youtube-dl command.

This is an instance the place I downloaded a voice-over of my Zorin OS 16 evaluate video.

youtube-dl -x https://www.youtube.com/watch?v=m_PmLG7HqbQ
[youtube] m_PmLG7HqbQ: Downloading webpage
[download] Vacation spot: Zorin OS 16 Evaluate - It is a Visible Masterpiece-m_PmLG7HqbQ.m4a
[download] 100% of 4.26MiB in 00:03
[ffmpeg] Correcting container in "Zorin OS 16 Evaluate - It is a Visible Masterpiece-m_PmLG7HqbQ.m4a"
[ffmpeg] Submit-process file Zorin OS 16 Evaluate - It is a Visible Masterpiece-m_PmLG7HqbQ.m4a exists, skipping

Did you take note of the audio format? It’s in .m4a format. You’ll be able to specify the audio format for something you want.

As an instance you wish to extract audio in mp3 format. You should use it like this:

youtube-dl -x --audio-format mp3 video_URL

Right here is similar instance I confirmed earlier. You’ll be able to see that it makes use of ffmpeg to transform the m4a file to mp3.

youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=m_PmLG7HqbQ
[youtube] m_PmLG7HqbQ: Downloading webpage
[download] Zorin OS 16 Evaluate - It is a Visible Masterpiece-m_PmLG7HqbQ.m4a has already been downloaded
[download] 100% of 4.26MiB
[ffmpeg] Correcting container in "Zorin OS 16 Evaluate - It is a Visible Masterpiece-m_PmLG7HqbQ.m4a"
[ffmpeg] Vacation spot: Zorin OS 16 Evaluate - It is a Visible Masterpiece-m_PmLG7HqbQ.mp3
Deleting authentic file Zorin OS 16 Evaluate - It is a Visible Masterpiece-m_PmLG7HqbQ.m4a (cross -k to maintain)

Obtain total YouTube playlist in MP3 format

Sure, you completely can do this. The principle factor right here is to get the URL of the playlist. It’s often within the following format:

https://www.youtube.com/playlist?record=XXXXXXXXXXXXXXXXXXX

To get the URL of a playlist, click on on its identify when the playlist is displayed in the suitable sidebar.

getting youtube playlist url
Click on on Playlist Title

This may take you to the playlist web page and you’ll copy the URL right here.

youtube playlist url
Get playlist URL

Now that you’ve got the playlist URL, you need to use it to obtain audio recordsdata in mp3 format within the following manner:

youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" playlist_URL

that scary trying -o "%(title)s.%(ext)s" Specifies the output file (with choice -o ) and instructs it to make use of the video’s title and extension (mp3 on this case) for naming audio recordsdata.

youtube playlist audio download

I hope you discover this fast tip useful. Take pleasure in audio recordsdata 🙂




Supply hyperlink