youtube-dl

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
hermannelson
Level 1
Level 1
Posts: 26
Joined: Thu Nov 18, 2010 3:53 am

youtube-dl

Post by hermannelson »

Hello tech help

The utility to download and convert YouTubes is not working on LMDE 4 ?

youtube-dl

example:

Code: Select all

cfw@poi:~$ youtube-dl --extract-audio --audio-format mp3 https://youtu.be/fOk8Tm815lE

[youtube] fOk8Tm815lE: Downloading webpage
[youtube] fOk8Tm815lE: Downloading video info webpage
ERROR: fOk8Tm815lE: YouTube said: This video is unavailable.
Any ideas why this is not working on LMDE 4?

Thank you in advance

Herman
Vancouver BC
Last edited by karlchen on Sat Apr 04, 2020 5:56 pm, edited 1 time in total.
Reason: Moved thread from "Main Edition" to "LMDE" sub-forum. LMDE 4 is not a main edition.
Vancouver Canada

Mint 4 LMDE

Dell Studio XPS 1645
User avatar
Kadaitcha Man
Level 9
Level 9
Posts: 2612
Joined: Mon Aug 27, 2012 10:17 pm

Re: youtube-dl

Post by Kadaitcha Man »

hermannelson wrote:
Fri Apr 03, 2020 10:22 pm
The utility to download and convert YouTubes is not working on LMDE 4 ?

cfw@poi:~$ youtube-dl --extract-audio --audio-format mp3 https://youtu.be/fOk8Tm815lE

Code: Select all

ERROR: fOk8Tm815lE: YouTube said: This video is unavailable.
Any ideas why this is not working on LMDE 4?
Yes. It appears to be a PEBCAK issue.

The error message tells you exactly what is wrong. You are attempting to directly download a youtube video from a link that does not contain the video itself; the link is a redirect. The video does not exist at the redirect link, it exists at the site that is being redirected to. Try the full URL of the real link.

https://www.youtube.com/watch?v=fOk8Tm815lE
It's pronounced kad-eye-cha, not kada-itcha.
hermannelson
Level 1
Level 1
Posts: 26
Joined: Thu Nov 18, 2010 3:53 am

Re: youtube-dl

Post by hermannelson »

Thank You Kadaitcha Man.

The problem appears to be with LMDE 4.

I tried different URL's as you suggested. For example, the following script on another install ( Manjaro ) works with any URL, but nothing on my new LMDE 4 ?

youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=fOk8Tm815lE

Any further ideas to get youtube-dl working?

Thanks in advance,

Herman.
Vancouver Canada

Mint 4 LMDE

Dell Studio XPS 1645
User avatar
MrEen
Level 20
Level 20
Posts: 11896
Joined: Mon Jun 12, 2017 8:39 pm

Re: youtube-dl

Post by MrEen »

hermannelson wrote:
Sat Apr 04, 2020 5:38 pm
Thank You Kadaitcha Man.

The problem appears to be with LMDE 4.

I tried different URL's as you suggested. For example, the following script on another install ( Manjaro ) works with any URL, but nothing on my new LMDE 4 ?

youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=fOk8Tm815lE

Any further ideas to get youtube-dl working?

Thanks in advance,

Herman.
Hi Herman,

I just tried this and am downloading as I type.

Run this and maybe it'll fix this for you: youtube-dl -U (if it needs sudo, you'll know.)
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: youtube-dl

Post by all41 »

You can see the formats available by an inquiry:
youtube-dl -F https://www.youtube.com/watch?v=fOk8Tm815lE
Then you have a choice of which resolution you prefer.
In this instance if I wanted the best audio only download I would choose the 161k which has a format designation of 251
So I would then enter:
youtube-dl -f251 https://www.youtube.com/watch?v=fOk8Tm815lE
where the -f251 specifies what I wish to download
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
User avatar
Kadaitcha Man
Level 9
Level 9
Posts: 2612
Joined: Mon Aug 27, 2012 10:17 pm

Re: youtube-dl

Post by Kadaitcha Man »

hermannelson wrote:
Sat Apr 04, 2020 5:38 pm
I tried different URL's as you suggested.
Ok, sorry about that.
It's pronounced kad-eye-cha, not kada-itcha.
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: youtube-dl

Post by all41 »

My theory is to get the file downloaded in the highest bitrate available. If you need to compress down to mp3 you have
that ability in myriads of ways. If you have metered or slow connections you can select a lower quality to download.
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
hermannelson
Level 1
Level 1
Posts: 26
Joined: Thu Nov 18, 2010 3:53 am

Re: youtube-dl

Post by hermannelson »

Thank You All41

I tried your URLs .... same thing?

Also, I am only trying to use the command to convert to Mp3

Like this script youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=fOk8Tm815lE

cfw@poi:~$ youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=fOk8Tm815lE
[youtube] fOk8Tm815lE: Downloading webpage
[youtube] fOk8Tm815lE: Downloading video info webpage
ERROR: fOk8Tm815lE: YouTube said: This video is unavailable.
cfw@poi:~


Also, I do have the latest Deb.

regards

Herman
Vancouver Canada

Mint 4 LMDE

Dell Studio XPS 1645
User avatar
Kadaitcha Man
Level 9
Level 9
Posts: 2612
Joined: Mon Aug 27, 2012 10:17 pm

Re: youtube-dl

Post by Kadaitcha Man »

hermannelson wrote:
Sun Apr 05, 2020 12:41 am
Also, I do have the latest Deb.
Maybe this will interest you: viewtopic.php?f=47&t=315998
It's pronounced kad-eye-cha, not kada-itcha.
User avatar
Flemur
Level 18
Level 18
Posts: 8487
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: youtube-dl

Post by Flemur »

hermannelson wrote:
Sun Apr 05, 2020 12:41 am
Also, I do have the latest Deb.
That might be the problem because the latest .deb file isn't the latest version of youtube.

How to install the latest version:
https://ytdl-org.github.io/youtube-dl/download.html
namely:

Code: Select all

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
Later, to update youtube, do

Code: Select all

youtube-dl -U
rather than using the package system.

Also: that process installs youtube-dl in a diferent place than the repo version, so remove the repo version before you install the latest one so you won't have two versions and not sure which one you're using...
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: youtube-dl

Post by all41 »

Yes--I have always installed youtube-dl by method Flemur has shown.

Using op provided link:

Code: Select all

~ $ youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=fOk8Tm815lE
[youtube] fOk8Tm815lE: Downloading webpage
[download] Destination: /mnt/storage/Downloads/Ludwig Van Beethoven's 5th Symphony in C Minor (Full).webm
[download] 100% of 34.47MiB in 04:21
[ffmpeg] Destination: /mnt/storage/Downloads/Ludwig Van Beethoven's 5th Symphony in C Minor (Full).mp3
Deleting original file /mnt/storage/Downloads/Ludwig Van Beethoven's 5th Symphony in C Minor (Full).webm (pass -k to keep)
~ $
After which I have the .mp3 file.
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
hermannelson
Level 1
Level 1
Posts: 26
Joined: Thu Nov 18, 2010 3:53 am

Re: youtube-dl

Post by hermannelson »

Thank You Mr. Een, I do have the latest version in Mint 4 Synaptic.

Also Thank You Mr Flemur. However, I am reluctant to download packages from 3rd party sites. I want to stay with
Synaptic or the Debian pool.

I see a later version, but do not know to install it. ( I am not an expert at this )
Would this work? https://packages.debian.org/sid/youtube-dl
How do I open Synaptic to this?

Gentleman, I really appreciate your help !

Have a blessed Sunday

Herman.
Vancouver Canada

Mint 4 LMDE

Dell Studio XPS 1645
SilFox
Level 1
Level 1
Posts: 19
Joined: Thu Nov 24, 2011 3:10 am

Re: youtube-dl

Post by SilFox »

I had same error, due to outdated youtube-dl.

1 - Check via Synaptic if there is python-pip installed; if not - install it.
2 - Exit Synaptic
3 - Open terminal and put:

Code: Select all

sudo pip install --upgrade youtube_dl

This command will update youtube-dl if you have already installed it.

From: https://ytdl-org.github.io/youtube-dl/download.html
Image
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: youtube-dl

Post by all41 »

@hermannelson

I can attest to the download method @Flemur has shown. If you installed the repository version uninstall it
first via terminal command apt remove youtube-dl
Then proceed using wget. The youtube-dl group keeps this updated weekly (even more often)
Yes you can do this by pip, curl, and other methods--up to you to choose, each will get the latest greatest---beyond
the repository offering. If you have difficulty with a particular file run youtube-dl -U. As I said there are almost always
updated definitions available.
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
User avatar
Dutchmaster
Level 2
Level 2
Posts: 81
Joined: Sun Jun 24, 2007 8:35 am

Re: youtube-dl

Post by Dutchmaster »

Go to pkgs.org.

Under the Ubuntu section, download 3 files, python-twodict.....deb, youtube-dl.deb and youtube-dlg.deb. Install in that order.

Then you have a gui to run the program from.

Much easier to work with.
John
Blue Ridge Mountains, USA

I take refuge in the 3 jewels of the Linux Dharma: Kindness and Generosity (Buddha), Freedom (Dharma), and Collaboration (Sangha).

100% LInux since 2002
hermannelson
Level 1
Level 1
Posts: 26
Joined: Thu Nov 18, 2010 3:53 am

Re: youtube-dl SOLVED

Post by hermannelson »

Thank you to all who helped me.

uninstalling youtube-dl and followed with these commands worked:

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
hash -r


I understand I can upgrade with this command:

youtube-dl -U

However, I still need the command to uninstall it if the day ever comes. For example an updated version comes in the Debian pool that works.

Enjoy the weekend

Herman
Vancouver Canada

Mint 4 LMDE

Dell Studio XPS 1645
User avatar
smurphos
Level 17
Level 17
Posts: 7165
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: youtube-dl SOLVED

Post by smurphos »

hermannelson wrote:
Fri May 01, 2020 11:24 pm
I still need the command to uninstall it if the day ever comes. For example an updated version comes in the Debian pool that works.
That's straightforward -

Code: Select all

sudo rm /usr/local/bin/youtube-dl
Don't hold you breath for the packaged version in any LTS based distro to work reliably for any length of time.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: youtube-dl SOLVED

Post by all41 »

smurphos wrote:
Sat May 02, 2020 1:20 am
hermannelson wrote:
Fri May 01, 2020 11:24 pm
I still need the command to uninstall it if the day ever comes. For example an updated version comes in the Debian pool that works.
That's straightforward -

Code: Select all

sudo rm /usr/local/bin/youtube-dl
Don't hold you breath for the packaged version in any LTS based distro to work reliably for any length of time.
Surprisingly, youtube-dl -U latest/greatest is dated 03/24/20
But hey--they keep up with the flow
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
hermannelson
Level 1
Level 1
Posts: 26
Joined: Thu Nov 18, 2010 3:53 am

Re: youtube-dl

Post by hermannelson »

Thank You all41

Best Regards

Herman
Vancouver Canada

Mint 4 LMDE

Dell Studio XPS 1645
User avatar
Dutchmaster
Level 2
Level 2
Posts: 81
Joined: Sun Jun 24, 2007 8:35 am

Re: youtube-dl

Post by Dutchmaster »

Youtube-dlg.deb gives you the gui version of youtube-dl.

Click on the following file I found on pkgs.org and the download prompt will come up:

http://ppa.launchpad.net/nilarimogard/w ... c9_all.deb
John
Blue Ridge Mountains, USA

I take refuge in the 3 jewels of the Linux Dharma: Kindness and Generosity (Buddha), Freedom (Dharma), and Collaboration (Sangha).

100% LInux since 2002
Post Reply

Return to “Software & Applications”