Skip to main content
added 125 characters in body
Source Link
Peter Cordes
  • 2.8k
  • 1
  • 16
  • 22

The first frame of a video from any codec will always be an I frame. There is no previous picture for other frame types to use as a reference.

B frames might still work. The video will start to distort ahead of the cut point, too, if any B frames are trying to reference a future frame that's not there anymore. Actually, with B frames present, display order differs from decode order, and the h.264 stream is always stored in decode order.

Anyway -x264opts bframes=0:keyint_min=250 would force the minimum GOP size to 250 frames, and disallow use of B frames. keyint sets the max GOP size. (By default, x264 does scenecut detection for placing I frames, so if you want I frames at scenecuts, you might do well to leave it as-is.)

Err, is that tutorial using ffmpeg's MPEG4-part2 encoder? (the same format as divx/xvid). In that case, nvm. My instructions were for -c:v libx264.

Look at the output of ffmpeg -h fullencoder=mpeg4 | less, and search for stuff you want to set. There will be command line options for most everything. e.g. -bf 0 to set no B frames. ffmpeg -codecs for a list of codecs, or even ffmpeg -h full. Also google / check the manual

The first frame of a video from any codec will always be an I frame. There is no previous picture for other frame types to use as a reference.

B frames might still work. The video will start to distort ahead of the cut point, too, if any B frames are trying to reference a future frame that's not there anymore. Actually, with B frames present, display order differs from decode order, and the h.264 stream is always stored in decode order.

Anyway -x264opts bframes=0:keyint_min=250 would force the minimum GOP size to 250 frames, and disallow use of B frames. keyint sets the max GOP size. (By default, x264 does scenecut detection for placing I frames, so if you want I frames at scenecuts, you might do well to leave it as-is.)

Err, is that tutorial using ffmpeg's MPEG4-part2 encoder? (the same format as divx/xvid). In that case, nvm. My instructions were for -c:v libx264.

Look at the output of ffmpeg -h full | less, and search for stuff you want to set. There will be command line options for most everything. e.g. -bf 0 to set no B frames.

The first frame of a video from any codec will always be an I frame. There is no previous picture for other frame types to use as a reference.

B frames might still work. The video will start to distort ahead of the cut point, too, if any B frames are trying to reference a future frame that's not there anymore. Actually, with B frames present, display order differs from decode order, and the h.264 stream is always stored in decode order.

Anyway -x264opts bframes=0:keyint_min=250 would force the minimum GOP size to 250 frames, and disallow use of B frames. keyint sets the max GOP size. (By default, x264 does scenecut detection for placing I frames, so if you want I frames at scenecuts, you might do well to leave it as-is.)

Err, is that tutorial using ffmpeg's MPEG4-part2 encoder? (the same format as divx/xvid). In that case, nvm. My instructions were for -c:v libx264.

Look at the output of ffmpeg -h encoder=mpeg4 | less, and search for stuff you want to set. There will be command line options for most everything. e.g. -bf 0 to set no B frames. ffmpeg -codecs for a list of codecs, or even ffmpeg -h full. Also google / check the manual

Source Link
Peter Cordes
  • 2.8k
  • 1
  • 16
  • 22

The first frame of a video from any codec will always be an I frame. There is no previous picture for other frame types to use as a reference.

B frames might still work. The video will start to distort ahead of the cut point, too, if any B frames are trying to reference a future frame that's not there anymore. Actually, with B frames present, display order differs from decode order, and the h.264 stream is always stored in decode order.

Anyway -x264opts bframes=0:keyint_min=250 would force the minimum GOP size to 250 frames, and disallow use of B frames. keyint sets the max GOP size. (By default, x264 does scenecut detection for placing I frames, so if you want I frames at scenecuts, you might do well to leave it as-is.)

Err, is that tutorial using ffmpeg's MPEG4-part2 encoder? (the same format as divx/xvid). In that case, nvm. My instructions were for -c:v libx264.

Look at the output of ffmpeg -h full | less, and search for stuff you want to set. There will be command line options for most everything. e.g. -bf 0 to set no B frames.