Opened 13 years ago

Closed 13 years ago

#422 closed defect (fixed)

x264 preset and tune options always reset certain ffmpeg params to defaults

Reported by: Takis Issaris Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When using ffmpeg with libx264, certain options are always reset to the default x264 values:
ffmpeg -i /srv/files/videos/test/frame%06d.png -vcodec libx264 -preset ultrafast -g 16 test.ts

The GOP-size here will be 250 instead of the requested 16.

This is because in X264_init(), the ffmpeg options are set (GOP-size on line 233), but on line 313 x264_param_default_preset() is invoked, which in turn invokes x264_param_default() which sets the GOP size to 250 on line 76 (of x264.git/common/common.c).

Change History (2)

comment:1 by llogan, 13 years ago

You can use x264opts to set the GOP size:

$ ffmpeg -i input -vcodec libx264 -preset ultrafast -x264opts keyint=16 output
$ strings output | grep keyint
...keyint=16...

comment:2 by Carl Eugen Hoyos, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.