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
;=================================================================================