Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set bv=0
- set crf=35
- set gop=480
- set threads=4
- set ffmpeg=%~dp0
- set list=%~dp0list.txt
- set subt=-sn
- set scaleV=720
- set output=%DATE:~0,5%.%DATE:~8,2%[%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%]
- for /F "delims=" %%n in ('findstr /N /R "." %list%') do set "coun=%%n"
- for /F "delims=:" %%y in ("%coun%") do set "count=%%y"
- set count-=1
- set strcount=1
- echo %count% files to encode
- :loopstart
- for /F "delims=" %%i in ('findstr /B /L /C:"%strcount% " %list%') do set "string=%%i"
- set /a strcount+=1
- for /F "tokens=1,2,3,4 delims= " %%a in ("%string%") do set "xx=%%a" &set "ss=%%b" &set "to=%%c" &set "source=%%d"
- if %ss% neq huy (
- set "sst=-ss %ss% "
- ) else (
- set "sst="
- )
- if %to% neq huy (
- set "tot=-to %to% "
- ) else (
- set "tot="
- )
- set namae=%source%
- %ffmpeg%ffmpeg.exe -i %ffmpeg%%source% -c:v libvpx-vp9 -y -b:v %bv% -crf %crf% -threads %threads% -frame-parallel 0 -tile-columns 2 -strict -2 -rc_lookahead 25 -lag-in-frames 16 -g %gop% -sc_threshold 40 -auto-alt-ref 1 -arnr_strength 3 -arnr_max_frames 8 -arnr-type centered -c:a libopus -b:a 64K -vf scale=-1:%scaleV% -pix_fmt yuv420p -speed 4 -pass 1 %sst%%tot%-f webm NUL
- %ffmpeg%ffmpeg.exe -i %ffmpeg%%source% -c:v libvpx-vp9 -y -b:v %bv% -crf %crf% -threads %threads% -frame-parallel 0 -tile-columns 2 -strict -2 -rc_lookahead 25 -lag-in-frames 16 -g %gop% -sc_threshold 40 -auto-alt-ref 1 -arnr_strength 3 -arnr_max_frames 8 -arnr-type centered -c:a libopus -b:a 64K -vf scale=-1:%scaleV% -pix_fmt yuv420p -speed 1 -pass 2 %sst%%tot%-f webm %ffmpeg%webm%output%.webm
- set /a count-=1
- if %count% neq 0 (
- goto :loopstart
- ) else (
- exit /b
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement