Skip to content

Instantly share code, notes, and snippets.

Last active August 9, 2022 11:47
What would you like to do?
Quickly re-encodes a video file to .mp4. Add it to your PATH (along with ffmpeg).
@echo off
IF "%1"=="" (
echo Usage: reencode path_to_file [optional_crf]
goto eof
SET crf="23"
IF NOT "%2"=="" (
SET crf=%2
for %%i in (%1) do ffmpeg -i %1 -c:v libx264 -crf %crf% -preset slower -c:a libopus -strict -2 "%%~ni_x264.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment