[Libav-user] AVSEEK_FLAG_BYTE resets packet dts

Alex Cohn alexcohn at netvision.net.il
Mon Nov 7 08:32:38 CET 2011


On Sun, Nov 6, 2011 at 15:11, Burk <burkheart at yahoo.com> wrote:
> Thanks Alex, I have only tested with AVI/Xvid, but eventually will add
> MKV/x264.
> I see so ffmpeg is doing the counting internally, but when it seeks by file
> position it loses the point of reference.
> I guess seeking by index will know the target frame number that's why it
> works there.
> I was hoping that the container or the codec will "waste" 8 bytes to
> remember the frame number in cases like that :-)
>
> Cheers, Thomas

Unfortunately, they do not work this way. If you are skipping
forwards, you probably should be skipping frames one by one, until you
reach the expected byte offset. Skipping backwards, you can store the
frame boundaries for yourself.

Good luck,
Alex


More information about the Libav-user mailing list