[FFmpeg-trac] #2375(FFprobe:new): FFprobe outputs nonsense DTS/PTS for streams with reordered frames

FFmpeg trac at avcodec.org
Tue Mar 19 00:43:39 CET 2013


#2375: FFprobe outputs nonsense DTS/PTS for streams with reordered frames
-------------------------------------+-------------------------------------
             Reporter:  dbuitenh     |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  FFprobe
              Version:  git-master   |               Resolution:
             Keywords:  ffprobe,     |               Blocked By:
  timestamps, pts, dts, mpeg2        |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by michael):

 Replying to [comment:7 dbuitenh]:
 > Replying to [comment:6 dbuitenh]:
 > > Replying to [comment:5 michael]:
 > > > Replying to [comment:4 dbuitenh]:
 > > > > Replying to [comment:3 michael]:
 > > > > > That is if either all pts or all dts from the AVPacket input are
 corrupted then the other value on the AVFrames will be unaffected and can
 be used for correctly timed display.
 > > > >
 > > > > You should not be using DTS at all for displaying in the first
 place. That's what PTS is for.
 > > >
 > > > "all pts or all dts from the AVPacket input are corrupted", the pts
 are corrupted (or could be plain unavailable or all 0), its DTS or nothing
 in such cases
 > >
 > > That hardy justifies this massive hack, where you completely screw
 every other non-broken file's DTS into what is not actually a DTS in the
 first place. That is straight up lying on most files. If they're all
 corrupt, then fill in the PTS and DTS conditionally. Don't lie about what
 the DTS is on every other legitimate file. That's ass-backwards behavior.
 >
 > I should ALSO note:
 http://ffmpeg.org/doxygen/trunk/structAVFrame.html#aa52951f35ec9e303d3dfeb4b3e44248a
 >
 > "DTS copied from the AVPacket that triggered returning this frame"
 >
 > So that's a straight up lie. Also it's named '''pkt_dts''' the pkt is
 FOR PACKET.

 Lets take an example:
 {{{
 Packet  PTS      1 4 2 3 7 5 6
 Packet  DTS      0 1 2 3 4 5 6
 Packet Type      I P B B P B B
                  Decoder here
 Frame  Type        I B B P B B
 AVFrame pkt_dts:   1 2 3 4 5 6
 }}}

 You can see that the AVFrame.pkt_dts is the AVPacket dts of the packet
 that triggered the frame to be returned (in a standard reference decoder)

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2375#comment:8>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list