Comparer les révisions

...

2 commits

Auteur SHA1 Message Date
d5b13b62d3
updated ffmpeg and ytdlp scripts 2024-09-28 02:18:46 +02:00
5719cb3dbb
initialized LFS 2024-09-28 02:17:42 +02:00
11 fichiers modifiés avec 110 ajouts et 130 suppressions

1
.gitattributes externe Fichier normal
Voir le fichier

@ -0,0 +1 @@
*.wav filter=lfs diff=lfs merge=lfs -text

Fichier binaire non affiché.

Fichier binaire non affiché.

Voir le fichier

@ -3,14 +3,16 @@ set binpath=%~dp0
if not exist "%binpath%\ffmpeg.exe" echo ffmpeg not found. exiting... & echo. & pause & exit 1
:do
if [%1]==[] goto noarg
"%binpath%\ffmpeg.exe" -i %1 -vn "%~dpn1.mp3"
title %~n1
"%binpath%\ffmpeg.exe" -hide_banner -i %1 -vn "%~dpn1.mp3"
IF %ERRORLEVEL% NEQ 0 pause
shift /1
if [%1] NEQ [] goto do
"%binpath%\sounder.exe" "%binpath%\alert.wav"
exit 0
:noarg
echo Usage: %~nx0 "video to convert.flv"
echo Usage: %~nx0 "anything with audio to extract.flv"
echo.
pause
exit

Voir le fichier

@ -0,0 +1,85 @@
@echo off
chcp 65001 >nul
set binpath=%~dp0
set "gstart=%date% - %time%"
if not exist "%binpath%\ffmpeg.exe" echo ffmpeg not found. exiting... & echo. & pause & exit 1
cmd.exe /c tasklist /FI "IMAGENAME eq ProcessTamerTray.exe" | find /I /N "ProcessTamerTray.exe" ||start "" "%binpath%ProcessTamerPortable64\ProcessTamerTray.exe"
:do
if [%1]==[] goto noarg
%~d1
if exist %1\* (
cd %1
) else (
cd "%~dp1"
)
IF %ERRORLEVEL% NEQ 0 (echo %1 & pause)
if not exist "ok\" mkdir ok
IF %ERRORLEVEL% NEQ 0 pause
if not exist "orig\" mkdir orig
IF %ERRORLEVEL% NEQ 0 pause
if exist %1\* (
setlocal EnableDelayedExpansion
for /f "delims=" %%a in ('dir /b *.mkv *.avi *.mp4') do (
title ffmpeg: %%~na
set "istart=%date% - %time%"
"%binpath%\ffmpeg.exe" -hide_banner -hwaccel_output_format cuda -i "%%~dpnxa" -c:v libsvtav1 -preset 6 -tune animation -crf 30 -c:s copy -map 0 -map -v -map V "%%~dpa\ok\%%~na - AV1 [AlbiRip].mkv"
IF !ERRORLEVEL! NEQ 0 (
echo ######################################
echo ## %%~na ERREUR !!! ##
echo ######################################
del "%%~dpa\ok\%%~na AV1 [AlbiRip].mkv"
) else (
move "%%a" orig\
echo _______________________________________
echo %%~na OK
echo ITEM START TIME: %istart%
echo ITEM END TIME : %date% - %time%
echo _______________________________________
)
"%binpath%\sounder.exe" /vol 25 "%binpath%\Infobulle.wav"
)
) else (
title ffmpeg: %~n1
set "istart=%date% - %time%"
"%binpath%\ffmpeg.exe" -hide_banner -hwaccel_output_format cuda -i %1 -c:v libsvtav1 -preset 6 -tune animation -crf 30 -c:s copy -map 0 -map -v -map V "ok\%~n1 - AV1 [AlbiRip].mkv"
if %ERRORLEVEL% NEQ 0 (
echo ######################################
echo ## %~n1 ERREUR !!! ##
echo ######################################
del "ok\%~n1 - AV1 [AlbiRip].mkv"
) else (
move "%~nx1" "orig\"
echo _______________________________________
echo %%~n1 OK
echo ITEM START TIME: %istart%
echo ITEM END TIME : %date% - %time%
echo _______________________________________
)
)
"%binpath%\sounder.exe" /vol 25 "%binpath%\Infobulle.wav"
shift /1
if [%1] NEQ [] goto do
::alert, use a wav file with CLI player from https://elifulkerson.com/projects/commandline-wav-player.php
"%binpath%\sounder.exe" /vol 25 "%binpath%\alert.wav"
taskkill /im ProcessTamerTray.exe
echo.
echo.
echo GLOBAL START TIME: %gstart%
echo GLOBAL END TIME : %date% - %time%
echo.
echo.
::timeout 300
pause
exit 0
:: presets: 1_ultrafast, 6_medium, 9_veryslow
:: crf: exponential, 0 is lossless, 23 is the default, and 51 is worst quality possible
:noarg
echo Convert videos or videos inside folders to AV1 format
echo Usage: %~nx0 "video1.flv" "video2.mp4" "video_folder"
echo.
pause
exit 0

Voir le fichier

@ -1,60 +0,0 @@
@echo off
chcp 65001 >nul
set binpath=%~dp0
set "gstart=%date% - %time%"
if not exist "%binpath%\ffmpeg.exe" echo ffmpeg not found. exiting... & echo. & pause & exit 1
echo GLOBAL START TIME: %gstart%
cmd.exe /c tasklist /FI "IMAGENAME eq ProcessTamerTray.exe" | find /I /N "ProcessTamerTray.exe" ||start "" "%binpath%ProcessTamerPortable64\ProcessTamerTray.exe"
:do
if [%1]==[] goto noarg
%~d1
cd %1
IF %ERRORLEVEL% NEQ 0 (echo %1 & pause)
if not exist "ok\" mkdir ok
IF %ERRORLEVEL% NEQ 0 pause
if not exist "orig\" mkdir orig
IF %ERRORLEVEL% NEQ 0 pause
setlocal EnableDelayedExpansion
for /f "delims=" %%a in ('dir /b *.mkv *.avi *.mp4') do (
title ffmpeg: %%~na
set "istart=%date% - %time%"
"%binpath%\ffmpeg.exe" -hide_banner -hwaccel_output_format cuda -i "%%~dpnxa" -c:v libsvtav1 -preset 6 -tune animation -crf 30 -c:s copy -map 0 -map -v -map V "%%~dpa\ok\%%~na - AV1 [AlbiRip].mkv"
IF !ERRORLEVEL! NEQ 0 (
echo ######################################
echo ## %%~na ERREUR !!! ##
echo ######################################
del "%%~dpa\ok\%%~na AV1 [AlbiRip].mkv"
) else (
move "%%a" orig/
echo _______________________________________
echo %%~na OK
echo ITEM START TIME: %istart%
echo ITEM END TIME : %date% - %time%
echo _______________________________________
)
"%binpath%\sounder.exe" /vol 25 "%binpath%\Infobulle.wav"
)
shift /1
if [%1] NEQ [] goto do
taskkill /im ProcessTamerTray.exe
::alert, use a wav file with CLI player from https://elifulkerson.com/projects/commandline-wav-player.php
"%binpath%\sounder.exe" "%binpath%\alert.wav"
echo.
echo.
echo GLOBAL START TIME: %gstart%
echo GLOBAL END TIME : %date% - %time%
echo.
echo.
::timeout 300
:: veille
::rundll32.exe powrprof.dll,SetSuspendState 1,0,1
:: veille prolongée
::rundll32.exe powrprof.dll,SetSuspendState 0,1,0
pause
exit 0
:noarg
echo Usage: %~nx0 "folder containig videos to convert"
echo.
pause
exit

Voir le fichier

@ -1,49 +0,0 @@
@echo off
chcp 65001 >nul
set binpath=%~dp0
if not exist "%binpath%\ffmpeg.exe" echo ffmpeg not found. exiting... & echo. & pause & exit 1
cmd.exe /c tasklist /FI "IMAGENAME eq ProcessTamerTray.exe" | find /I /N "ProcessTamerTray.exe" ||start "" "%binpath%ProcessTamerPortable64\ProcessTamerTray.exe"
:do
if [%1]==[] goto noarg
%~d1
cd "%~dp1"
if not exist "ok\" mkdir ok
if not exist "orig\" mkdir orig
title ffmpeg: %~n1
echo vid: %1
echo start libsvtav1 %date% %time%
"%binpath%\ffmpeg.exe" -hide_banner -hwaccel_output_format cuda -i %1 -c:v libsvtav1 -preset 6 -tune animation -crf 30 -c:s copy -map 0 -map -v -map V "ok\%~n1 - AV1 [AlbiRip].mkv"
if %ERRORLEVEL% NEQ 0 (
echo ######################################
echo ## %~n1 ERREUR !!! ##
echo ######################################
del "ok\%~n1 - AV1 [AlbiRip].mkv"
) else (
echo stop: %date% %time%
move "%~nx1" "orig\"
echo _______________________________________
echo %~n1 OK
echo ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
)
"%binpath%\sounder.exe" /vol 25 "%binpath%\Infobulle.wav"
shift /1
if [%1] NEQ [] goto do
::alert, use a wav file with CLI player from https://elifulkerson.com/projects/commandline-wav-player.php
"%binpath%\sounder.exe" "%binpath%\alert.wav"
taskkill /im ProcessTamerTray.exe
::timeout 300
:: veille
::rundll32.exe powrprof.dll,SetSuspendState 1,0,1
:: veille prolongée
::rundll32.exe powrprof.dll,SetSuspendState 0,1,0
pause
exit 0
:: presets: 1_ultrafast, 6_medium, 9_veryslow
:: crf: exponential, 0 is lossless, 23 is the default, and 51 is worst quality possible
:noarg
echo Usage: %~nx0 "video to convert.flv"
echo.
pause
exit 0

Voir le fichier

@ -3,7 +3,6 @@ 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
@ -20,7 +19,6 @@ 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

Voir le fichier

@ -1,14 +0,0 @@
@echo off
set savepath=B:\Albirew\Bureau
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.
set /P command=Enter options and video URL:
if ["%command%"] == [""] exit 0
echo.
echo $^>yt-dlp -x -k -f b --audio-format mp3 --write-sub --sub-lang fr,en --yes-playlist --geo-bypass "%command%"
"%binpath%\yt-dlp.exe" -x -k -f b --audio-format mp3 --write-sub --sub-lang fr,en --yes-playlist --geo-bypass "%command%"
IF %ERRORLEVEL% NEQ 0 pause

Voir le fichier

@ -4,11 +4,12 @@ set savepath=B:\Albirew\Bureau
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 --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 --extract-audio --audio-format mp3 --geo-bypass "%command%"
"%binpath%\yt-dlp.exe" --extract-audio --audio-format mp3 --geo-bypass "%command%"
echo $^>yt-dlp --extract-audio --audio-format mp3 --geo-bypass %command%
"%binpath%\yt-dlp.exe" --extract-audio --audio-format mp3 --geo-bypass %command%
IF %ERRORLEVEL% NEQ 0 pause

Voir le fichier

@ -0,0 +1,16 @@
@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