YT-DLP

Eure Tipps zu nützlichen Programmen und Links

Moderator: jNizM

garry
Posts: 3763
Joined: 22 Dec 2013, 12:50

YT-DLP

Post by garry » 06 Dec 2021, 14:15

https://github.com/yt-dlp/yt-dlp#update
https://ffmpeg.org/download.html#build-windows

youtube-dl.exe war sehr langsam, kein update mehr seit 2021-06-06, hier yt-dlp.exe mit fast den gleichen Befehlen
hier ein Test-skript ( für Video nur ein file > yt-dlp und für Musik > yt-dlp / ffmpeg / ffprobe / ffplay

short:
-YT-dlp.exe / ffmpeg.exe
https://github.com/yt-dlp/yt-dlp#update
https://ffmpeg.org/download.html#build-windows
for youtube use like :
MP4 :
RunWait, %comspec% /k yt-dlp %url% --encoding UTF-8 -o "%foldername%\`%(title)s$`%(uploader)s$`%(id)s.`%(ext)s"
MP3 :
RunWait, %comspec% /k yt-dlp %url% -x --audio-format mp3 --audio-quality 320k --youtube-skip-dash-manifest --embed-thumbnail -o "%foldername%\`%(title)s$`%(uploader)s$`%(id)s.`%(ext)s" ;- needs ffmpeg.exe
or download a M3U8 file :
RunWait, %comspec% /k yt-dlp %url% -o %foldername%\%filename%.mp4 ;- needs ffmpeg.exe

Code: Select all

;- yt-dlp.exe for test / download youtube or dailymotion etc ... as MP4 or MP3
;- creates a folder at desktop > \M_VIDEO_AUDIO  ( downloaded MP3 or MP4 is here )
;======================================================================================
;-
;- https://github.com/yt-dlp/yt-dlp#update
;- https://github.com/yt-dlp/yt-dlp
;- https://write.corbpie.com/downloading-youtube-videos-and-playlists-with-yt-dlp/
;- https://youtube-dl.org/latest/youtube-dl.exe      ( replaced with yt-dlp / no update since 2021-06-06 )
;- https://ffmpeg.org/download.html#build-windows    ( needed for MP3 / 7zip-file)
;-
;--
fdpro1:=a_scriptdir . "\YT_programs1"   ;- here only yt-dlp.exe ( for VIDEO / don't get MP4  with ffmpeg  (?) )
ifnotexist,%fdpro1%
  filecreatedir,%fdpro1%
;-
fdpro2:=a_scriptdir . "\YT_programs2"   ;- here yt-dlp-exe ffmpeg.exe  ffprobe.exe ( for MP3 )
ifnotexist,%fdpro2%
  filecreatedir,%fdpro2%
;-
;-
youtubedl1:=fdpro1 . "\yt-dlp.exe"      ;- only yt-dlp.exe ( for VIDEO MP4 )
youtubedl2:=fdpro2 . "\yt-dlp.exe"      ;-                 ( for AUDIO MP3 )
;-
ifexist,%youtubedl1%
 {
 loop,%youtubedl1%        
   SP1:=A_loopFileShortPath
 ;RunWait, %comspec% /k %sp1% -U     ;- Update
 }
;-
ifexist,%youtubedl2%
 {
 loop,%youtubedl2%        
   SP2:=A_loopFileShortPath
 ;RunWait, %comspec% /k %sp2% -U     ;- Update
 }
else
 {
 F0:="https://youtube-dl.org/latest/youtube-dl.exe"
 F1:="https://github.com/yt-dlp/yt-dlp#update"
 F2:="https://ffmpeg.org/download.html#build-windows"
 run,%f1%
 run,%f2%
 return
 }
;-----

;--
fdmpx:=a_desktop . "\M_VIDEO_AUDIO"
ifnotexist,%fdmpx%
  filecreatedir,%fdmpx%
;--
;-------------------------------------------------------------------

url:="https://www.youtube.com/watch?v=PtzaMHjf_3Q"  ;- A mouse divided 1953 cartoon
;url:="https://www.dailymotion.com/video/x6bap58"    ;- Maitetxu mia - lilian de celis
;---------------
;==============
;-- VIDEO >
{
Runwait, %comspec% /k %sp1% %url% --encoding UTF-8 --verbose --youtube-skip-dash-manifest -o "%fdmpx%\`%(title)s-`%(uploader)s-`%(id)s.`%(ext)s"
;- create xy.vtt file if subtitle exist
;RunWait, %comspec% /k %sp1% %url% --encoding UTF-8 --verbose --youtube-skip-dash-manifest -k --write-auto-sub --sub-lang de -o "%fdmpx%\`%(title)s$`%(uploader)s$`%(id)s.`%(ext)s"
}
;-- MUSIC >
;RunWait, %comspec% /k %sp2% %url% -x --audio-format mp3 --audio-quality 320k --encoding UTF-8 --embed-thumbnail --youtube-skip-dash-manifest -o "%fdmpx%\`%(title)s$`%(uploader)s$`%(id)s.`%(ext)s" ;- needs ffmpeg.exe
return
;=================================================================================
Last edited by garry on 28 Jan 2022, 13:56, edited 2 times in total.

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: YT-DLP

Post by BoBo » 07 Dec 2021, 14:18

@garry - Wodurch sollte sich eine Performanceeinbuße von youtube-dl ergeben?
Der Download dürfte durch die Übertragungsgeschwindigkeit gedeckelt sein, oder?
Und seltene Updateintervalle kann man/frau auch als Qualitätsbeweis verstehen: never change a running system ;)

garry
Posts: 3763
Joined: 22 Dec 2013, 12:50

Re: YT-DLP

Post by garry » 07 Dec 2021, 16:59

Code: Select all

Und seltene Updateintervalle kann man/frau auch als Qualitätsbeweis verstehen: never change a running system ;)
@BoBo , danke bin der gleichen Meinung
habe uralte standalone Programme welche noch einwandfrei funktionieren
aber in diesem Fall ist bei mir youtube-dl extrem langsam
Download-Zeit 04:23 youtube-dl
Download-Zeit 00:08 yt-dlp
MP4-Datei Spieldauer = 06:52 , bei beiden Size=21'912-KB
Test-URL:="https://www.youtube.com/watch?v=PtzaMHjf_3Q" ;- A mouse divided 1953 cartoon

Code: Select all

;--- YT-DLP.exe   :

[debug] Command-line config: ['https://www.youtube.com/watch?v=PtzaMHjf_3Q', '--encoding', 'UTF-8', '--verbose', '--youtube-skip-dash-manifest', '-o', 'C:\\Users\\GARRY\\Desktop\\M_VIDEO_AUDIO\\%(title)s-%(uploader)s-%(id)s.%(ext)s']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2021.12.01 [91f071a] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19042-SP0
[debug] exe versions: none
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=PtzaMHjf_3Q
[youtube] PtzaMHjf_3Q: Downloading webpage
[youtube] PtzaMHjf_3Q: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: best/bestvideo+bestaudio
[info] PtzaMHjf_3Q: Downloading 1 format(s): 18
[debug] Invoking downloader on "https://r4---sn-nfpnnjvh-1gir.googlevideo.com/videoplayback?expire=1638934695&ei=R9SvYduBLI2F1wL4mo7oCw&ip=2a02%3A1206%3A4524%3Aa00%3A89c2%3Ab8bb%3A990e%3Aeb8a&id=o-AEcInfOPEXk1A-VR-fe8puLhrb4BYX5EbmmG-m2d19F7&itag=18&source=youtube&requiressl=yes&mh=Bo&mm=31%2C29&mn=sn-nfpnnjvh-1gir%2Csn-1gieen7e&ms=au%2Crdu&mv=m&mvi=4&pl=45&initcwndbps=1811250&vprv=1&mime=video%2Fmp4&gir=yes&clen=22437638&ratebypass=yes&dur=412.827&lmt=1621076746739667&mt=1638912813&fvip=3&fexp=24001373%2C24007246&c=ANDROID&txp=5310222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAI1hZcIfqJv733-HRpV-mLGwJNB9oN9UBbRalBvZ6GT_AiEA7VsJ1c136PyjlEVvzTJkbfiUoPnaHXZcaCh7HR0SG7Y%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAJ8K6ChDw9aJZTcYyQ4FAQ5TGE7Ln6G37HXnAOmmdbdNAiEAh_H053-vL7ljxaI5DboXmsvTXUxjuhz7XS3TT1_hRzY%3D"
[download] Destination: C:\Users\GARRY\Desktop\M_VIDEO_AUDIO\Looney Tunes _ A Mouse Divided 1953-Media Core-PtzaMHjf_3Q.mp4
[download] 100% of 21.40MiB in 00:08

C:\Users\GARRY\Desktop\YT-DLP>


;--- YOUTUBE-DL.exe   :

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=PtzaMHjf_3Q', '--encoding', 'UTF-8', '--verbose', '--youtube-skip-dash-manifest', '-o', 'C:\\Users\\GARRY\\Desktop\\M_VIDEO_AUDIO\\%(title)s-%(uploader)s-%(id)s.%(ext)s']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref UTF-8
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] PtzaMHjf_3Q: Downloading webpage
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on 'https://r4---sn-nfpnnjvh-1gir.googlevideo.com/videoplayback?expire=1638934261&ei=ldKvYei2EpLIgQfUp4OYAw&ip=2a02%3A1206%3A4524%3Aa00%3A89c2%3Ab8bb%3A990e%3Aeb8a&id=o-AIoy0sBNmdXGHb4j5KW_t3jMGMVWC3yXViyGYGZKtR3z&itag=18&source=youtube&requiressl=yes&mh=Bo&mm=31%2C29&mn=sn-nfpnnjvh-1gir%2Csn-1gieen7e&ms=au%2Crdu&mv=m&mvi=4&pl=45&initcwndbps=1736250&vprv=1&mime=video%2Fmp4&ns=UffXLxaDCdwEtMwREYs2HlgG&gir=yes&clen=22437638&ratebypass=yes&dur=412.827&lmt=1621076746739667&mt=1638912333&fvip=3&fexp=24001373%2C24007246&c=WEB&txp=5310222&n=b_-DDmZOMUveRBJIu0O&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgZp7eBsF-tkOBGt0f5h5RtMCLkYxwq4o0lgHqx4tpChoCIGX-C7sRessquBjX9fVVJedyUQlm00Bs9rbWEJ5Y716r&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIrqkpF0z-unR_deT3_4-W5JqsS56Lq6DtmwHdqbyBYlAiEAuCU0fws-hSwcWqmeQn03qe-UkkKDW7T5ZXfCY1DsIcg%3D'
[download] Destination: C:\Users\GARRY\Desktop\M_VIDEO_AUDIO\Looney Tunes _ A Mouse Divided 1953-Media Core-PtzaMHjf_3Q.mp4
[download] 100% of 21.40MiB in 04:23

C:\Users\GARRY\Desktop\YT-DLP>

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: YT-DLP

Post by BoBo » 08 Dec 2021, 08:31

Da habe ich mich jetzt gerade gefragt ob du mit yt-dlp evtl. einen 'cached clone' der vorab heruntergeldenen youtube-dl datei heruntergeladen hast (stichwort: download-reihenfolge)?
Bin nicht so der web-guy, vll können dazu Andere zu dem Thema generell etwas sagen?!

garry
Posts: 3763
Joined: 22 Dec 2013, 12:50

Re: YT-DLP

Post by garry » 08 Dec 2021, 12:56

ich hatte youtube-dl benutzt welches plötzlich sehr langsam war und danach yt-dlp downloaded ...

Post Reply

Return to “Tooltime”