[FFmpeg-trac] #2543(undetermined:new): ffmpeg fails to mux DVB subtitles into mpeg2 transport stream

FFmpeg trac at avcodec.org
Tue May 7 04:57:16 CEST 2013


#2543: ffmpeg fails to mux DVB subtitles into mpeg2 transport stream
-------------------------------------+-------------------------------------
             Reporter:               |                     Type:  defect
  timshackleton                      |                 Priority:  important
               Status:  new          |                  Version:
            Component:               |  unspecified
  undetermined                       |               Blocked By:
             Keywords:               |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 When using ffmpeg to transcode incoming mpeg2ts, selecting a dvb_subtitle
 stream for remux will cause ffmpeg to report "Application provided
 invalid, non monotonically increasing dts to muxer in stream".

 If a stream copy is used rather than a remux, ffmpeg exhibits an erratic
 output bitrate, in synchronization with dvb subtitle packets.  I suspect
 this may be because of the incorrect DTS presented to the mux, though
 nothing is logged via debug.

 However, the input stream I am using displays the DVB subtitles correctly
 when presented to a set top box via DVB-C.

 How to reproduce:
 {{{
 ffmpeg -re -i [input source] -f mpegts -map 0:0 -map 0:1 -map 0:2 -map 0:5
 -r 25 -flags +ildct+ilme -c:a:0 copy -c:a:1 copy -filter:v
 yadif=1:-1,scale=720:576,tinterlace=5 -aspect 16:9 -c:v libx264 -preset
 fast -b:v 4000000 -maxrate 4000000 -bufsize 4000000 -threads 0 -muxrate
 4500000 -vprofile main -level 2.1 -strict experimental -c:s:0 dvb_subtitle
 udp://239.255.128.7:1234?pkt_size=1316
 }}}

 Console output:

 ffmpeg version N-52835-g004779c Copyright (c) 2000-2013 the FFmpeg
 developers
   built on May  7 2013 12:15:30 with gcc 4.4.5 (Debian 4.4.5-8)
   configuration: --enable-libx264 --enable-gpl --enable-pthreads --enable-
 libvpx --disable-ffplay --disable-ffserver --disable-shared --enable-debug
   libavutil      52. 29.100 / 52. 29.100
   libavcodec     55.  7.100 / 55.  7.100
   libavformat    55.  4.101 / 55.  4.101
   libavdevice    55.  0.100 / 55.  0.100
   libavfilter     3. 63.101 /  3. 63.101
   libswscale      2.  2.100 /  2.  2.100
   libswresample   0. 17.102 /  0. 17.102
   libpostproc    52.  3.100 / 52.  3.100
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] non-existing PPS referenced
 [h264 @ 0x2a93200] non-existing PPS 0 referenced
 [h264 @ 0x2a93200] decode_slice_header error
 [h264 @ 0x2a93200] no frame!
 [h264 @ 0x2a93200] mmco: unref short failure
     Last message repeated 5 times
 [mpegts @ 0x2a8f400] max_analyze_duration 5000000 reached at 5024000
 microseconds
 [mpegts @ 0x2a8f400] PES packet size mismatch
     Last message repeated 2 times
 Input #0, mpegts, from 'tv1.ts':
   Duration: 21:26:02.81, start: 168445.431478, bitrate: 1 kb/s
   Program 1200
     Metadata:
       service_name    :
       service_provider:
     Stream #0:0[0x10e]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
 yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
     Stream #0:1[0x140](eng): Audio: aac_latm ([17][0][0][0] / 0x0011),
 48000 Hz, stereo, fltp
     Stream #0:2[0x145](ita): Audio: aac_latm ([17][0][0][0] / 0x0011),
 48000 Hz, stereo, fltp (visual impaired)
     Stream #0:3[0x1a5](eng): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz,
 5.1(side), fltp, 384 kb/s
     Stream #0:4[0x3f2](eng): Subtitle: dvb_teletext ([6][0][0][0] /
 0x0006)
     Stream #0:5[0x42e](eng): Subtitle: dvb_subtitle ([6][0][0][0] /
 0x0006) (hearing impaired)
 Duplicate formats in avfilter_merge_formats() detected
 [libx264 @ 0x2b84300] interlace + weightp is not implemented
 [libx264 @ 0x2b84300] using SAR=64/45
 [libx264 @ 0x2b84300] frame MB size (45x36) > level limit (792)
 [libx264 @ 0x2b84300] DPB size (4 frames, 2488320 bytes) > level limit (2
 frames, 1824768 bytes)
 [libx264 @ 0x2b84300] MB rate (40500) > level limit (19800)
 [libx264 @ 0x2b84300] using cpu capabilities: MMX2 SSE2Fast SSSE3
 FastShuffle SSE4.2 AVX
 [libx264 @ 0x2b84300] profile Main, level 2.1
 Output #0, mpegts, to 'udp://239.255.128.7:1234?pkt_size=1316':
   Metadata:
     encoder         : Lavf55.4.101
     Stream #0:0: Video: h264 (libx264), yuv420p, 720x576 [SAR 64:45 DAR
 16:9], q=-1--1, 4000 kb/s, 90k tbn, 25 tbc
     Stream #0:1(eng): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz,
 stereo
     Stream #0:2(ita): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz,
 stereo (visual impaired)
     Stream #0:3(eng): Subtitle: dvb_subtitle (dvbsub) (hearing impaired)
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 -> libx264)
   Stream #0:1 -> #0:1 (copy)
   Stream #0:2 -> #0:2 (copy)
   Stream #0:5 -> #0:3 (dvbsub -> dvbsub)
 Press [q] to stop, [?] for help
 [h264 @ 0x4f2f6c0] reference picture missing during reorder
     Last message repeated 1 times
 [h264 @ 0x4f2f6c0] Missing reference picture, default is 0
 [h264 @ 0x4f2f6c0] decode_slice_header error
 [h264 @ 0x50531e0] mmco: unref short failure
     Last message repeated 1 times
 [h264 @ 0x527a620] reference picture missing during reorder
 [h264 @ 0x527a620] Missing reference picture, default is 65412
 [h264 @ 0x52e8aa0] mmco: unref short failure
     Last message repeated 1 times
 Application provided invalid, non monotonically increasing dts to muxer in
 stream 3: 3068819 >= 659519
 Application provided invalid, non monotonically increasing dts to muxer in
 stream 3: 3359519 >= 849419
 frame=  407 fps= 23 q=-1.0 Lsize=   21708kB time=00:00:39.43
 bitrate=4509.2kbits/s dup=44 drop=0
 video:6808kB audio:251kB subtitle:19 global headers:0kB muxing overhead
 206.692226%
 [libx264 @ 0x2b84300] frame I:8     Avg QP:10.21  size:108625
 [libx264 @ 0x2b84300] frame P:122   Avg QP:14.09  size: 36572
 [libx264 @ 0x2b84300] frame B:277   Avg QP:17.55  size:  5922
 [libx264 @ 0x2b84300] consecutive B-frames:  6.1%  6.9%  7.4% 79.6%
 [libx264 @ 0x2b84300] mb I  I16..4: 14.9%  0.0% 85.1%
 [libx264 @ 0x2b84300] mb P  I16..4:  1.8%  0.0%  8.1%  P16..4: 26.1% 30.2%
 21.3%  0.0%  0.0%    skip:12.5%
 [libx264 @ 0x2b84300] mb B  I16..4:  1.4%  0.0%  0.9%  B16..8: 19.4% 13.4%
 2.2%  direct:18.5%  skip:44.2%  L0:33.1% L1:39.4% BI:27.5%
 [libx264 @ 0x2b84300] field mbs: intra: 22.4% inter:0.8% skip:0.9%
 [libx264 @ 0x2b84300] coded y,uvDC,uvAC intra: 89.2% 94.1% 87.9% inter:
 35.1% 36.9% 11.9%
 [libx264 @ 0x2b84300] i16 v,h,dc,p: 32% 14% 34% 20%
 [libx264 @ 0x2b84300] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 17% 11%  6%  7%
 9%  6%  9%  6%
 [libx264 @ 0x2b84300] i8c dc,h,v,p: 41% 20% 28% 11%
 [libx264 @ 0x2b84300] ref P L0: 71.4% 28.4%  0.1%  0.1%
 [libx264 @ 0x2b84300] ref B L0: 86.4% 13.6%  0.0%  0.0%
 [libx264 @ 0x2b84300] ref B L1: 96.1%  3.9%
 [libx264 @ 0x2b84300] kb/s:3425.57


 Please note that for purposes of diagnosis, I have commented out "return
 AVERROR(EINVAL);" from line 460 of libavformat/mux.c so ffmpeg proceeds
 with the mux with the broken timestamp.  This results in the set top box
 presenting the subtitle ~20 seconds from where it should be.

 It is also worth noting, that analysis of this source SPTS with an Acterna
 DTS330 indicates that the timestamps across video, audio and dvb subtitle
 streams are correct.  I can only suspect that ffmpeg is extracting an
 incorrect timestamp.

 I can provide source stream captures.

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


More information about the FFmpeg-trac mailing list