[FFmpeg-trac] #2316(undetermined:new): Provide a seeking API that works for files with discontinuous timestamps

FFmpeg trac at avcodec.org
Sat Mar 2 10:08:18 CET 2013


#2316: Provide a seeking API that works for files with discontinuous timestamps
-------------------------------------+-------------------------------------
             Reporter:  gjdfgh       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Some formats (like MPEG stuff) can have discontinuous timestamps. This
 means the data stream is partitioned into segments of packets with
 monotonically increasing TS, but when crossing the segment boundaries, the
 TS changes to another arbitrary value. It's well possible that two
 segments use exactly the same timestamps.

 This completely breaks the seeking API, which is based on absolute
 timestamps. There is AVSEEK_FLAG_BYTE too, but that has lower precission,
 and '''doesn't even work for some formats''' (consider chained OGG).

 Note that even if timestamps are unique, seeking probably doesn't work
 well with such files (I haven't actually tested it, but binary search will
 obviously break?).

 Please extend the seeking API so that this works. I see a few
 possibilities:
 - add generation of linear, monotonically increasing PTS, and use that for
 seeking
 - add the ability to do relative seeks
 - fix AVSEEK_FLAG_BYTE for all demuxers that report it as supported, and
 support it for all demuxers that support discontinuous TS

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2316>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list