[FFmpeg-devel] ogg seeking status

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Feb 6 21:08:49 CET 2012

On Mon, Feb 06, 2012 at 12:14:09PM -0500, Don Moir wrote:
> o - the reimar patch to ogg_read_timestamp does provide somewhat accurate keyframe seeking - problem is it doesn't get close enough - not sure if this is a failure of the algorithm or not but I do know that much closer keyframes are available - I was not able to improve on it. Since you still don't have the index entries, future seeks will tend to have the same "not close enough" problem and this can effect exact timestamp seeking quite abit. If you don't care about exact timestamp seeking then I suppose it works well enough, but expect it to be off sometimes quite abit.

Can you provide a sample?

> o - I have to set os->keyframe to zero after a seek - I think it may be a hyothetical that this can cause a failure - so be it - I cannot find a single file where this is a problem but I can find about 20 percent of files tested that will have a problem if I don't do this. I would rather have most of the files working rather than one that might fail on occasion.'

Well, the patch I posted fixes the issues for the sample file you have.
If you still have issues with other files, we'll need more samples since
that should be a different bug then.
And if the files that are fixed by setting os->keyframe to zero are all
broken whereas the one that is broken is valid, I prefer the valid file
to work almost no matter how many % it fixes.

> o - the ffdshow libavcodec implementation seems to work better than the ffmpeg implementation for ogg files. Mostly this means it dosen't have the problems associated with not setting os->keyframe to zero after seek in ffmpeg. Seeking can be faster but doesn't always appear to be optimal. (ffdshow's libavcodec is not the same as ffmpeg's libavcodec - just the same name as far as I know)

libavcodec is not involved at all in this, only libavformat.
And I wasn't even aware ffdshow handles demuxing nowadays.

More information about the ffmpeg-devel mailing list