John,
Combining multiple filters into a single FFmpeg command is very simple, you must be using the -vf
option provided by FFmpeg for your individual filters, but to combine them into a single command you have to create a filter chain and use it with the -filter_complex
option provided by FFmpeg.
For example,
ffmpeg -i input.mp4 -filter_complex "[0:v]filter1=option1:option2[outv];[0:a]filter2=option3:option4[outa]" -map "[outv]" -map "[outa]" output.mp4
-
-i input.mp4
indicates the input file, in this case,input.mp4
. -
-filter_complex
is used to target the complex filter graph. -
[0:v]
refers to the video stream from the first input (index 0). -
filter1=option1:option2
shows the first filter you wish to apply to the video stream. -
[outv]
is the name given to the output video stream from the filter. -
[0:a]
refers to the audio stream from the first input (index 0). -
filter2=option3:option4
shows the second filter you want to apply to the audio stream. -
[outa]
is the name given to the output audio stream from the filter. -
-map "[outv]" and -map "[outa]"
specify which output streams to include in the final output file. -
output.mp4
is the name of the output file.
And you can also use the filters twice in different commands and complex filters in ffmpeg.
I hope this may help you! Ask if you need further guidance.
Thanks