WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: youtube downloader discussion  (Read 4794 times)

aus9

  • Guest
youtube downloader discussion
« on: May 02, 2023, 07:58:41 AM »
Hi

recently I looked at youtube-dl and altho it has update compared to our version in Apps, its still old at 17 Dec 2021.
also my skills in python are not great.
AND the web says its often throttled

However I just tested yt-dlp from my $HOME/.local/bin and its a beauty.

Also gadget42 mentions it http://forum.tinycorelinux.net/index.php/topic,25474.msg163402.html#msg163402

It has a similar NO licence to youtube-dl so I think I will package it.

But is there something better?

2) if its a video download  result is a webm....visuals appear for me in vlc but only plays in qmplay2. Only tested 2 players sorry
if I use -x to download audio only....result is opus and plays well in both players YMMV

3) you can download it and load python3(something) ...stick it in $HOME/.local/bin and run it like this
Code: [Select]
cd Downloads
python3  yt-dlp https://youtu.be/fS4Jd9nhj7U

or put -x between yt-dlp and url to download the audio only

YMMV
« Last Edit: May 02, 2023, 08:00:12 AM by aus9 »

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 749
Re: youtube downloader discussion
« Reply #1 on: May 02, 2023, 11:59:41 AM »
Sir,

There could well be other Linux based apps as clients for youtube
and as clients for youtube downloading.

.......i did detail a simple way to do "youtube downloading and youtube searching" via a simple TEXT only web browser........ such as the "Links" web browser.....

Once found, you can then play the resulting  youtube movie or download it or  download it's audio...... you can then play it  using the free "FFPLAY" media player which is inside FFMPEG on Linux.

so.........

(a)
For doing an identical YOUTUBE search as happens on the YT native web site
you can go here ....
"www.tonvid.com" and search for any movie
 using  a "text only" web browser and a movie keyword

(b)
You can then COPY THE LINK of the video of choice from your searching in (a)
and paste it into this site...
www.genyt.net
and click search.
Click the resulting FOUND video.
Then click "generate download links"


(c)  RIGHT CLICK any download link that interests you from (b)
and go "SAVE or DOWNLOAD the movie file." giving it a name.


Should you just want to  DIRECTLY STREAM & WATCH the movie link from (b) in "FFPLAY" media player then.....
 
1) RIGHT CLICK the download link of (b) and go "DISPLAY"
and then....
2) Go to the menu of the "text only" web browser under BOOKMARKS
click  "ADD THE CURRENT PAGE" as a bookmark
3) Then Open the Tinycore text editior tool and under HOME
directory you should eventually  see the "LINKS" folder if you clicked "SHOW HIDDEN FILES"
4) click the LINKS FOLDER and you should see the "bookmarks" file.
5) Open that "bookmarks" file in the text editor and you will see your movie URL LINK ADDRESS of your interest ......
6) Copy that URL link using highlight and copy..... then MIDDLE CLICK to paste
the URL into an FFPLAY media player terminal........and then PLAY the movie

thanks
C


ps.........below is the FFPLAY media player command i would use to play stuff...

(at the terminal prompt)........
ffplay -fast -framedrop -cpuflags -sse+sse2+sse3+sse4.1+sse4.2+mmx+avx -threads auto -x 195 -y 158 -hide_banner -sync audio "the movie link.mp4"
(if it's just audio you are playing add the "-vn" and "-nodisp" flags

.....Also, your CPU flags may vary as it depends on your CPU type.....for example, a Raspberry Pi arm CPU may be

ffplay -fast -framedrop -cpuflags -armv6+something+somethin etc............bla bla bla

thx
C
« Last Edit: May 02, 2023, 12:30:12 PM by vinceASPECT »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 673
Re: youtube downloader discussion
« Reply #2 on: May 02, 2023, 01:18:23 PM »
I think you can use youtube-dl and update it with just like this.
It will update it self.

Code: (bash) [Select]
youtube-dl -U

-U, --update      Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)

Offline CNK

  • Full Member
  • ***
  • Posts: 235
Re: youtube downloader discussion
« Reply #3 on: May 02, 2023, 04:26:25 PM »
The last youtube-dl release broke with YouTube a while ago, but has been fixed in the development version. I just unziped the release file and applied the fix manually (as described in a GitHub issue thread) because it's just one line. There are also "nightly" type "build" of the executable zip file available.

The video format options for a video URL are shown with the "-F" option, then specified when downloading with "-f [format ID]". For YouTube I always use "-f 18" and get usable video+audio at a relolution that's good enough for me.

aus9

  • Guest
Re: youtube downloader discussion
« Reply #4 on: May 02, 2023, 04:36:50 PM »
hi
Quote
The last youtube-dl release broke with YouTube a while ago
that would explain a bit eh?

Quote
I think you can use youtube-dl  and update it
Yes I know this but my question was is there something better

Hi  vinceASPECT
I can search YT using qmplay2, and I am ex MS so prefer GUI over text browsers.

To anyone,
Code: [Select]
yt-dlp -h as a swag of options so I will wait a few more days for a better alternative and if there is nothing faster, easier etc to use....I think I will go with this, so anyone who wants to maintain youtube-dl be my guest.

thanks for reading

« Last Edit: May 02, 2023, 04:38:46 PM by aus9 »

aus9

  • Guest
Re: youtube downloader discussion
« Reply #5 on: May 02, 2023, 06:11:31 PM »
Ok it looks like old youtube movies were mp4, while newer ones are webm format YMMV
 and I have rebooted to test no certificates so in $HOME/.local/bin  I do
Code: [Select]
python3 yt-dlp --no-check-certificate https://youtu.be/V-oquRLcmAM
# result is mp4 but
python3 yt-dlp --no-check-certificate https://youtu.be/L51wnCLOd4g
# result webm
# found on net converter command, ffmepg4 is a dep of qmplay2
ffmpeg -i aaron.webm  -c copy aaron.mp4

also the help needs python prefixed
Code: [Select]
python3 yt-dlp -honline help
https://github.com/yt-dlp/yt-dlp#readme

so this is interesting to me...find formats that you could download
Code: [Select]
python3 yt-dlp --no-check-certificate --list-formats https://youtu.be/V-oquRLcmAM
SNIP
ID  EXT   RESOLUTION FPS CH ���  FILESIZE  TBR PROTO ��� VCODEC       VBR ACODEC      ABR ASR MORE INFO
250 webm  audio only      2 ���   2.79MiB  71k dash  ��� audio only       opus        71k 48k low, webm_dash
140 m4a   audio only      2 ���   4.99MiB 127k dash  ��� audio only       mp4a.40.2  127k 44k medium, m4a_dash
SNIP to show only 2 audio

and then I do
Code: [Select]
python3 yt-dlp --no-check-certificate -f 140 https://youtu.be/V-oquRLcmAMresult is m4a format rather than choosing -f 250 to have opus....as TBR is higher for 140
« Last Edit: May 02, 2023, 06:37:15 PM by aus9 »

Offline CNK

  • Full Member
  • ***
  • Posts: 235
Re: youtube downloader discussion
« Reply #6 on: May 02, 2023, 06:55:37 PM »
so this is interesting to me...find formats that you could download
Code: [Select]
python3 yt-dlp --no-check-certificate --list-formats https://youtu.be/V-oquRLcmAM
SNIP
ID  EXT   RESOLUTION FPS CH ���  FILESIZE  TBR PROTO ��� VCODEC       VBR ACODEC      ABR ASR MORE INFO
250 webm  audio only      2 ���   2.79MiB  71k dash  ��� audio only       opus        71k 48k low, webm_dash
140 m4a   audio only      2 ���   4.99MiB 127k dash  ��� audio only       mp4a.40.2  127k 44k medium, m4a_dash
SNIP to show only 2 audio
Those are available from youtube-dl as well (this is the "-F" option that I mentioned before).

Anyway, I'm not sure what you think is better (I'm sticking with youtube-dl myself, and I'll think about submitting an updated TC extension for it if you're no longer maintaining that), but I guess that if you like GUIs then pipe-viewer might be better for you. It has GTK3 GUI and terminal interfaces, and the YouTube downloader is built in. It's written in Perl instead of Python.

aus9

  • Guest
Re: youtube downloader discussion
« Reply #7 on: May 02, 2023, 07:29:10 PM »
playing further with formats be aware of mp4_dash format. This does not play natively in vlc or qmplay2
so if you found a high TBR but shows mp4_dash on right hand side eg
Quote
                                                                            TBR
137 mp4   1920x1080   25    ���  135.27MiB 3508k dash  ��� avc1.640028   3508k video only     1080p, mp4_dash

so you are better off IMHO just download it as a webm and convert it if your player does not know how to play that format.

Hi CNK
I will check it pipe-viewer
Yes please update youtube-dl if you are happy to.

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 749
Re: youtube downloader discussion
« Reply #8 on: May 03, 2023, 01:05:34 AM »
HEllo,

it seems that even the free "youtube-dl" tool on MSoft is a 2021 version Latest.....2 years old and it does not seem to work

hmmm
thx
C

aus9

  • Guest
Re: youtube downloader discussion
« Reply #9 on: May 03, 2023, 02:02:34 AM »
Hi CNK

I started on the perl module make dependencies showing up
pipe-viewer
and even tho I have not finished I have made up my mind after reading various build.logs on the actual run dependences,
that a perl based youtube downloader is not for me.
Actually the web site does not describe it as a downloader...rather it claims  for searching and playing videos from YouTube.
so far I have successfully used cpanm to get modules as per
Quote
# instmodsh -> input l for list gives
# Installed modules are:
# B::COW     # Clone     # Data::Dump     # Date::Parse    # Encode::Locale   # File::Listing
# HTML::Parser   # HTML::Tagset   # HTTP::Cookies   # HTTP::Daemon  # HTTP::Date   # HTTP::Message
# HTTP::Negotiate  # IO::HTML  # IO::Socket::SSL  # JSON. # LWP  # LWP::MediaTypes  # LWP::Protocol::https
# Mozilla::CA  # Net::HTTP  # Net::SSLeay  # Perl  # Test::Fatal  # Test::Needs  # Test::RequiresInternet
# Test::Warnings  # Try::Tiny  # URI   # WWW::RobotRules

at my skill level....and patience ...I think yt-dlp is much simpler to build and good enough for me.

2) I am not sure if I made myself clear in last post....movies that are mp4_dash -> output as file.mp4
but in qmplay2 or vlc....the video image displays but not audio out
« Last Edit: May 03, 2023, 02:16:13 AM by aus9 »

aus9

  • Guest
Re: youtube downloader discussion
« Reply #10 on: May 03, 2023, 02:12:11 AM »
Hi vinceASPECT
yes that is an issue for MS users too.

I am more concerned that youtube-dl has in the past been throttled in speed making it unworkable for an impatient person.
I do not have that issue for my new toy.

If interested you can try the ELF stand alone or python dependency versions of yt-dlp

stand alone
https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux
move it to your $HOME/.local.bin ensure it executable and run it as
Code: [Select]
yt-dlp <url>
python dependency such as python3.9  needs loading
https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
its a script does so no need to do anything other than load python3.9 and run it as above in my posts

for MS there is mention of a Win7 but not sure if that will work on say Win10/11

good luck

aus9

  • Guest
Re: youtube downloader discussion
« Reply #11 on: May 03, 2023, 06:24:45 PM »
Hi vinceASPECT
correction for
Quote
Its a script does so no need to do anything other than load python3.9 and run it as above in my posts

nope, make script executable and  below should work
Code: [Select]
$ yt-dlp --no-check-certificate <url>
or load ca-certificates and drop the --no-check-certificate string

I am sending a package submission off shortly so if you like, wait for that?

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 749
Re: youtube downloader discussion
« Reply #12 on: May 04, 2023, 02:08:06 AM »
Aus 9

well it would always be useful to have an extension in the repo
that is a Youtube-DL alternative.

here this machine runs the Tinycore 64 build........so i don't know
if your extension would appear in that repo..

thanks
C

aus9

  • Guest
Re: youtube downloader discussion
« Reply #13 on: May 05, 2023, 01:33:06 AM »
Hi vinceASPECT
yes TC64 14x is what has been submitted

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 749
Re: youtube downloader discussion
« Reply #14 on: May 05, 2023, 07:14:18 AM »
Yes, Sir,

......there are some minor "wrongs" in my post on  Youtube videos
via a text only web browser.   (reply #1 .......in this thread topic)
 

......some of the STEPS are "press enter" when a movie link is highlighted......not RIGHT CLICK

To grab the URL from the "bookmark.html" TEXT FILE you just "search" the file for the movie file extension.........for example.......".mp4" ........
Everything Back from the "mp4" to "HTTP" is the URL link for the movie of your choice.......
 ......... (at least a paragraph long URL )

you can just use common sense.

Also users can DROP the X -- Y flags for sizing the Video window in FFPLAY
media player.......just let it be  whatever size it will be

Thanks
C


« Last Edit: May 05, 2023, 07:24:56 AM by vinceASPECT »