Youtube downloads

That is a sweet way of recording and it worked.
Thank you Kieran.

YouTube correct addresses are either https:// www.youtube. com/watch?v= N-yALPEpV4w or (as common on Android): https:// youtu.be/ N-yALPEpV4w as @uzanto kindly recommended. Both prefixes for any particular YouTube video title within Terminal work fine. Learning from TRY and ERROR (before giving up) is usually just fine with me (when having time to play around), as there is nothing wrong with this command-line “tool”. man youtube-dl says: “It is released to the public domain, which means …”

$ cd VideoDownloadFolder
$ youtube-dl correct://youtu.be_or_other_video_platforms/title

1 Like

I used SS method to directly download videos , but depends on format you want.

I use video downloader professional as a firefox extension. It downloads videos from almost any site.

On Android I’ve tested SkyTube and NewPipe and my conclusions are that for playing videos in background (audio) the former is much better than the latter.

As for desktop, I tested many solutions, but for my purposes only a few were workable:

  • “Easy Youtube Video Downloader Express” firefox plugin: works well but has some limitations in free version; it also doesn’t allow downloading multiple videos (like yt channels/playlists) on one click
  • “Any Video Converter for Mac”: in general works well but sometimes it has problems and again, it doesn’t support yt channels links for multiple videos
  • “youtube-dl”: the only disadvantage (for some) is that it’s command line tool written in python but besides that there are only pros and it’s the best of all tools I’ve tested; it can download multiple videos on one link (yt channels/playlists), you can download subtitles/descriptions/thumbnails, you can choose resolution, you can freely choose the output video/audio format and lastly it supports not only youtube but also other, known video services like vimeo and others. For those not supported websites, if you are technical enough to locate a video stream url in browser developer tools, you can use it with youtube-dl to download a video file. The program is actively developed so if Youtube team make some changes to the protocol, to cut off those video downloading tools, the ytdl team has a fix in a matter of hours.

if you install MPV (media player) then i think it auto-presents you with ‘youtube-dl’ with the main package. that’s how it is on GNU/Linux distros’. other OSes might be different.

Recently, I needed a Youtube downloader for a loved one, but didn’t want the browser-plugins. Linux UIs for youtube-dl I found seemed outdated / abandoned. So… I remembered @Kyle_Rankin’s Easy Librem 5 App Development series using yad, and gave it a shot.

https://codeberg.org/caliga/DownStream

Feel free to test in on the L5, I’m still waiting :upside_down_face:

One piece that’s missing for this and similar things is a mechanism to share (share) things like on android.
One simple way to do that would be to have a share button in the phosh-dropdown. On tapping, it would analyze the clipboard content and provide a list of apps/actions/intents that can handle the thing (text/url/image/…) Is something like that planned, @dcz, @guido.gunther ?

So, in summary, you would…

  • copy URL in browser
  • swipe down, tap share
  • select DownStream
  • tap OK

Hm… :thinking: instead, maybe the swipe-up menu could have two ways of being opened:
Swipe in the left corner (share icon) and it will only show apps that can handle (are registered for) the current clipboard content. That icon would only be there if there’s anything in the clipboard. Thus, the menu could also include a mechanism to manage/clear the clipboard content.

5 Likes

I just want to chime in here and share my workflow for YouTube downloads.

In a terminal, I would suggest that you install the following packages with the command below:

  • youtube-dl
  • ffmpeg
  • atomicparsley
  • tor

sudo apt install youtube-dl ffmpeg atomicparsley tor

I think that ffmpeg is installed by default in Debian and PureOS, but it is safe to include it in the manual install command above just to make sure that it is installed. The youtube-dl command is the main package to download video and audio content from YouTube and many other sites across the web, and ffmpeg is needed by youtube-dl in order to automatically stitch together audio and HD video that is 1080 or greater. The atomicparsley package is useful if you would like to use some of the options for youtube-dl to attach the video thumnail or meta-data into the final video download.

The tor package for terminal can be necessary in order to download videos when YouTube or whatever other video hosting site blocks your IP address. To do this, you just need to add “torsocks -i” before the youtube-dl command, as shown below:

youtube-dl [options] [video url that you want to download]
torsocks -i youtube-dl [options] [video url that you want to download]

You can always run the following command to check out all the options for youtube-dl:

youtube-dl -h
or
youtube-dl --help

1 Like

Hah, I just noticed that I didn’t mention that above bash-scipt+yad+GUI is, of course, a simple youtube-dl wrapper. (fixed)

Basically, it gives you these benefits

  • a simple solution if you do fear the command line :wink:
  • convenience for occasional downloads that don’t require special options (even if you don’t fear the command line)
  • a lot of convenience if you are on a mobile phone, even if you like the command line :wink:
1 Like

Would it be asking a lot to request an audio-only option in your GUI?

1 Like

I should have mentioned that in Debian linux, you cannot install youtube-dl using the standard sudo apt install command. So instead, I use the following:

sudo apt install python3-pip

sudo pip3 install --upgrade youtube-dl

https://tracker.debian.org/pkg/youtube-dl

The latest youtube-dl version in Buster and Bullseye is: 2021.06.06 and it works

Oh, well that is wonderful news to me. Thank you for letting me know. It has been a while since I have set it up on various devices and in Qubes, so I thought that pip was still necessary.

I’ll test this out

1 Like

I was already thinking about it :slight_smile: shouldn’t be hard.
We’ll see when I get to it.

2 Likes

Audio-only options added (quality menu)
Also, while implementing this, fixed an embarrassing bug and now actually use the edited title and quality selection :blush: (I just had forgotten to implement that part somehow…)

4 Likes

#stealthRickRoll
:rofl:

4 Likes

:stuck_out_tongue_winking_eye:
Btw, just now that this is working pretty well I noticed that you had tested Video Downloader, which is of course more powerful.

Although, DownStream does have advantages for occasional phone use:

  • light weight
  • auto-pastes clipboard url
  • exits when done
2 Likes

What does sed -i "s/purism/$USER/g" DownStream.desktop “do?” I’m not familiar with it.

2 Likes

It replaces purism with your username, which is purism on the L5… Thus, you can safely skip that step there.

2 Likes