Opened 4 weeks ago

Closed 3 weeks ago

#6552 closed defect (worksforme)

Unable to overlay DVB subtitles into the output video

Reported by: pth7712 Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: dvbsub
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Seems like the dvb subtitles aren't properly decoded. No subtitles are burned in the output video.

VLC player is able to show these subtitles properly.

How to reproduce:
Download sample input TS file from here:
https://mega.nz/#!F4JFzAJT!dvSUVCz4qGki5Mf6_OnH6BWZHnaKpqT6IPw6ACZ1O8M

Used command line is:

[root@mydesktop ffmpeg]# ./ffmpeg -loglevel info -re    -i /home/user/test/a/sample.ts   -filter_complex [0:v][0:s:0]overlay[v],[v]yadif=0:-1:0,setdar=ratio=16/9:max=1000,split=1[out1]  -map [out1]  -vcodec h264  -map 0:a:0 -c:a:0 mp2  -b:a:0 192000   -flush_packets 0 -f mpegts  /home/user/test/a/sample_so.ts
ffmpeg version N-86848-g03a9e6f Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
  configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags='-L/root/ffmpeg_build/lib -ldl' --bindir=/root/bin --pkg-config-flags=--static --enable-gpl --enable-libfreetype --enable-libx264 --enable-nonfree
  libavutil      55. 68.100 / 55. 68.100
  libavcodec     57.102.100 / 57.102.100
  libavformat    57. 76.100 / 57. 76.100
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 95.100 /  6. 95.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
[mpegts @ 0x316b680] start time for stream 2 is not set in estimate_timings_from_pts
Input #0, mpegts, from '/home/user/test/a/sample.ts':
  Duration: 00:00:34.90, start: 1.400000, bitrate: 4998 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x102](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  Stream #0:2 (dvbsub) -> overlay:overlay (graph 0)
  split (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (ac3 (native) -> mp2 (native))
Press [q] to stop, [?] for help
[mpegts @ 0x316b680] sub2video: using 1920x1080 canvas:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
[libx264 @ 0x319c4a0] using SAR=1/1
[libx264 @ 0x319c4a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x319c4a0] profile High, level 4.0
Output #0, mpegts, to '/home/user/test/a/sample_so.ts':
  Metadata:
    encoder         : Lavf57.76.100
    Stream #0:0: Video: h264 (libx264), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc57.102.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(eng): Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s
    Metadata:
      encoder         : Lavc57.102.100 mp2
frame=  818 fps= 18 q=-1.0 Lsize=   10348kB time=00:00:34.76 bitrate=2438.7kbits/s speed=0.744x    
video:8715kB audio:767kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.133635%
[libx264 @ 0x319c4a0] frame I:19    Avg QP:17.53  size: 42568
[libx264 @ 0x319c4a0] frame P:207   Avg QP:20.30  size: 17185
[libx264 @ 0x319c4a0] frame B:592   Avg QP:21.30  size:  7700
[libx264 @ 0x319c4a0] consecutive B-frames:  2.7%  1.7%  2.2% 93.4%
[libx264 @ 0x319c4a0] mb I  I16..4: 25.0% 70.1%  4.9%
[libx264 @ 0x319c4a0] mb P  I16..4:  8.8% 20.4%  0.2%  P16..4: 29.8%  4.0%  3.1%  0.0%  0.0%    skip:33.8%
[libx264 @ 0x319c4a0] mb B  I16..4:  1.0%  1.1%  0.0%  B16..8: 33.4%  1.6%  0.1%  direct: 3.9%  skip:58.9%  L0:47.1% L1:51.8% BI: 1.1%
[libx264 @ 0x319c4a0] 8x8 transform intra:67.0% inter:93.6%
[libx264 @ 0x319c4a0] coded y,uvDC,uvAC intra: 24.0% 36.7% 4.8% inter: 8.4% 15.6% 0.0%
[libx264 @ 0x319c4a0] i16 v,h,dc,p: 48% 30%  8% 14%
[libx264 @ 0x319c4a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 14% 42%  2%  2%  2%  2%  2%  2%
[libx264 @ 0x319c4a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 24% 16%  5%  6%  6%  6%  3%  4%
[libx264 @ 0x319c4a0] i8c dc,h,v,p: 63% 17% 18%  2%
[libx264 @ 0x319c4a0] Weighted P-Frames: Y:1.4% UV:1.4%
[libx264 @ 0x319c4a0] ref P L0: 63.9%  7.5% 19.9%  8.6%  0.1%
[libx264 @ 0x319c4a0] ref B L0: 89.3%  8.7%  1.9%
[libx264 @ 0x319c4a0] ref B L1: 95.3%  4.7%
[libx264 @ 0x319c4a0] kb/s:2176.67


Change History (4)

comment:1 Changed 3 weeks ago by cehoyos

  • Keywords overlay subtitles burn removed

How did you create the sample?
Never use FFmpeg to cut transport streams, use dd or a similar tool.

comment:2 Changed 3 weeks ago by pth7712

Hi, here is another sample. It isn't cut with ffmpeg.
https://mega.nz/#!144kXICC!TuI2ydOt8I1fBKeVPPwGnDAgB3jMK05hUSwqtB3mmmM
Please note - there are two subtitle streams.

comment:3 Changed 3 weeks ago by pth7712

Hello,
I'm closing this defect, because it isn't caused by ffmpeg directly.
The sample input TS file (on the first link) was recorded by ffmpeg from a live MPEG-TS UDP stream decoded by h264_qsv.
If h264_qsv isn't used, the issue doesn't exists.

comment:4 Changed 3 weeks ago by pth7712

  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.