[FFmpeg-trac] #3572(undetermined:new): failure to remux mkv to mkv with pts < dts error

FFmpeg trac at avcodec.org
Thu Apr 17 15:16:45 CEST 2014


#3572: failure to remux mkv to mkv with pts < dts error
-------------------------------------+-------------------------------------
             Reporter:  bubbleguuum  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 This problematic mkv used in the command line belwos was recorded by
 TVheadend off Satellite on a UK HD (BBC) channel.

 The 5MB sample can be downloaded here:
 http://bubblesoftapps.com/tmp/ToyStory2.2014-04-13.20-00-sample.mkv

 The command line attempt to keep the h264 stream (copy) and convert the
 mp2 audio track to mp3.

 It fails with a pts < dts error, generating a very short 100Kb file.

 If the h264 is transcoded to h264 instead of just copied, it works.

 So there seems to be a problem keeping the original video track while
 transcoding the audio track.



 How to reproduce:
 {{{
 % $ ffmpeg -y  -i ToyStory2.2014-04-13.20-00-sample.mkv -map 0:0 -c:0 copy
 -map 0:1 -c:1 libmp3lame -ac:1 2 -b:1 320k test.mkv
 ffmpeg version N-62475-g256f530 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Apr 15 2014 22:01:57 with gcc 4.8.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
 librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-
 aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs
 --enable-libxvid --enable-zlib
   libavutil      52. 76.100 / 52. 76.100
   libavcodec     55. 58.103 / 55. 58.103
   libavformat    55. 37.100 / 55. 37.100
   libavdevice    55. 13.100 / 55. 13.100
   libavfilter     4.  4.100 /  4.  4.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 18.100 /  0. 18.100
   libpostproc    52.  3.100 / 52.  3.100
 [h264 @ 02ca0360] mmco: unref short failure
     Last message repeated 4 times
 [h264 @ 02ca0360] number of reference frames (0+5) exceeds max (4;
 probably corrupt input), discarding one
 Input #0, matroska,webm, from 'ToyStory2.2014-04-13.20-00-sample.mkv':
   Metadata:
     title           : Toy Story 2
     encoder         : Tvheadend Matroska muxer
     DATE_BROADCASTED: 2014-04-13 20:00:00
     ORIGINAL_MEDIA_TYPE: TV
     CONTENT_TYPE    : Movie / Drama
     TVCHANNEL       : BBC Three HD
     SUMMARY         : Animated comedy. When Woody is kidnapped, Buzz
 Lightyear and the other toys set out in hot pursuit. However, when they
 find him they discover him in a new life, with new friends. [1999] [AD,S]
     SUMMARY-eng     : Animated comedy. When Woody is kidnapped, Buzz
 Lightyear and the other toys set out in hot pursuit. However, when they
 find him they discover him in a new life, with new friends. [1999] [AD,S]
   Duration: 01:42:05.14, start: 0.005000, bitrate: 6 kb/s
     Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709), 1920x1080
 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
     Stream #0:1(nar): Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s
 (default)
     Stream #0:2(eng): Subtitle: dvb_subtitle (default)
     Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
 (default)
     Stream #0:4(eng): Subtitle: subrip (default)
 Output #0, matroska, to 'test.mkv':
   Metadata:
     title           : Toy Story 2
     SUMMARY-eng     : Animated comedy. When Woody is kidnapped, Buzz
 Lightyear and the other toys set out in hot pursuit. However, when they
 find him they discover him in a new life, with new friends. [1999] [AD,S]
     DATE_BROADCASTED: 2014-04-13 20:00:00
     ORIGINAL_MEDIA_TYPE: TV
     CONTENT_TYPE    : Movie / Drama
     TVCHANNEL       : BBC Three HD
     SUMMARY         : Animated comedy. When Woody is kidnapped, Buzz
 Lightyear and the other toys set out in hot pursuit. However, when they
 find him they discover him in a new life, with new friends. [1999] [AD,S]
     encoder         : Lavf55.37.100
     Stream #0:0(eng): Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080
 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 1k tbn, 1k tbc (default)
     Stream #0:1(nar): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000
 Hz, stereo, s16p, 320 kb/s (default)
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (mp2 -> libmp3lame)
 Press [q] to stop, [?] for help
 [matroska @ 04d5a9e0] pts (155) < dts (255) in stream 0
 av_interleaved_write_frame(): Invalid argument
 [libmp3lame @ 04d05f80] Trying to remove 1152 samples, but the queue is
 empty
 [matroska @ 04d5a9e0] Encoder did not produce proper pts, making some up.
 frame=    3 fps=0.0 q=-1.0 Lsize=      93kB time=00:00:00.23
 bitrate=3231.7kbits/s
 video:109kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.

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


More information about the FFmpeg-trac mailing list