You need :
youtube-dl.exe from https://rg3.github.io/youtube-dl/download.html
ffmpeg.exe from http://ffmpeg.zeranoe.com/builds/
Please adapt the path to these static executables in the script.
Usage : to download "Handmade Hero Day 050 - Basic Minkowski-based Collision Detection", type
1 | youtube-dl-dash.bat https://www.youtube.com/watch?v=_g8DLrNyVsQ |
Now the script :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | @REM Usage: youtube-dl-dash.bat https://www.youtube.com/watch?v=xxxxxxxxxxx @REM Get the URL from the command line SET YOUTUBE_URL=%1 @REM Set tools SET YOUTUBEDL_EXE=D:\NoInstall\youtube-dl.exe SET FFMPEG_EXE=D:\NoInstall\ffmpeg\bin\ffmpeg.exe @REM Set DASH best quality for video and audio SET VIDEO_Q=137 SET AUDIO_Q=141 @REM Get video and audio filename "%YOUTUBEDL_EXE%" --get-filename -f %VIDEO_Q% "%YOUTUBE_URL%" > youtube-dl-dash-temp.txt SET /p VIDEO_FILENAME=<youtube-dl-dash-temp.txt "%YOUTUBEDL_EXE%" --get-filename -f %AUDIO_Q% "%YOUTUBE_URL%" > youtube-dl-dash-temp.txt SET /p AUDIO_FILENAME=<youtube-dl-dash-temp.txt del youtube-dl-dash-temp.txt @REM Download video and audio files "%YOUTUBEDL_EXE%" -f %VIDEO_Q% "%YOUTUBE_URL%" "%YOUTUBEDL_EXE%" -f %AUDIO_Q% "%YOUTUBE_URL%" @REM Recombine video and audio SET FILEOUT=NEW-%VIDEO_FILENAME% "%FFMPEG_EXE%" -i "%VIDEO_FILENAME%" -i "%AUDIO_FILENAME%" -acodec copy -vcodec copy -threads 0 "%FILEOUT%" @REM Clean up del "%VIDEO_FILENAME%" del "%AUDIO_FILENAME%" ren "%FILEOUT%" "%VIDEO_FILENAME%" |