Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: convert x264 mp4 file to x264 using ffmpeg.exe and x265.exe
- :: original file will be left in tact and the new output
- :: file will have (x265) added to the end of the filename
- @echo off
- setlocal enabledelayedexpansion
- prompt $g
- color 0a
- pushd "%~dp0"
- :: Define ffmpeg.exe variable
- set FF=C:\MAB\local64\bin-video\ffmpeg.exe
- :: Define x265 preset vars for use as needed
- set VF=-preset veryfast
- set F=-preset fast
- set M=-preset medium
- set S=-preset slow
- set SL=-preset slower
- :: Find mp4 file and run ffmpeg
- :: Output file will add (x265) in the file name
- for %%G in (*.mp4) do (
- set fname="%%~nxG"
- set fout="%%~nG(x265).mp4"
- call :runFF !fname! !fout!
- pause
- goto:eof
- )
- :: Run ffmpeg.exe using found mp4 file
- :runFF
- %FF% ^
- -stats ^
- -hide_banner ^
- -y ^
- -i "%~1" ^
- -c:v libx265 %VF% -crf 22 -vf scale=1920:-1 ^
- -c:a copy ^
- "%~2"
- exit /b
- :: Miscellaneous
- :: -ss 00:00:23 ^
- :: -ss 230 ^
- :: -to 00:31:17 ^
- :: -t 119 ^
Add Comment
Please, Sign In to add comment