Opened 12 years ago

Closed 12 years ago

#796 closed defect (fixed)

H.264 in MKV to MP4: non monotonically increasing dts

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

Description

ffmpeg -i test.mkv -vcodec copy test.mp4
ffmpeg version N-35966-g1d0ae92, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 19 2011 13:06:47 with gcc 4.6.2
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 46. 1 / 53. 46. 1
  libavformat  53. 27. 0 / 53. 27. 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

Seems stream 0 codec frame rate differs from container frame rate: 120.00 (120/1) -> 59.94 (60000/1001)
Input #0, matroska,webm, from 'temp.mkv':
  Duration: 00:00:04.15, start: 0.000000, bitrate: 6761 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 59.94 tbr, 1k tbn, 120 tbc (default)
Output #0, mp4, to 'temp.mp4':
  Metadata:
    encoder         : Lavf53.27.0
    Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 1k tbn, 1k tbc (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 00000000042FF710] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 0
av_interleaved_write_frame(): Invalid argument

Though there are similar tickets regarding the non monotonically increasing dts error, a few devs started to make a new ticket regarding each sample that shows the issue.

Attachments (1)

temp_cut.mkv (2.4 MB ) - added by Carl Eugen Hoyos 12 years ago.

Change History (4)

comment:1 by Snowknight26, 12 years ago

Input file is too big to be attached so here it is:
http://stfcc.org/misc/temp.mkv

by Carl Eugen Hoyos, 12 years ago

Attachment: temp_cut.mkv added

comment:2 by Carl Eugen Hoyos, 12 years ago

Keywords: h264 av_interleaved_write_frame added
Reproduced by developer: set
Status: newopen
$ ffmpeg -i temp_cut.mkv -vcodec copy out.mp4
ffmpeg version N-35966-g1d0ae92, Copyright (c) 2000-2011 the FFmpeg developers
  built on Dec 19 2011 23:23:13 with gcc 4.5.3
  configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32'
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 46. 1 / 53. 46. 1
  libavformat  53. 27. 0 / 53. 27. 0
  libavdevice  53.  4. 0 / 53.  4. 0
  libavfilter   2. 53. 0 /  2. 53. 0
  libswscale    2.  1. 0 /  2.  1. 0

Seems stream 0 codec frame rate differs from container frame rate: 120.00 (120/1) -> 59.94 (60000/1001)
Input #0, matroska,webm, from 'temp_cut.mkv':
  Duration: 00:00:04.15, start: 0.000000, bitrate: 4934 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 59.94 tbr, 1k tbn, 120 tbc (default)
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf53.27.0
    Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 1k tbn, 1k tbc (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x8dc31a0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 8 >= 0
av_interleaved_write_frame(): Invalid argument

comment:3 by Carl Eugen Hoyos, 12 years ago

Resolution: fixed
Status: openclosed

Remuxing works with current git head.

Note: See TracTickets for help on using tickets.