Opened 4 years ago

Last modified 3 years ago

#5913 new enhancement

teletext / zvbi -> dvbsub

Reported by: laursen Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: libzvbi dvbsub
Cc: cus Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Hi I would like to sponsor project adding to ffmpeg encoding dvb_teletext (EN 300 472) into dvb_subtitles (EN 300 743).

Here is a sample file with DVB teletext subtitles:

There is 2 ways as faar as i can see :

1, Make libzvbi decode bitmaps the dvbsub encoder can take, or make the dvbsub encoder take the current zvbi bitmap output and make it into something that can be feed into the current dvbsub encoder.

From what i understand this is the problem :
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.
Link :

2, Make a rasterizer for the dvbsub and perhaps other subtitle encoders in ffmpeg, so the text based zvbi output can be feed into the dvbsub encoder.

I think method 2 would be a great addon to ffmpeg making it able convert text based subtitles into picture based it would help dvdsub encoder also. But it would also be fine with method 1.

I will provide more info and test files on request.

Change History (8)

comment:1 Changed 4 years ago by laursen

  • Priority changed from normal to critical

comment:2 Changed 4 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords libzvbi added; teletext zvbi removed
  • Priority changed from critical to wish
  • Version changed from unspecified to git-master

comment:3 Changed 4 years ago by hyponic

+1 this function would be very very helpful. i would easily sponsor this too.

Last edited 4 years ago by hyponic (previous) (diff)

comment:4 follow-up: Changed 4 years ago by malakudi

Can someone indicate what is the input that dvbsub encoder expects?

comment:5 in reply to: ↑ 4 Changed 3 years ago by laursen

Replying to malakudi:

Can someone indicate what is the input that dvbsub encoder expects?

Seems like its RGB

comment:6 Changed 3 years ago by cus

  • Cc cus added

I am just saying, that colors above index 8 are rarely used, so if you are not using txt_opacity you can probably hack libzvbi-teletextdec.c and set sub_rect->nb_colors to 16, and make this work until somebody fixes it properly.

comment:7 Changed 3 years ago by hyponic

  • Priority changed from wish to important
  • Type changed from enhancement to sponsoring request

comment:8 Changed 3 years ago by cehoyos

  • Priority changed from important to wish
  • Type changed from sponsoring request to enhancement
Note: See TracTickets for help on using tickets.