diff --git a/windows/video scripts/README.md b/windows/video scripts/README.md index 0707210..6ffbcf2 100644 --- a/windows/video scripts/README.md +++ b/windows/video scripts/README.md @@ -1,9 +1,9 @@ # COLLECTION OF DOWNLOADING AND TRANSCODING SCRIPTS ### You'll need: -* ffmpeg +* [ffmpeg](https://www.gyan.dev/ffmpeg/builds/#release-builds) * to use with convertion scripts -* yt-dlp +* [yt-dlp](https://github.com/yt-dlp/yt-dlp/releases) * To use with youtube-dl scripts ### You may also want: @@ -11,3 +11,5 @@ * A little executable to play a sound file when one or all files has been processed * [ProcessTamerPortable64](https://www.donationcoder.com/software/mouser/popular-apps/process-tamer) * Control ffmpeg priority so you can still use your computer when encoding AV1 videos +* [PhantomJS](https://phantomjs.org/releases.html) + * Used by yt-dlp in extractors where javascript needs to be run diff --git a/windows/video scripts/create-flat-conv-batch.bat b/windows/video scripts/create-flat-conv-batch.bat index f8b08dd..be73e0e 100644 --- a/windows/video scripts/create-flat-conv-batch.bat +++ b/windows/video scripts/create-flat-conv-batch.bat @@ -3,6 +3,7 @@ chcp 65001 >nul echo @echo off >0-conv.bat set binpath=%~dp0 if not exist "%binpath%\ffmpeg.exe" echo ffmpeg not found. exiting... & echo. & pause & exit 1 +echo cmd.exe /c tasklist /FI "IMAGENAME eq ProcessTamerTray.exe" ^| find /I /N "ProcessTamerTray.exe" ^|^|start "" "%binpath%ProcessTamerPortable64\ProcessTamerTray.exe" >>0-conv.bat echo %~d1 >>0-conv.bat echo cd %~dp1 >>0-conv.bat :do @@ -19,6 +20,7 @@ echo "%binpath%\sounder.exe" /vol 25 "%binpath%\Infobulle.wav" >>0-conv.bat shift /1 if [%1] NEQ [] goto do echo "%binpath%\sounder.exe" "%binpath%\alert.wav" >>0-conv.bat +echo taskkill /im ProcessTamerTray.exe >>0-conv.bat >>0-conv.bat echo pause >>0-conv.bat echo OK pause diff --git a/windows/video scripts/youtube-dl-audio-and-video.bat b/windows/video scripts/youtube-dl-audio-and-video.bat new file mode 100644 index 0000000..d4df1e7 --- /dev/null +++ b/windows/video scripts/youtube-dl-audio-and-video.bat @@ -0,0 +1,23 @@ +@echo off +set savepath=B:\Albirew\Bureau\YT + +set binpath=%~dp0 +echo Usage: yt-dlp.exe [OPTIONS] URL [URL...] +echo --geo-bypass-country CODE Force bypass geographic restriction with ISO 3166-2 country code +echo eg: -4 (IPv4) -geo-bypass-country us +echo. +echo Leave empty to update +echo. +set /P command=Enter options and video URL: +if ["%command%"] == [""] ( + echo $^>yt-dlp --update + "%binpath%\yt-dlp.exe" --update + if %ERRORLEVEL% NEQ 0 pause + exit 0 +) +mkdir %savepath% 2>nul +cd %savepath% +echo. + echo $^>yt-dlp -f "bv+ba/b" --console-title --remux-video mkv --write-auto-subs --embed-subs --convert-subs ass --sub-lang fr,en,en.* --yes-playlist --geo-bypass "%command%" +"%binpath%\yt-dlp.exe" -f "bv+ba/b" --console-title --remux-video mkv --write-auto-subs --embed-subs --convert-subs ass --sub-lang fr,en,en.* --yes-playlist --geo-bypass "%command%" +IF %ERRORLEVEL% NEQ 0 pause diff --git a/windows/video scripts/youtube-dl-audio-only.bat b/windows/video scripts/youtube-dl-audio-only.bat index cedd1a3..1ce28fa 100644 --- a/windows/video scripts/youtube-dl-audio-only.bat +++ b/windows/video scripts/youtube-dl-audio-only.bat @@ -1,15 +1,23 @@ @echo off -set savepath=B:\Albirew\Bureau +set savepath=B:\Albirew\Bureau\YT set binpath=%~dp0 -cd %savepath% echo Usage: yt-dlp.exe [OPTIONS] URL [URL...] echo --geo-bypass-country CODE Force bypass geographic restriction with ISO 3166-2 country code echo eg: -4 (IPv4) -geo-bypass-country us echo. -set /P command=Enter options and video URL: -if ["%command%"] == [""] exit 0 +echo Leave empty to update echo. -echo $^>yt-dlp --extract-audio --audio-format mp3 --geo-bypass %command% -"%binpath%\yt-dlp.exe" --extract-audio --audio-format mp3 --geo-bypass %command% +set /P command=Enter options and video URL: +if ["%command%"] == [""] ( + echo $^>yt-dlp --update + "%binpath%\yt-dlp.exe" --update + if %ERRORLEVEL% NEQ 0 pause + exit 0 +) +mkdir %savepath% 2>nul +cd %savepath% +echo. +echo $^>yt-dlp -f "ba/b" --extract-audio --audio-format mp3 --geo-bypass %command% +"%binpath%\yt-dlp.exe" -f "ba/b" --extract-audio --audio-format mp3 --geo-bypass %command% IF %ERRORLEVEL% NEQ 0 pause diff --git a/windows/video scripts/youtube-dl-update.bat b/windows/video scripts/youtube-dl-update.bat deleted file mode 100644 index 29e5011..0000000 --- a/windows/video scripts/youtube-dl-update.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -set binpath=%~dp0 -echo $^>yt-dlp --update -"%binpath%\yt-dlp.exe" --update -pause diff --git a/windows/video scripts/youtube-dl-video.bat b/windows/video scripts/youtube-dl-video.bat deleted file mode 100644 index 609acfa..0000000 --- a/windows/video scripts/youtube-dl-video.bat +++ /dev/null @@ -1,16 +0,0 @@ -@echo off -set savepath=B:\Albirew\Bureau\YT - -set binpath=%~dp0 -mkdir %savepath% 2>nul -cd %savepath% -echo Usage: yt-dlp.exe [OPTIONS] URL [URL...] -echo --geo-bypass-country CODE Force bypass geographic restriction with ISO 3166-2 country code -echo eg: -4 (IPv4) -geo-bypass-country us -echo. -set /P command=Enter options and video URL: -if ["%command%"] == [""] exit 0 -echo. -echo $^>yt-dlp -f "bv+ba/b" --console-title --remux-video mkv --write-subs --embed-subs --sub-lang fr,en --yes-playlist --geo-bypass %command% -"%binpath%\yt-dlp.exe" -f "bv+ba/b" --console-title --remux-video mkv --write-subs --embed-subs --sub-lang fr,en --yes-playlist --geo-bypass %command% -IF %ERRORLEVEL% NEQ 0 pause