Skip to content

Instantly share code, notes, and snippets.

@typomedia
Created December 20, 2013 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save typomedia/8051987 to your computer and use it in GitHub Desktop.
Save typomedia/8051987 to your computer and use it in GitHub Desktop.
FFMPEG Transcoder Batch
@ECHO OFF
ECHO Copyright 2013 Typomedia Foundation. All rights reserved.
ECHO Released under GPL version 3.
ECHO FFMPEG Transcoder Script 1.0
PAUSE
SET input="\\SERVER\Movies"
SET ftype=*.rip.mkv
SET suffix="h264.mkv"
REM Loop all files with the specified FTYPE
FOR /R %input% %%A IN (%ftype%) DO ffmpeg -i "%%A" -map 0 -c:v libx264 -preset slow -crf 20 -c:a copy -c:s copy "%%A.%suffix%"
REM Cleanup output
REM mkclean "%%A.%suffix%"
REM Rename all proceed extensions
REM ren *.rip.mkv.h264.mkv *.mkv
PAUSE
@typomedia
Copy link
Author

For more encoder options look here: https://trac.ffmpeg.org/wiki/x264EncodingGuide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment