DVB subtitles encoding doesn't work
DVB subtitles fails to render when encoding to mpegts container.
Tested with latest 3.0.8 and nightly build on Macos Catalina and Linux Debian Sid.
The following media:
mkvinfo media.mkv
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: matroska
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size 1267795031
|+ Seek head (subentries will be skipped)
|+ EBML void: size 4027
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: libebml v1.3.9 + libmatroska v1.5.2
| + Writing application: mkvmerge v41.0.0 ('Smarra') 64-bit
| + Duration: 00:02:00.000000000
| + Date: Thu Dec 12 23:41:53 2019 UTC
| + Segment UID: 0xf4 0x83 0x30 0x69 0xa3 0x59 0xd7 0xfd 0xa8 0xa7 0x0e 0x48 0x1e 0xca 0x0d 0x00
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 11466345398221595381
| + Track type: video
| + Lacing flag: 0
| + Codec ID: V_PRORES
| + Codec's private data: size 4
| + Default duration: 00:00:00.040000000 (25.000 frames/fields per second for a video track)
| + Language: und
| + Video track
| + Pixel width: 1920
| + Pixel height: 1080
| + Display width: 1920
| + Display height: 1080
| + Track
| + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
| + Track UID: 11960456180197436021
| + Track type: audio
| + Codec ID: A_PCM/INT/LIT
| + Default duration: 00:00:00.031250000 (32.000 frames/fields per second for a video track)
| + Language: fre
| + Audio track
| + Sampling frequency: 48000
| + Channels: 2
| + Bit depth: 24
| + Track
| + Track number: 3 (track ID for mkvmerge & mkvextract: 2)
| + Track UID: 1621359673716437204
| + Track type: audio
| + Default track flag: 0
| + Codec ID: A_PCM/INT/LIT
| + Default duration: 00:00:00.031250000 (32.000 frames/fields per second for a video track)
| + Audio track
| + Sampling frequency: 48000
| + Channels: 2
| + Bit depth: 24
| + Track
| + Track number: 4 (track ID for mkvmerge & mkvextract: 3)
| + Track UID: 3823329412928835903
| + Track type: subtitles
| + Lacing flag: 0
| + Codec ID: S_TEXT/UTF8
| + Language: fre
|+ EBML void: size 1172
|+ Cluster
Transcoded with this command line:
vlc media.mkv -I dummy -vvv --sub-track 0 --sout="#transcode{vcodec=h264,acodec=a52,scodec=dvbsub,senc=dvbsub}:std{access=file{},mux=ts,dst='test_vlc.ts'}" vlc://quit
Raise this error when the first line of subtitle arrives:
[00007f8e407145b0] main stream output debug: adding a new sout input for `subt` (sout_input: 0x7f8e428085f0)
[00007f8e40674820] stream_out_transcode stream out debug: creating subtitle transcoding from fcc=`subt' to fcc=`dvbs'
[00007f8e42814b70] main generic debug: looking for spu decoder module matching "any": 23 candidates
[00007f8e42814b70] avcodec generic debug: using ffmpeg Lavc58.6.103
[00007f8e42814b70] avcodec generic debug: CPU flags: 0x000fd3db
[00007f8e42814b70] avcodec generic warning: refusing to decode non validated subtitle codec
[00007f8e42814b70] subsdec generic debug: trying demuxer-specified character encoding: UTF-8
[00007f8e42814b70] main generic debug: using spu decoder module "subsdec"
[00007f8e42814f50] main encoder debug: looking for encoder module matching "dvbsub": 22 candidates
[00007f8e42814f50] main encoder debug: using encoder module "dvbsub"
[00007f8e42815780] main spu text debug: looking for text renderer module matching "any": 3 candidates
[00007f8e42815780] main spu text debug: using text renderer module "freetype"
[00007f8e406ad7a0] main scale debug: looking for video converter module matching "any": 22 candidates
[00007f8e406ad7a0] swscale scale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality)
[00007f8e406ad7a0] main scale debug: using video converter module "swscale"
[00007f8e42824e60] main scale debug: looking for video converter module matching "any": 22 candidates
[00007f8e42824e60] yuvp scale debug: YUVP to YUVA converter
[00007f8e42824e60] main scale debug: using video converter module "yuvp"
[00007f8e40430bc0] main mux debug: adding a new input
[00007f8e40430bc0] mux_ts mux debug: adding input codec=dvbs pid=300
[00007f8e40430bc0] mux_ts mux debug: - lang=fra
[00007f8e40430bc0] mux_ts mux debug: new PCR PID is 100
[00007f8e40433f50] main decoder error: cannot continue streaming due to errors with codec subt
Using VTT subtitles instead of SRT raises a pretty similar error but with codec wvtt:
00007fa475536be0] mkv demux warning: unknown element at { fpos: 607761258, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475533d50] main stream output debug: adding a new sout input for `wvtt` (sout_input: 0x7fa47541a1f0)
[00007fa475614930] stream_out_transcode stream out debug: creating subtitle transcoding from fcc=`wvtt' to fcc=`dvbs'
[00007fa475784510] main generic debug: looking for spu decoder module matching "any": 23 candidates
[00007fa475784510] main generic debug: using spu decoder module "webvtt"
[00007fa47578ded0] main encoder debug: looking for encoder module matching "dvbsub": 22 candidates
[00007fa47578ded0] main encoder debug: using encoder module "dvbsub"
[00007fa47561ec00] main spu text debug: looking for text renderer module matching "any": 3 candidates
[00007fa47561ec00] main spu text debug: using text renderer module "freetype"
[00007fa477824d80] main scale debug: looking for video converter module matching "any": 22 candidates
[00007fa477824d80] swscale scale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality)
[00007fa477824d80] main scale debug: using video converter module "swscale"
[00007fa47782de00] main scale debug: looking for video converter module matching "any": 22 candidates
[00007fa47782de00] yuvp scale debug: YUVP to YUVA converter
[00007fa47782de00] main scale debug: using video converter module "yuvp"
[00007fa4756146b0] main mux debug: adding a new input
[00007fa4756146b0] mux_ts mux debug: adding input codec=dvbs pid=300
[00007fa4756146b0] mux_ts mux debug: - lang=fra
[00007fa4756146b0] mux_ts mux debug: new PCR PID is 100
[00007fa475775990] main decoder error: cannot continue streaming due to errors with codec wvtt
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 630050514, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 665964339, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 699530065, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 718647013, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 732360565, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 769638212, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 804988078, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 836942228, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 860298965, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 882846006, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 899074433, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 930338396, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 967648239, 'N11libmatroska17KaxBlockAdditionsE' }
[00007fa475536be0] mkv demux warning: unknown element at { fpos: 1002163097, 'N11libmatroska17KaxBlockAdditionsE' }
Each lines of subtitle raise the demux warning in this case.
I also tested nightly build of 4.* and the error does not occur but the subtitles does not appear in the final .ts file.