[Libav-user] How reliable the file position of a packet is?

Max Vlasov max.vlasov at gmail.com
Wed Feb 11 14:15:10 CET 2015


Hi,

Probably due to a urge to experiement, I implemented several ways of
locating an existing packet in a saved index. Probably most straightforward
is pts-based, but I tried also using file position.

Unfortunately I noticed at least two occasions when this didn't work:
-  for mpg/ts files this position usually change after seek, so the same
packet may contain a different file position when visited second time after
seek
- For mkv files two different packets may represent the same file position.

So should I forget about this field whatsoever? But If the field exists,
but might be so unreliable, does it exist only for the demuxer own needs?

Thanks

Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20150211/bf5c6992/attachment.html>


More information about the Libav-user mailing list