1

Hi everyone I am trying to create a preset to encode my videos with ffmpeg through this file:

#video options
s=716x402
vcodec=libx264
minrate=900k
maxrate=1100k
bufsize=1500k
vprofile=high
level=4
field_order=progressive

#audio options
acodec=libfdk_aac
b:a=44.1k

#metada options
movflags=faststart

but it doesn't accept the first line "s=716x402" and returns this error:

Invalid option or argument: 's=716x402', parsed as 's' = '716x402'

If I remove that line everything goes smoothly but fact is that I need to change the size of the output. I know that in the command line this

>ffmpeg -i input.mov -vcodec libx264 -acodec copy -s 716x402 output.flv

works so I'm guessing there is another way of telling the video size in a preset file. Does anyone know how?

Please take notice that I'm calling this preset through the -fpre flag inside the ffmpeg comand line

Thank you in advance!

  • Did you try "size=...." ??? – Barafu Albino Mar 28 '14 at 17:10
  • I've reproduced your error using the same library and preset. It also comes up when using a different library libavpx – Mr.Lee Mar 28 '14 at 17:48
  • no, haven't tried "size=". I will as soon as I will be able to, thank you! – Andrea Silvestri Mar 29 '14 at 0:13
1

You need the correct option for the x264 library. I think its

resize:[width,height]

Take a look at the x264 options page

Seems like it works via command line because it is not using the preset options of x264. When using the preset, s=resolution is not recognized.

ffmpeg -i input.mov -vcodec libx264 -acodec copy -s 716x402 output.flv

is different from

ffmpeg -i input.mov -vcodec libx264 -acodec copy -vpre "YOUR PRE FILE" output.flv

where -s in the first line is an option of the ffmpeg while in the second line, -s is trying to be used as a x264 option.

  • I'll try it as soon as I will be able to, thank you! – Andrea Silvestri Mar 29 '14 at 0:13
  • it would be great for me to use resize:width=716,height=402,fittobox=both. But how do I write it in a preset file? – Andrea Silvestri Mar 29 '14 at 0:21

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.