Created
November 22, 2018 19:29
-
-
Save Koasing/4745c9391dfe1a65105600b4eb64e045 to your computer and use it in GitHub Desktop.
ffmpeg 2pass encoding
This file contains 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 | |
REM 1280x 720 30fps = 5000k | |
REM 60fps = 7500k | |
REM 1920x1080 30fps = 8000k | |
REM 1920x0180 60fps = 12000k | |
:BEGIN | |
IF [%1]==[] GOTO :eof | |
::1PASS | |
REM ffmpeg -i "%~1" -c:a libopus -b:a 256k -filter:v yadif,scale=1280x720 -c:v libx264 -preset:v slow -b:v 4000k enc.mkv | |
::2PASS | |
title (PASS 1) %~nx1 | |
ffmpeg -y -i "%~1" -an -filter:v yadif -c:v libx264 -preset:v slow -b:v 8000k -pass 1 -passlogfile "log\%~sn1" -f matroska NUL | |
title (PASS 2) %~nx1 | |
ffmpeg -i "%~1" -c:a libopus -b:a 256k -filter:v yadif -c:v libx264 -preset:v slow -b:v 8000k -pass 2 -passlogfile "log\%~sn1" -f matroska "%~n1.mkv" | |
SHIFT | |
GOTO BEGIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment