Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
However, there's a useful tool called youtube-dl. It lets you download any format that's on their servers. You can find the availible formats with the "-F" flag, then download that format with the "-f (format number)". Usually there are three separate audio files at different formats and bitrates. Or you can just give it the URL and it will download the highest resolution video.
Once you download the audio, you can just use ffmpeg or something to convert it to MP3.
However, there's a useful tool called youtube-dl. It lets you download any format that's on their servers. You can find the availible formats with the "-F" flag, then download that format with the "-f (format number)". Usually there are three separate audio files at different formats and bitrates. Or you can just give it the URL and it will download the highest resolution video.
Once you download the audio, you can just use ffmpeg or something to convert it to MP3.
However, there's a useful tool called youtube-dl. It lets you download any format that's on their servers. You can find the availible formats with the "-F" flag, then download that format with the "-f (format number)". Usually there are three separate audio files at different formats and bitrates. Or you can just give it the URL and it will download the highest resolution video.
Once you download the audio, you can just use ffmpeg or something to convert it to MP3.
Hope this helps!
You can use youtube-dl to extract audio from a video url like so:
Code:
youtube-dl -x --audio-format mp3 --audio-quality best "youtube-url" "%(title)s.mp3"
Code:
excerpt from youtube-dl --help
Post-processing Options:
-x, --extract-audio Convert video files to audio-only files (requires
ffmpeg or avconv and ffprobe or avprobe)
--audio-format FORMAT Specify audio format: "best", "aac", "vorbis",
"mp3", "m4a", "opus", or "wav"; "best" by default
--audio-quality QUALITY Specify ffmpeg/avconv audio quality, insert a value
between 0 (better) and 9 (worse) for VBR or a
specific bitrate like 128K (default 5)
You can use youtube-dl to extract audio from a video url like so:
Code:
youtube-dl -x --audio-format mp3 --audio-quality best "youtube-url" "%(title)s.mp3"
Code:
excerpt from youtube-dl --help
Post-processing Options:
-x, --extract-audio Convert video files to audio-only files (requires
ffmpeg or avconv and ffprobe or avprobe)
--audio-format FORMAT Specify audio format: "best", "aac", "vorbis",
"mp3", "m4a", "opus", or "wav"; "best" by default
--audio-quality QUALITY Specify ffmpeg/avconv audio quality, insert a value
between 0 (better) and 9 (worse) for VBR or a
specific bitrate like 128K (default 5)
youtube-dl is nice but well, I would be interested by a minimalist solution such as quvi.
Quick and convenient, YouTube to MP3 is a website where you can copy and paste the URL of the YouTube video you want to convert. Just add the link and click the Go button. At the next screen, click the drop-down menu and select the format for conversions, such as MP3 or M4A.
With an MP3, you also select the level of compression, anywhere from 64 kbps to 320 kbps. The smaller the number, the smaller the file, but the poorer the quality. So unless you need to save space, you’ll want to choose a higher number.
______________________________________________________ https://youtube-mp3.me/fr/fr-2/
Last edited by policeman26; 11-25-2020 at 05:00 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.