[FFmpeg-trac] #960(undetermined:closed): h264 in ts: non monotonically increasing dts

FFmpeg trac at avcodec.org
Wed Feb 1 18:41:44 CET 2012


#960: h264 in ts: non monotonically increasing dts
-------------------------------------+-------------------------------------
             Reporter:  aurelien     |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:               |               Resolution:  invalid
  av_interleaved_write_frame h264    |               Blocked By:
  ts                                 |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  1            |
-------------------------------------+-------------------------------------
Changes (by mjs973):

 * analyzed:  0 => 1
 * status:  open => closed
 * resolution:   => invalid


Comment:

 As you've already noticed, the timestamps in this stream are not valid.
 The duplicate timestamps happen many, many times in this file. The file is
 broken.

 The only way to (maybe) fix this *with ffmpeg* is to re-encode the video,
 which will generate new timestamps as a side-effect. Even then, you may
 discover that audio sync gets more and more wrong as you play the file (I
 didn't check). For example:

 ./ffmpeg -vsync 0 -i sample-non-monotonic-dts_cut.ts -vcodec mpeg2video -b
 5000000 -acodec copy out.ts

 You need the '-vsync 0' option because the input video has field pictures,
 not frame pictures, and ffmpeg gets the input frame rate wrong. This bug
 has existed forever.

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


More information about the FFmpeg-trac mailing list