View Full Version : Seeking time on AVI takes too long
CCEncoder
5th September 2004, 06:13
I was watching [MCE-F] Ragnarok The Animation - 21.avi decided to open it in virtualdub then after exploring I tried to quiet while dubbing, but it said "don't do it or the avi may broke" so I said no, then I fast foward and backward the file quickly (maybe too quickly? to see if it was fine, but after that, I tried to play the avi again on WM and it shows "Broken B frame error" ,etc so I decided to reencode it using virtualdub and the xvid compressor, but now seeking times is slow altough for some parts is quick but most of the time the player keeps the last frame static, while already playing the sound from another range, you know when you fast foward it, it may take some time but this is boring I waited 30sec and nothing, so please help me up, to improve seeking times.
Mug Funky
5th September 2004, 19:03
it's the nature of any motion-compensated codec to be a slow seeker.
this is because the only frames that are self contained are the keyframes. if you wish to only seek to keyframes, simply hold down "alt" while seeking in virtualdub. you'll find it's quite a lot faster. you can't do this while it's playing, but that's not a big deal.
if there's an excessive distance between keyframes (like 300, 400, even a few thousand on slow boring scenes), the decoder has to find the last keyframe (which may be ~2000 frames back), and play through the b and p frames until it hits the spot you moved the playback head to. if it didn't do this, you'd have a very odd looking picture after seeking (mostly black, or grey, or garbage, with one or two pure blocks on it where the codec has chosen to encode intra blocks instead of using motion compensation).
btw, try use ffdshow as a decoder - it's much faster than divx (letting you play higher res movies without jerk), and will work around encoder bugs to a certain degree.
don't re-encode unless you must - you'll lose way too much quality. it should be a last resort.
there's also muxing tools and other things out there that could possibly fix your problems - if it's a stream error than it'll be fixable. if it's an encoder error, it would have different symptoms i think.
Cyberman
6th September 2004, 12:37
Originally posted by Mug Funky
if you wish to only seek to keyframes, simply hold down "alt" while seeking in virtualdub.
Surely you mean SHIFT, not ALt - ALT jumps 50 frames, SHIFT to the next/previous keyframe and CTRL to start/end.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.