[FFmpeg-devel] Irregular keyframe distance

Jérôme DESPATIS jdespatis
Mon Apr 28 18:36:16 CEST 2008


Hi,

I'm experiencing a strange problem with ffmpeg / linux:
from an infile.mpeg, i'd like to create an outfile.mpeg that have a 
keyframe at every 5 frames, so i use this command:

ffmpeg -i irregular_keyframe_distance.mpeg -an -r 25 -vcodec mpeg1video 
-qscale 5 -g 5 -keyint_min 5 outfile.mpeg

But outfile.mpeg doesn't have exactly a keyframe at every 5 frames, in 
fact, it has a minimum of 1 keyframe at every 5 frames, but not exactly 
a keyframe at every 5 frames.

(i've retrieved the keyframes with virtualdub on windows XP)
outfile.mpeg as keyframes at frames (obtained with tool VirtualDub on 
windows XP) : 0, 5, 6, 9, 12, 17, 22, 27, 32, 37, 42, 47, 52, 57, 62, 
67, 72, 77, 82, 87, 92, 97, 99, 102, 105, 108, 113, 118, 123, 128, 133, 
138, 143, 148, 153, 158, 163, 168, 173, 178, 183, 188, 193, 198, 203, 
208, 213, 218, 223, 228, 233, 238, 243, 248, 253, 258, 263, 268, 273, 
278, 283, 288, 293, 298, 303, 308, 313, 318, 323, 328, 333, 338, 343, 
348, 353, 358, 363, 368, 373, 377
Maybe due to a bug somewhere ?

With some movie it works perfectly, but for others, it doesn't, i've 
uploaded the infile in irregular_keyframe_distance.mpeg (and the 
attached irregular_keyframe_distance.txt) in  
samples.mplayerhq.hu/MPlayer/incoming

You can easily reproduce the problem

Hope this helps!

Jerome Despatis
Source RH





More information about the ffmpeg-devel mailing list