FFmpeg transcoding GOP pattern IP I need to transcode mpeg2 video via H264 codec and GOP structure should be IP.
I use the following command for this:


  ffmpeg -i INPUT -vcodec libx264 -x264-params
  keyint=2:scenecut=-1:ref=1 -acodec copy -y out.mpg


Then checked it with ffprobe:


  ffprobe -i out.mpg -show_frames | grep key_frame


And received the following results:


  key_frame=1 key_frame=1 key_frame=1 key_frame=1 key_frame=1
  key_frame=1 key_frame=1 key_frame=1 key_frame=0 key_frame=1
  key_frame=0 key_frame=1 key_frame=0 key_frame=1 key_frame=0
  key_frame=1 key_frame=0 key_frame=1 key_frame=1 key_frame=1
  key_frame=1 key_frame=0 key_frame=1 key_frame=1 key_frame=1
  key_frame=1 key_frame=1


Can you please explain how to correct transcoding H264 and set GOP IP Pattern?
Use

ffmpeg -i INPUT -vcodec libx264 -g 2 -acodec copy -y out.mpg




As per the x264 docs, scenecut=0 disables scenecut evaluation.