2

I have a video that I am trying to apply two filters to. I want to rotate the video 90 degrees clockwise followed by scaling it down from 1280 x 720 to 720 x 576 with letterboxing.

I also want to rotate the input file, then put the output file in a temporary folder for the other filter to use the file in the temporary folder to scale and pad, then overwrite it.

Below are the commands I am currently trying:

-i "<FullSourceFileName>" -vf "transpose=1" -r 30 -qscale 0 -acodec copy -f avi "C:\FfmpegTemp\Temp.avi"

And:

-i "C:\FfmpegTemp\Temp.avi" -filter:v "scale=1280*min(720/1280\,576/720):720*min(720/1280\,576/720), pad=720:576:(720-1280*min(720/1280\,576/720))/2:(576-720*min(720/1280\,576/720))/2" -vcodec rawvideo  -y "<OutputFileName>.avi"
  • Hi Ben. Can you please clarify: Do you need the temporary file? If you want to apply the multiple filters at once, why even use a temporary file in the first place? That'd be almost equivalent to just calling ffmpeg twice. – slhck Apr 22 '13 at 12:06
  • Hi, no I don't need to keep the temporary file. I am using ffmpeg through 'AnotherGUI' in order to automate the process. So I didn't want to have to add an input file at each stage, as I couldn't get all the filters to work in one go. Thanks – Ben Apr 22 '13 at 12:48
  • 1
    So, couldn't you just use -vf "transpose=1, scale=…"? I haven't tried your example, but you can basically concatenate any filter. – slhck Apr 23 '13 at 4:55
1

You already use two filters in your second example. They are separated by a comma. Adding all three into the -vf parameter:

-i "<FullSourceFileName>" -vf "transpose=1, scale=1280*min(720/1280\,576/720):720*min(720/1280\,576/720), pad=720:576:(720-1280*min(720/1280\,576/720))/2:(576-720*min(720/1280\,576/720))/2" -r 30 -qscale 0 -acodec copy -f avi -vcodec rawvideo  -y "<OutputFileName>.avi"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.