[Libav-user] How to precisely seek in an audio file

Matthieu Regnauld mregnauld at gmail.com
Fri Oct 26 19:23:54 EEST 2018

Thank you very much.
Now it works the same way for both mp3 and ogg (and actually, position is
in microseconds, for your information).

But I still have a slight delay between the requested position and the
actual position (which is the same if I try with the same song in mp3 or
ogg), even if I ask to position to the very beginning of the file, like

   av_seek_frame(formatContext, -1, 0, 0);

I wonder if, maybe, the actual position is the closest keyframe (but is
there any keyframe in ogg or mp3?).
I read the avformat header, but I don't find that much information,
especially since I'm quite new to ffmpeg...

Is there any way that I can fix this annoying delay?

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20181026/819a4982/attachment.html>

More information about the Libav-user mailing list