I'm currently using the following batch script to run an ffmpeg command:
@echo off
title Convert videos to Mp4 h.264 with FFMPEG.
echo This script will find all video files of a given extension then make an mp4 h.264 file out of them.
set /p folder="Enter the folder path (cannot contain spaces; must have trailing slash \): "
set /p ft="Enter file type extension: "
set /p abitrate="Enter the audio bitrate in kbps (usually 48): "
set /p size="Enter video width and height (w:h) (usually 852:480): "
set /p vcrf="Enter the video crf value (usually 24): "
for %%f in (%folder%*.%ft%) do ffmpeg -i "%%f" -vf "scale=%size%,setsar=1" -crf %vcrf% -c:a aac -b:a %abitrate%k -ac 1 -movflags +faststart "%folder%%%~nf.mp4"
pause
The script says what it does in the description at the top. I built it to convert HDV .m2t files to web-ready mp4 files. If I extract the ffmpeg command from the script loop, it looks like this:
ffmpeg -i input.m2t -vf "scale=852:480,setsar=1" -crf 24 -c:a aac -b:a 48k -ac 1 -movflags +faststart output.mp4
I have some videos that need color correction, so I just want to toss a filter on them before I encode. I've fiddled with ffplay and determined that the look I want will require the following command, which has been modified from this answer:
-vf eq=brightness=0.1:saturation=1.5
The issue I'm having is integrating this new -vf
line into the main command. If I put it separately, ffmpeg ignores the first one for the second one. If it put them together in the quotes, it throws errors. I assume this is a syntax issue, but maybe not. The main command seems to be using commas for separators, but this new command uses colons.