Opened 9 years ago

Closed 9 years ago

#4752 closed defect (fixed)

DVB Subtitles don't burn into overlay

Reported by: miguelapg Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: dvbsub regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hi,

I using the well-known and documented filter to burn dvb subtitles as follow ...

-filter_complex '[0:v][0:s:0]overlay[vid]' -map '[vid]' -map 0:a

I have a stream as follow ...
Stream #0:0[0xcd]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x195](eng): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, 5.1(side), fltp, 448 kb/s
Stream #0:2[0x25d](ara): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:3[0x271](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)

In the encoding process I get the following status ...
Stream mapping:

Stream #0:0 (h264) -> overlay:main (graph 0)
Stream #0:2 (dvbsub) -> overlay:overlay (graph 0)
overlay (graph 0) -> Stream #0:0 (libx265)
Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfdk_aac))

The encoding line I am using is ...

ffmpeg -re -threads 0 -i 'udp://x.x.x.x:1234?fifo_size=1000000&overrun_nonfatal=1' -f hls -hls_time 10 -hls_list_size 6 -pix_fmt yuv420p -c:v libx265 -preset:v ultrafast -s 1280x720 -b:v 1000k -filter_complex '[0:v][0:s:0]overlay[vid]' -map '[vid]' -map 0:a -c:a libfdk_aac -ar 48000 -b:a 64k -ac 2 -threads 0 -y '/test/master.m3u8'

BUT I get the folowing error all time ...
[dvbsub @ 0x3ff3ee0] Invalid clut depth 0x0!

If I copy subtitles I can parse subtitles to file doing the following ...

-map 0:0 -map 0:1 -map 0:2 -c:s:0 copy

... and I can see the subtitles in VLC, so subtitles are there, but I don't know why I cannot burn it in the video.

I think there is a bug since Subtitles are present and can be seen on VLC when they are copied.

Regards
Mapg

Change History (5)

comment:1 by Carl Eugen Hoyos, 9 years ago

Component: ffmpegundetermined
Keywords: dvbsub added; subtitles dvb removed
Priority: importantnormal

Please provide your failing command line (as short as possible, ie not using the segment muxer, and avoiding x264 by using -vcodec mpeg4) together with the complete, uncut console output to make this a valid ticket. A dump of your input stream (made for example with mplayer -dumpstream) will probably be needed.

comment:2 by miguelapg, 9 years ago

Line of commands used ...

ffmpeg -i 'udp://xxx.xxx.xxx:1234' -vcodec mpeg4 -filter_complex '[0:v][0:s:0]overlay[vid]' -map '[vid]' -an '/test/master.mpg'

Console output ...

ffmpeg version N-73517-g47d0773 Copyright (c) 2000-2015 the FFmpeg developers

built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: pkg_config='pkg-config --static' --prefix=/root/ffmpeg/build --extra-cflags=-I/root/ffmpeg/build/include --extra-ldflags=-L/root/ffmpeg/build/lib --bindir=/usr/local/bin --enable-gpl --enable-libass --enable-libfreetype --enable-nonfree --enable-libfdk-aac --enable-libfaac --enable-libx264 --enable-libx265 --disable-ffplay --disable-ffserver --enable-libfontconfig
libavutil 54. 28.100 / 54. 28.100
libavcodec 56. 47.100 / 56. 47.100
libavformat 56. 40.100 / 56. 40.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 21.100 / 5. 21.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100

Input #0, mpegts, from 'udp://xxx.xxx.xxx:1234':

Duration: N/A, start: 56993.809689, bitrate: N/A
Program 1163

Stream #0:0[0xcb]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x193](eng): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, 5.1(side), fltp, 448 kb/s
Stream #0:2[0x25b](ara): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:3[0x265](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)

Output #0, mpeg, to '/test/master.mpg':

Metadata:

encoder : Lavf56.40.100
Stream #0:0: Video: mpeg4, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 90k tbn, 25 tbc (default)
Metadata:

encoder : Lavc56.47.100 mpeg4

Stream mapping:

Stream #0:0 (h264) -> overlay:main
Stream #0:2 (dvbsub) -> overlay:overlay
overlay -> Stream #0:0 (mpeg4)

Press [q] to stop, ? for help
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
[dvbsub @ 0x3ef6d60] Invalid clut depth 0x0!
frame= 835 fps= 29 q=31.0 Lsize= 8384kB time=00:00:33.40 bitrate=2056.3kbits/s dup=20 drop=0
video:8341kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.513478%

You can find a dump of the source made with mplayer at ...

http://www.humanfactor.tv/download/dump_dvbsubtitles.mp4

The line used in mplayer was as follow ...
mplayer 'udp://xxx.xxx.xxx:1234' -dumpstream -dumpfile '/test/dump_dvbsubtitles.mp4'

Let me know if you need something more.

Regards,
Mapg

comment:3 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavcodec
Keywords: regression added
Priority: normalimportant
Reproduced by developer: set
Status: newopen

Regression since c5b6b711 - patch sent.

comment:4 by Carl Eugen Hoyos, 9 years ago

The regression is fixed in 087c0a0a934abcb8e608020cf907c9e88b75f401
I opened ticket #4754 because the subtitles look ugly with FFmpeg afaict (but nicer with vlc).

comment:5 by Carl Eugen Hoyos, 9 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.