Opened 6 years ago

Closed 5 years ago

#822 closed defect (fixed)

h264 in mkv: non monotonically increasing dts

Reported by: StevenG Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: H264 mkv av_interleaved_write_frame
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hi,

tried this:

d:\9 Project\qt\xMp4-build-desktop\tools>ffmpeg -i m:\temp\a-001.mkv -map 0:0 -c
 copy m:\temp\a.mp4
ffmpeg version N-35709-g7d531e8, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 12 2011 13:50:00 with gcc 4.6.2
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 43. 0 / 53. 43. 0
  libavformat  53. 24. 0 / 53. 24. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[h264 @ 0212A560] Increasing reorder buffer to 1
Input #0, matroska,webm, from 'm:\temp\a-001.mkv':
  Metadata:
    title           : HD Suisse - SwissView
  Duration: 00:00:01.50, start: 0.000000, bitrate: 12741 kb/s
    Stream #0:0: Video: h264 (High), yuv420p, 1280x720, SAR 1:1 DAR 16:9, 50 fps
, 50 tbr, 1k tbn, 100 tbc (default)
    Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), s16, 448 kb/s (default)
Output #0, mp4, to 'm:\temp\a.mp4':
  Metadata:
    title           : HD Suisse - SwissView
    encoder         : Lavf53.24.0
    Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 D
AR 16:9], q=2-31, 50 fps, 1k tbn, 1k tbc (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 024BBAE0] Application provided invalid, non monotonically increasing dts
to muxer in stream 0: 40 >= 0
av_interleaved_write_frame(): Invalid argument

and didn't get what i wanted.

Attachments (2)

a-001.mkv (2.3 MB) - added by StevenG 6 years ago.
source file
a.mp4 (91.6 KB) - added by StevenG 6 years ago.
result file

Change History (9)

Changed 6 years ago by StevenG

source file

Changed 6 years ago by StevenG

result file

comment:1 Changed 6 years ago by cehoyos

  • Component changed from FFmpeg to undetermined
  • Keywords H264 av_interleaved_write_frame added; mp4 removed
  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from [mp4 @ 024BBAE0] av_interleaved_write_frame() to h264 in mkv: non monotonically increasing dts

comment:2 Changed 6 years ago by StevenG

What in a hell this thing "non monotonically increasing dts" ?
Maybe is better to disable this, so it will don't cause any problem ?

comment:3 follow-up: Changed 6 years ago by cehoyos

Are you suggesting that FFmpeg should produce invalid files by default?

comment:4 in reply to: ↑ 3 Changed 6 years ago by StevenG

Replying to cehoyos:

Are you suggesting that FFmpeg should produce invalid files by default?

No, for sure.

comment:5 Changed 6 years ago by StevenG

I found a solution how to work around this bug:

  1. i extract *.h264 with mkvextract
  2. ffmpeg -i VIDEO.h264 -i AUDIO -c copy VIDEO.mp4
  3. i got messages
    pts has no value
    [mp4 @ 02235020] pts has no value
        Last message repeated 53 times
    

but i got partially working *.mp4 media [on xbox 360 NOT a smooth playback].

Hope this helps.

comment:6 Changed 5 years ago by michael

With latest ffmpeg this now fails with:
pts (0) < dts (40) in stream 0
av_interleaved_write_frame(): Invalid argument
instead of non monotonically increasing dts

comment:7 Changed 5 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

This is not reproducible anymore.

Note: See TracTickets for help on using tickets.