Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set ffmpeg=S:\ffmpeg\bin\
- set subt=-sn
- set scaleV=720
- set namae=%1
- set /P ss=Enter start time[sec.mS or HH:MM:SS.mS](leave blank to set min):
- set /P to=Enter end time[sec.mS or HH:MM:SS.mS](leave blank to set max):
- if defined ss (
- set sst=-ss
- )
- if defined to (
- set tot=-to
- )
- if not defined namae (
- set /P name=Write path to input file or use dragNDrop:
- )
- set /P state=This video is (1-dynamic,2-static,3-combined):
- if %state% == 1 (
- set bv=1500K
- set crf=22
- set gop=240
- )
- if %state% == 2 (
- set bv=0
- set crf=24
- set gop=480
- )
- if %state% == 3 (
- set bv=0
- set crf=32
- set gop=120
- )
- %ffmpeg%ffmpeg.exe -i %1%name% %subt% -c:v libvpx-vp9 -y -b:v %bv% -qmin 10 -qmax 42 -crf %crf% -threads 4 -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 %hsp% -speed 4 -pass 1 %sst% %ss% %tot% %to% -f webm NUL
- %ffmpeg%ffmpeg.exe -i %1%name% %subt% -c:v libvpx-vp9 -y -b:v %bv% -qmin 10 -qmax 42 -crf %crf% -threads 4 -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 %hsp% -speed 1 -pass 2 %sst% %ss% %tot% %to% -f webm %1%name%.webm
- pause
- exit /B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement