[SOLVED] youtube to mp3 software

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Matumi
Level 1
Level 1
Posts: 24
Joined: Tue May 25, 2021 8:52 am
Location: Germany

[SOLVED] youtube to mp3 software

Post by Matumi »

Can anyone recommend some "youtube to mp3 download software" for Linux Mint 20.1?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Aexoh5oo
Level 1
Level 1
Posts: 14
Joined: Tue Jun 12, 2018 6:14 am

Re: youtube to mp3 software

Post by Aexoh5oo »

Start by getting the file, there are a number of on-line services, search for "save", "download" etc. with "youtube". These might have an option to save as mp3 - job done, if not...

To strip video and convert the audio try "ffmpeg".

Code: Select all

apt install ffmpeg
There are [too?] many options on ffmpeg but a basic convert and strip is:

Code: Select all

ffmpeg -i input.mp4 output.mp3
It will workout from the mp3 suffix you want audio only and its format.
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5759
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: youtube to mp3 software

Post by Lady Fitzgerald »

I use Video Downloader. Even though the name says it downloads videos, it can also download audio only as mp3. You can get it from the Software Manager.

BTW, this is a GUI front end for youtube-dl.
Last edited by Lady Fitzgerald on Mon Jun 21, 2021 9:25 am, edited 1 time in total.
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
User avatar
JoeFootball
Level 13
Level 13
Posts: 4674
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: youtube to mp3 software

Post by JoeFootball »

Matumi wrote: Can anyone recommend some "youtube to mp3 download software" for Linux Mint 20.1?
I use youtube-dl to create MP3s of podcast videos for listening to on the road.

https://youtube-dl.org/
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: youtube to mp3 software

Post by Flemur »

Matumi wrote: Mon Jun 21, 2021 5:14 amCan anyone recommend some "youtube to mp3 download software" for Linux Mint 20.1?
youtube-dl has an option to convert videos to mp3, along with an audio quality setting; it uses ffmpeg/avconv. FWIW, for music I download the highest quality webm format (usually #251), convert it to wav, trim and normalize that wav file, then convert it to mp3 with lame.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
freshminted
Level 4
Level 4
Posts: 273
Joined: Fri May 01, 2020 12:26 am

Re: youtube to mp3 software

Post by freshminted »

The graphical interface to youtube-dl, called youtube-dlgui, has the option to download mp3 only. But remember to switch it back to full video (mp4) the next time you want one.
Complete World Domination within five years.
Matumi
Level 1
Level 1
Posts: 24
Joined: Tue May 25, 2021 8:52 am
Location: Germany

Re: youtube to mp3 software

Post by Matumi »

Lady Fitzgerald wrote: Mon Jun 21, 2021 7:28 am I use Video Downloader. Even though the name says it downloads videos, it can also download audio only as mp3. You can get it from the Software Manager.

BTW, this is a GUI front end for youtube-dl.
Cool! Found it! I like the simple handling of it and it does what I need.
BrunoMiranda
Level 4
Level 4
Posts: 361
Joined: Thu Jun 24, 2010 2:22 pm

Re: [SOLVED] youtube to mp3 software

Post by BrunoMiranda »

I may be a little late to the party, but as @Aexoh5oo said, ffmpeg does the job. You can do it manually but if you have a lot of videos already downloaded to convert to MP3 you can download WinFF from the repos, a GUI frontend for ffmpeg that allows you to convert a series of videos to mp3 at once, and it supports drag & drop. It has some presets and you can even tweak them or create your own if you want to convert to another quality. I use it for podcasts, sometimes YouTube only has higher quality audio that I don't need for storage, I'm fine with 64kbps.

By the way, I think video downloader downloads and converts files to MP3 since YouTube doesn't store anything in this format. If you're OK with m4a, you can use youtube-dl or even video converter to download things in m4a. Youtube stores several audio only files with different bitrates (hence quality) both in m4a and webm.
Regarding file size and audio quality, for the same bitrate you won't find practical differences between MP3 and m4a. The main difference you may find for big lists is time, as in m4a you download the direct file from YouTube and with MP3 the audio m4a or even the video mp4 has to be downloaded and then converted to MP3. Not a big deal for a few files but it can make a big difference in a long list.

And knowing how to work with youtube-dl from the terminal is very practical. If I want to download a whole audio playlist, I copy the link from YouTube and in the terminal I just type youtube-dl -f 140 (and then paste the link + enter) and it starts doing the whole thing by itself and I can leave.

Even my old Samsung Galaxy Y with Android 2.3.6 and a fabulous 189MB of RAM supports m4a decoding by hardware. I've stripped all old useless crap, including the phone apps and it is a nice little file browser and MP3 player from a 32GB microSD card. It's my Precious! :mrgreen:


Let me know if you need some help with any of this. Cheers!
Bye for now,
Bruno


(Always backup before you screw up :)
User avatar
coffee412
Level 8
Level 8
Posts: 2225
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: [SOLVED] youtube to mp3 software

Post by coffee412 »

Well, I have a lot of mp4 video music stored and every time I want to make a usb stick for the car it seems I had to somehow convert the mp4's to mp3. So, I wrote a script and put it in my script directory for caja. Im using the mate desktop if it matters.

Code: Select all

/home/$USER/.config/caja/scripts
Here is my script if it helps.

Code: Select all

# Script for caja to convert video file from youtube to a mp3 music file.
# coffee  2019

FILE=`echo -n $CAJA_SCRIPT_SELECTED_FILE_PATHS`

ffmpeg -i "$@" "$@".mp3

rename 's/.mp4.mp3/.mp3/' *.mp4.mp3
I just right click on the mp4 and choose 'scripts / MP4TOMP3' and it will do it all.
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
User avatar
coffee412
Level 8
Level 8
Posts: 2225
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: [SOLVED] youtube to mp3 software

Post by coffee412 »

I like it better this way with my script. Other's might too. Just thought I would throw it out there.
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
BrunoMiranda
Level 4
Level 4
Posts: 361
Joined: Thu Jun 24, 2010 2:22 pm

Re: [SOLVED] youtube to mp3 software

Post by BrunoMiranda »

I made a script some time ago to convert the audio to MP3 from the video files I download.

It uses Nemo Scripts and Nemo Actions, so all I have to do is right click on a MP4 or webm video file (or an m4a audio file) and it is converted to MP3 inside the same folder. When it finishes it pops up a notification.

Sharing is caring:

Inside /home/(your_home)/.local/share/nemo/scripts
Filename: convert_to_mp3.sh
(Note: it has to be marked as executable. Run chmod +x convert_to_mp3.sh )

Code: Select all

#!/bin/bash
/usr/bin/avconv -threads 4  -y -i "$1" -acodec libmp3lame -b:a 64k -ac 2 -ar 44100 "$(<<< "$1" sed -r 's/^(.*)\..*/\1/').mp3"
MESSAGE=$(basename "$(<<< "$1" sed -r 's/^(.*)\..*/\1/')")
notify-send "Audio conversion finished!" "$MESSAGE"
Inside /home/(your_home)/.local/share/nemo/actions
Filename: Conver_to_MP3.nemo_action

Code: Select all

[quote][Nemo Action]
Name=_Convert to MP3
Comment=Extracts the audio from a mp4 or webm file into an MP3 with 64kbps
Exec=<../scripts/convert_to_mp3.sh %F>
Extensions=mp4;webm;m4a
Icon-Name=multimedia-volume-control-symbolic
Selection=any
Quote=double
Active=true
Terminal=true[/quote]
Bye for now,
Bruno


(Always backup before you screw up :)
SimonPeter
Level 5
Level 5
Posts: 582
Joined: Tue Jul 13, 2021 5:13 am

Re: [SOLVED] youtube to mp3 software

Post by SimonPeter »

User avatar
coffee412
Level 8
Level 8
Posts: 2225
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: [SOLVED] youtube to mp3 software

Post by coffee412 »

If your using caja file manager then this script does a good job. :wink:

Code: Select all

# Script for caja to convert video file from youtube to a mp3 music file.

FILE=`echo -n $CAJA_SCRIPT_SELECTED_FILE_PATHS`

ffmpeg -i "$@" "$@".mp3

rename 's/.mp4.mp3/.mp3/' *.mp4.mp3
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
iliketrains
Level 4
Level 4
Posts: 241
Joined: Wed Aug 26, 2020 6:32 pm

Re: [SOLVED] youtube to mp3 software

Post by iliketrains »

Paste the url of the youtube vid into vlc and convert, no need to save the video.
It's a really clunky procedure the first time but after that it's only sort of clunky :)
User avatar
coffee412
Level 8
Level 8
Posts: 2225
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: [SOLVED] youtube to mp3 software

Post by coffee412 »

iliketrains wrote: Wed Dec 08, 2021 11:37 am Paste the url of the youtube vid into vlc and convert, no need to save the video.
It's a really clunky procedure the first time but after that it's only sort of clunky :)
I save the videos to my mythtv box. I then can watch them later. This is the preferred way for me. To each their own. There is no single right way to do it. It all depends on what you want. For mp3's I also download and put on flash drives for the car. :)
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
BrunoMiranda
Level 4
Level 4
Posts: 361
Joined: Thu Jun 24, 2010 2:22 pm

Re: [SOLVED] youtube to mp3 software

Post by BrunoMiranda »

Just bare in mind that youtube-dl has not been updated since June, I believe.

If you are having problems, there's a fork called yt-dlp, and it was updated about a week ago.

Honestly I don't know if youtube-dlgui works with yt-dlp, or can be configured to or redirected to be able to.
I just use a simple script where I add the links of the videos to download, one each line, to a text file (videos_to_download.txt) and when invoked from the terminal, files are downloaded one by one.
This is nice since I can interrupt the downloads and resume them later on.
This can even be integrated with nemo actions and nemo scripts, where you just right-click on the videos_to_download.txt file and select Download, or so.

Code: Select all

#!/bin/bash

# Counts the lines of the file, so it counts the number of files to download
totalVideos=0
while read line; do
    # reading each line
    totalVideos=$((totalVideos+1))
    done < videos_to_download.txt

clear
echo Downloading $totalVideos videos at 360p...
echo 
echo


# Downloads the videos
actualVideo=1
while read line;
    do 
        echo 
        echo Downloading vídeo n.$actualVideo
        yt-dlp -f 18 "$line"; 
        actualVideo=$((actualVideo+1))
        echo
        done < videos_to_download.txt
Notes:
If you're using youtube-dl instead of yt-dlp, just replace it on this script.
Here are some usual parameters for file formats and quality downloads (after yt-dlp or youtube-dl):
18 - MP4 video @ 360p
22 - MP4 video @ 720p
139 - m4a audio @ 48kbps (enough for podcasts)
140 - m4a audio @ 128kbps
Typing yt-dlp or youtube-dl -F (capital F) outputs a map with possible file formats and quality available for that specific video.
Bye for now,
Bruno


(Always backup before you screw up :)
User avatar
RollyShed
Level 8
Level 8
Posts: 2436
Joined: Sat Jan 12, 2019 8:58 pm
Location: South Island, New Zealand
Contact:

Re: [SOLVED] youtube to mp3 software

Post by RollyShed »

Mobile Media Converter (MMC) lets you change video to video formats as well as video to audio or audio to audio formats. You can drop a whole bunch of files into it and do the conversion. I've done dozens, many dozens of vedeos to audio and some video to video when they haven't played properly.
SimonPeter
Level 5
Level 5
Posts: 582
Joined: Tue Jul 13, 2021 5:13 am

Re: [SOLVED] youtube to mp3 software

Post by SimonPeter »

BrunoMiranda wrote: Wed Dec 08, 2021 3:37 pm Just bare in mind that youtube-dl has not been updated since June, I believe.

If you are having problems, there's a fork called yt-dlp, and it was updated about a week ago.

Honestly I don't know if youtube-dlgui works with yt-dlp, or can be configured to or redirected to be able to.
I just use a simple script where I add the links of the videos to download, one each line, to a text file (videos_to_download.txt) and when invoked from the terminal, files are downloaded one by one.
This is a good GUI for yt-dlp and youtube-dl :
https://jely2002.github.io/youtube-dl-gui

AFAIK, it uses yt-dlp by default.
wedwardes
Level 1
Level 1
Posts: 25
Joined: Sun Oct 04, 2020 9:42 am

Re: [SOLVED] youtube to mp3 software

Post by wedwardes »

I downloaded Open-Video-Downloader-2.4.0. But then it says "open with" with a list of possible programmes [sorry for my ignorance]

I have used VideoDownloader / Youtube-dl on another computer but for some reason it won't launch or appear in my list of applications on this computer.

Linux Mint 20.3 XFCE
BrunoMiranda
Level 4
Level 4
Posts: 361
Joined: Thu Jun 24, 2010 2:22 pm

Re: [SOLVED] youtube to mp3 software

Post by BrunoMiranda »

wedwardes wrote: Fri Jun 03, 2022 2:37 am I downloaded Open-Video-Downloader-2.4.0. But then it says "open with" with a list of possible programmes [sorry for my ignorance]

I have used VideoDownloader / Youtube-dl on another computer but for some reason it won't launch or appear in my list of applications on this computer.

Linux Mint 20.3 XFCE
Where did you download / install Open-Video-Downloader from?

What file type did you download? Mint works fine with .deb, .run and .appimage files. You might have downloaded the source code and need to compile it, and that's a complex operation (the website you've downloaded it from might have the proper instructions).

Youtube-dl and yt-dlp (a fork, very similar but with a few tweaks) can be installed from Synaptic, but they are to be run from the terminal, not from the GUI (Graphic User Interface, AKA desktop).
They are not hard to use if you don't want to download many files at a time, and for downloading a list of files you can read my reply above with a simple script for it, feel free to use it and let me know if you need some help with it.
Also, there are replies above on this post with links to GUI frontends for both these downloaders.
Bye for now,
Bruno


(Always backup before you screw up :)
Locked

Return to “Software & Applications”