Download from YouTube by drag n' drop

Moderator: Forum moderators

Post Reply
User avatar
fredx181
Posts: 2526
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 265 times
Been thanked: 968 times
Contact:

Download from YouTube by drag n' drop

Post by fredx181 »

*** Download from YouTube by drag n' drop url links ***
=================================================================
Update 2022-12-19, fixed that when the video "id" starts with a "-" (dash) that downloading didn't work.
Replaced attachment ytdl-dnd below.
----------------------------------------------------------
Note ytdl-dnd makes use of youtube-dl, which hasn't been updated for a year, download speed is very slow.
There's a fork of youtube-dl yt-dlp (regularly updated) which fixes that problem.
Downside may be that it works only with python3 (not with python2).
Attached below also ytdlp-dnd which makes use of yt-dlp instead of youtube-dl
To download and install yt-dlp, from terminal:

Code: Select all

curl -k -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
chmod a+rx /usr/local/bin/yt-dlp

=================================================================

Here's ytdl-dnd script attached, running the script there will appear a small box in the upper left corner, drag n' drop youtube links onto it to download a video.
(see demo, animated .gif below)
Remove fake .gz from attached file: ytdl-dnd.gz and make executable:

Code: Select all

chmod +x ytdl-dnd

Required to have installed: yad, youtube-dl, python2 or python3 (for youtube-dl) and (optional) ffmpeg.
Download yad v0.40 pet packages, see here: viewtopic.php?p=9063#p9063

If not already installed youtube-dl, install:

Code: Select all

curl -L https://youtube-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
chmod a+rx /usr/local/bin/youtube-dl   # make executable

NOTE: On very new systems, e.g. FossaPup, python will probably be installed, but /usr/bin/python may not exist (only /usr/bin/python3)
Then youtube-dl won't work because it looks for /usr/bin/python, to fix, make a symlink python to python3:

Code: Select all

cd /usr/bin; ln -s python3 python

For quality choices, except "Medium" and "High", ffmpeg is required to be installed.
(for merging Audio/Video)

Usage is easy, just drag n' drop any youtube link onto the little box and make your choices for quality and download location:

drag and drop youtube links
drag and drop youtube links
ytdl-dnd.gif (318.03 KiB) Viewed 1193 times

Fred

Attachments
ytdl-dnd.gz
Update 2022-12-19
Remove fake .gz and make executable
(11.18 KiB) Downloaded 42 times
ytdlp-dnd.gz
Remove fake .gz and make executable
(11.02 KiB) Downloaded 36 times
User avatar
fredx181
Posts: 2526
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 265 times
Been thanked: 968 times
Contact:

Re: Download from YouTube by drag n' drop

Post by fredx181 »

Bugfix for ytdl-dnd and added ytdlp-dnd script (the latter makes use of yt-dlp, a fork of youtube-dl, which is frequently updated).
See "Update 2022-12-19" at first post.

keniv
Posts: 624
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 95 times
Been thanked: 64 times

Re: Download from YouTube by drag n' drop

Post by keniv »

@fredx181
Just tried ytdlp-dnd which works for me in that it downloads a youtube video. It's very like one part of youtube-get which I also use. However, I was a little confused initially as I thought it was going to be an upgrade of yt-dnd which you posted here viewtopic.php?t=1523&sid=26f68aaee78b62 ... 7&start=10 sixth post down. This does not allow downloading of a youtube video but does allow it to be played without adds which I also find very useful. Would you consider updating this to a dlp version. If this would be a great deal of work or you consider it unnecessary please ignore this request.

Regards,

Ken.

User avatar
fredx181
Posts: 2526
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 265 times
Been thanked: 968 times
Contact:

Re: Download from YouTube by drag n' drop

Post by fredx181 »

keniv wrote:

I thought it was going to be an upgrade of yt-dnd which you posted here viewtopic.php?t=1523&sid=26f68aaee78b62 ... 7&start=10 sixth post down

Don't understand why that one needs to be updated, it doesn't make use of youtube-dl or yt-dlp, just the browser is used (defaultbrowser if I'm right) to play the video,
Yeah, it's confusing, all those names that look alike at first sight ;)

keniv
Posts: 624
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 95 times
Been thanked: 64 times

Re: Download from YouTube by drag n' drop

Post by keniv »

fredx181 wrote: Mon Dec 19, 2022 5:00 pm

Don't understand why that one needs to be updated, it doesn't make use of youtube-dl or yt-dlp,

Ah, I didn't realise that and it works perfectly well just now so no need for an update.

Regards,

Ken.

Post Reply

Return to “Browsers and Internet”