di512
Posts: 37
Joined: Mon Oct 24, 2016 4:24 pm

youtube-dl

Sat Dec 09, 2017 5:04 pm

Available version useless. 2014.08.05 unable to download anything.
I do "apt-get update" every week.

fruitoftheloom
Posts: 22686
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: youtube-dl

Sat Dec 09, 2017 5:26 pm

di512 wrote:
Sat Dec 09, 2017 5:04 pm
Available version useless. 2014.08.05 unable to download anything.
I do "apt-get update" every week.

Take a look at kweb, it has a newer version of yt-dl:

viewtopic.php?t=40860
Rather than negativity think outside the box !

Asus ChromeBox 3 Celeron is my other computer.

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: youtube-dl

Sat Dec 09, 2017 6:26 pm

All you have to do is run your current version with the -U parameter.

It will update itself in place to the latest version.

See below for sample use:

% youtube-dl -U
youtube-dl is up-to-date (2017.12.02)
%
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

User avatar
ksharindam
Posts: 161
Joined: Sat Jan 09, 2016 4:16 pm

Re: youtube-dl

Sun Dec 10, 2017 10:20 am

I would recommend pytube instead of youtube-dl.
It can download all videos that youtube-dl can. And also it is easy to use.
You can install it from git source, or you can install using pip.
sudo pip install pytube

gkreidl
Posts: 6281
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: youtube-dl

Sun Dec 10, 2017 10:34 am

ksharindam wrote:
Sun Dec 10, 2017 10:20 am
I would recommend pytube instead of youtube-dl.
It can download all videos that youtube-dl can. And also it is easy to use.
You can install it from git source, or you can install using pip.
sudo pip install pytube
That's simply not true. Youtube-DL supports more than 1000 video websites and offers more features as well.

BTW, on Stretch I recommend pip to install and update youtube-dl.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

di512
Posts: 37
Joined: Mon Oct 24, 2016 4:24 pm

Re: youtube-dl

Sun Dec 10, 2017 4:40 pm

youtube-dl -U
"It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update."

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: youtube-dl

Sun Dec 10, 2017 9:15 pm

di512 wrote:
Sun Dec 10, 2017 4:40 pm
youtube-dl -U
"It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update."
I wonder how it makes that determination.

Anyway, it's always worked for me - and I never used any of those "package managers" with youtube-dl.

So, I'd just go to the youtube-dl site, get the latest version from there, and then keep it updated thereafter using "-U". That's what I would do...
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

DirkS
Posts: 10313
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: youtube-dl

Sun Dec 10, 2017 10:12 pm

di512 wrote:
Sun Dec 10, 2017 4:40 pm
youtube-dl -U
"It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update."
Try

Code: Select all

sudo pip install --upgrade youtube-dl

ahmed24
Posts: 10
Joined: Sat Dec 07, 2013 12:49 pm

Re: youtube-dl

Mon Sep 24, 2018 1:16 pm

n67 wrote:
Sun Dec 10, 2017 9:15 pm
di512 wrote:
Sun Dec 10, 2017 4:40 pm
youtube-dl -U
"It looks like you installed youtube-dl with a package manager, pip, setup.py or a tarball. Please use that to update."
Anyway, it's always worked for me - and I never used any of those "package managers" with youtube-dl.

So, I'd just go to the youtube-dl site, get the latest version from there, and then keep it updated thereafter using "-U". That's what I would do...
Sorry to bring up an old topic. But just came across this thread. I am in the process of setting up a Pi so that I can run Youtube-dl on it. I plan to have youtube-dl commands run on cron jobs. What's the best way to install youtube-dl? For all my youtube-dl cron commands shall I run it with the -U in the syntax? does that mean every download i make it will first check to see if the youtube-dl is latest and if not it will download latest version and overwrite the old version? Does it do this before downloading the actual video/audio?

From this thread I understand that if I use a package installer to install it then the -U won't work so I want to make sure I install it properly. Can I not just download the files and place it in a location and then just run the syntax?

And finally, what is the most lightweight version of the Pi OS I can get without too much on it as I just plan to use it as a webserver and downloading youtube. I don't want too much UI taking up resources.

gkreidl
Posts: 6281
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: youtube-dl

Mon Sep 24, 2018 2:30 pm

I would recommend using the pip install method. youtube-dl starts about 4-5 seconds faster compared to the fake binary which you can download from the youtube-dl website.
To update it, you can run the install command again with an additional "--upgrade".
For you purpose a Raspbian Light installation might work.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ahmed24
Posts: 10
Joined: Sat Dec 07, 2013 12:49 pm

Re: youtube-dl

Mon Sep 24, 2018 4:42 pm

gkreidl wrote:
Mon Sep 24, 2018 2:30 pm
I would recommend using the pip install method. youtube-dl starts about 4-5 seconds faster compared to the fake binary which you can download from the youtube-dl website.
To update it, you can run the install command again with an additional "--upgrade".
For you purpose a Raspbian Light installation might work.
Sorry forgive me if this has been answered already but how do I use the pip install method immediately after installing a fresh rasbian light os?

To update youtube-dl with the upgrade syntax should I run that on a separate from job when it's not dealing with downloading MP3 ? I presume I don't need to run --uograde everytime. Once a week should be ok? How often does it actually update and if it falls behind in terms of update does it stop working? I'm assuming that updating it keeps it working considering YouTube is always changing with things like the signature and cipher of videos?

gkreidl
Posts: 6281
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: youtube-dl

Mon Sep 24, 2018 5:07 pm

ahmed24 wrote:
Mon Sep 24, 2018 4:42 pm
gkreidl wrote:
Mon Sep 24, 2018 2:30 pm
I would recommend using the pip install method. youtube-dl starts about 4-5 seconds faster compared to the fake binary which you can download from the youtube-dl website.
To update it, you can run the install command again with an additional "--upgrade".
For you purpose a Raspbian Light installation might work.
Sorry forgive me if this has been answered already but how do I use the pip install method immediately after installing a fresh rasbian light os?

To update youtube-dl with the upgrade syntax should I run that on a separate from job when it's not dealing with downloading MP3 ? I presume I don't need to run --uograde everytime. Once a week should be ok? How often does it actually update and if it falls behind in terms of update does it stop working? I'm assuming that updating it keeps it working considering YouTube is always changing with things like the signature and cipher of videos?
I usually upgrade youtube-dl once per month.
I have never used Raspbian Lite and so I don't know what it contains. Make sure, that python-pip is installed. For some functions youtube-dl requires ffmepg. You should install it if it is missing in Raspbian Lite.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ahmed24
Posts: 10
Joined: Sat Dec 07, 2013 12:49 pm

Re: youtube-dl

Tue Sep 25, 2018 1:30 pm

So is the pip youtube-dl python based? because the stand-alone one if i'm not mistaken isn't right?

gkreidl
Posts: 6281
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: youtube-dl

Tue Sep 25, 2018 2:19 pm

ahmed24 wrote:
Tue Sep 25, 2018 1:30 pm
So is the pip youtube-dl python based? because the stand-alone one if i'm not mistaken isn't right?
No, youtube-dl is written in Python. The "fake binary" contains all the (1000+) modules zipped into a single file. They are not "precompiled" to pyc files (so they are platform independent) which results in a long start time on the RPi.
The module package installed via pip contains (or creates) all .pyc files and starts much faster.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ahmed24
Posts: 10
Joined: Sat Dec 07, 2013 12:49 pm

Re: youtube-dl

Tue Sep 25, 2018 2:33 pm

gkreidl wrote:
Tue Sep 25, 2018 2:19 pm
ahmed24 wrote:
Tue Sep 25, 2018 1:30 pm
So is the pip youtube-dl python based? because the stand-alone one if i'm not mistaken isn't right?
No, youtube-dl is written in Python. The "fake binary" contains all the (1000+) modules zipped into a single file. They are not "precompiled" to pyc files (so they are platform independent) which results in a long start time on the RPi.
The module package installed via pip contains (or creates) all .pyc files and starts much faster.
Thank you. So if I load a standard Rasbian OS for example, should pip already be on there? Should I be able to just run syntax: sudo -H pip install --upgrade youtube-dl

gkreidl
Posts: 6281
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: youtube-dl

Tue Sep 25, 2018 3:22 pm

ahmed24 wrote:
Tue Sep 25, 2018 2:33 pm
Thank you. So if I load a standard Rasbian OS for example, should pip already be on there? Should I be able to just run syntax: sudo -H pip install --upgrade youtube-dl
AFAIK, pip is part of a full Raspbian installation.
You should install youtube-dl system wide with:
sudo pip install youtube-dl
(no "-H").
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

jonesypeter
Posts: 108
Joined: Fri Aug 02, 2013 3:07 pm

Re: youtube-dl

Sat Jul 13, 2019 4:45 pm

It does sometimes appear that occasionally users accidentally answer questions without testing on a Raspberry Pi first.

If you are using the full desktop experience of Raspbian pip3 will already be installed. If you are using the 'Lite' version, install pip3 with:

Code: Select all

sudo apt-get install python3-pip
Reference:
https://www.raspberrypi.org/documentati ... /python.md

Next install Youtube-DL with:

Code: Select all

sudo pip3 install youtube-dl
You can check for updates with:

Code: Select all

sudo pip3 install --upgrade youtube_dl
This uses Python3. If you still use Python2 just change references of pip3 to pip

Use the code below to check the version:

Code: Select all

[email protected]:~ $ youtube-dl --version
2019.07.12
To download a video to test (The highest quality is picked by default):

Code: Select all

youtube-dl https://www.youtube.com/watch?v=0wj8ueoUjt8
You can then play this back with VLC, OMXPlayer or similar.

Return to “Raspberry Pi OS”