Created
May 18, 2014 07:47
-
-
Save m-wild/b487a7236d04cca2d4ca to your computer and use it in GitHub Desktop.
ffmpeg video to webm converter with prompts (needs ffmpeg in PATH)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo ^>--- FFmpeg webm --- | |
echo. | |
set /P ffinput=">Input file: " | |
set /P ffbitrate=">Bitrate (e.g. 500k): " | |
set /P ffss=">Start time (hh:mm:ss): " | |
set /P ffduration=">Duration (ss): " | |
set /P fffps=">FPS: " | |
echo. | |
echo ^>ffmpeg -i %ffinput% -c:v libvpx -b:v %ffbitrate% -ss %ffss% -t %ffduration% -quality good -cpu-used 0 -r %fffps% -auto-alt-ref 1 -lag-in-frames 16 -vf scale=-1:720 -an -pass 1 -f webm null | |
echo. | |
echo ^>ffmpeg -i %ffinput% -c:v libvpx -b:v %ffbitrate% -ss %ffss% -t %ffduration% -quality good -cpu-used 0 -r %fffps% -auto-alt-ref 1 -lag-in-frames 16 -vf scale=-1:720 -an -pass 2 -f webm %ffinput%.webm | |
echo. | |
set /P ans=">Continue (y/n)? " | |
if /i {%ans%}=={y} (goto :run) | |
if /i {%ans%}=={yes} (goto :run) | |
goto :exit | |
:run | |
ffmpeg -i %ffinput% -c:v libvpx -b:v %ffbitrate% -ss %ffss% -t %ffduration% -quality good -cpu-used 0 -r %fffps% -auto-alt-ref 1 -lag-in-frames 16 -vf scale=-1:720 -an -pass 1 -f webm null | |
ffmpeg -i %ffinput% -c:v libvpx -b:v %ffbitrate% -ss %ffss% -t %ffduration% -quality good -cpu-used 0 -r %fffps% -auto-alt-ref 1 -lag-in-frames 16 -vf scale=-1:720 -an -pass 2 -f webm %ffinput%.webm | |
del null | |
del ffmpeg2pass*.log | |
echo ^>Done. | |
goto :exit | |
:exit | |
echo. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment