Opened 5 years ago

Closed 5 years ago

#422 closed defect (fixed)

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

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


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 Changed 5 years ago by llogan

You can use x264opts to set the GOP size:

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

comment:2 Changed 5 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.