[FFmpeg-devel] [Sponsored work] ASCII Text subtitles in DVB subtitles

Sylvain sylvain at lahiette.com
Sun Jan 12 20:27:19 CET 2014


Thanks for you response.

In fact it is possible to send text subtitles in EN 300 743, in 
addition of bitmap subtitles. The documents states that transfering 
text-only strings shall be negotiated between the broadcaster and the 
set-top-box manufacturer, as they need to agree on the font used on 
the decoder side (at least). See page 26 of  ETSI EN 300 743 V1.2.1, 
field "object_coded_method". .

In fact, i am searching a way to push TXT-subtiles, as well as bitmap 
subtiltes at the same time. Hence my request. I did not check for dvb-
teletext and i will look into it to see if it fit my needs.

Anyway, my sponsoring offer is still valid, as i would prefer to pack 
text+bitmap subtitles in the same PID. So if someone is interested, 
let me know by replying at my email address.

Best regards, SF.
 




Le dimanche 12 janvier 2014 20:37:28 Andrey Utkin a écrit :
> 2014/1/9 Sylvain <sylvain at lahiette.com>:
> > Hello all,
> > 
> > I am currently using DVB subtitles in bitmap, as supported by the
> > mpegts enc/dec of FFMPEG.
> > 
> > But i would like also to transport raw text instead of bitmaps
> > inside MPEG2-TS streams.
> > 
> > The EN 300 743 specification for DVB Subtitles describe the
> > descriptors needed to insert raw text, so this is something known
> > but rarely implemented.
> > 
> > Instead of doing it ourself, i would like to sponsor this
> > development to someone in the FFMPEG developper community, as it
> > will be probably faster and more efficient. So is there someone
> > out there willing to implement DVB ASCII text support in the
> > mpegtsenc / dec files ?
> If i understand it right,
> "DVB Subtitles" (EN 300 743)  is bitmap-based format,
> "DVB Teletext" (EN 300 472) is text-based format.
> 
> You probably want to use the second one, exactly to be able to mux
> it into MPEG TS and demux out of it, and to translate this format
> to other text-based or bitmap-based formats, and to translate to
> this format from other text-based formats.
> 
> Well, the subject seems underdeveloped in ffmpeg. Despite some
> initial support is here, it is limited and somewhat broken.
> 
> Here is a sample file with DVB teletext subtitles:
> http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2086/teletextsubtit
> les.ts
> 
> Remuxing is supported, but broken:
> ffmpeg -i ~/Downloads/teletextsubtitles.ts -an -vn -scodec copy -f
> mpegts /tmp/subtitles.ts
> ffmpeg -i ~/Downloads/teletextsubtitles.ts  -i /tmp/subtitles.ts
> -map 0:0 -map 1:0 -vcodec copy -scodec copy /tmp/subtitles2.ts
> The resulting file, subtitles2.ts, pretends to contain teletext
> stream, but there are no subtitles shown at playback.
> 
> Decoding is supported (there is libzvbi_teletext decoder, requiring
> libzvbi and configure flag --enable-libzvbi), but transcoding it to
> other formats, like dvb_subtitle or ass doesn't work:
> 
> ffmpeg -i ~/Downloads/teletextsubtitles.ts -acodec copy -vcodec copy
> -scodec dvb_subtitle -y -f mpegts /dev/null
> fails with message "Subtitle encoding failed". Problem is caused by
> subtitle regions having 41 color in palette, which is too big for
> supported modes in dvb_subtitle format.
> 
> ffmpeg -i ~/Downloads/teletextsubtitles.ts -vcodec copy -acodec copy
> -scodec ass -f mpegts /dev/null -y
> Fails with message "Only SUBTITLE_ASS type supported".
> Same as above was with "ssa" subtitle encoder.
> 
> ffmpeg -i ~/Downloads/teletextsubtitles.ts -vcodec copy -acodec copy
> -scodec dvd_subtitle -f vob /dev/null -y
> fails with "Application provided invalid, non monotonically
> increasing dts to muxer in stream 2" (2 is index of subtitle
> elementary stream).
> 
> Trying "srt" encoder failed with "Error while opening encoder for
> output stream #0:2 - maybe incorrect parameters such as bit_rate,
> rate, width or height". I didn't find exact reason for that yet.
> Also from sources it seems that it also supports only SUBTITLE_ASS
> type.
> 
> Trying "xsub" encoder failed also because of non-monotonic dts
> produced by decoder, and there were warnings due to high number of
> colors in palette.
> 
> 
> Sylvain, please describe precisely what abilities do you need for
> your work.


More information about the ffmpeg-devel mailing list