[FFmpeg-devel] [PATCHv5 4/4] lavc: add teletext decoder using libzvbi

Marton Balint cus at passwd.hu
Sat Aug 24 20:48:18 CEST 2013


On Sat, 24 Aug 2013, Carl Eugen Hoyos wrote:

> Marton Balint <cus <at> passwd.hu> writes:
>
>> Based on a patch by Wolfram Gloger
>>
>> The original patch was rebased by Tudor SUCIU
>>
>> Lots of additional features and fixes are made by me.
>
> Sorry that I did not (yet) test myself.
>
> What is the default behaviour if the file
> contains a teletext stream but no subtitles?

Default behaviour is to always decode teletext page 100 no matter if it is 
a subtitle page or a normal teletext page. (It is typically a normal 
teletext page).

Teletext descriptors which contain the information which page is the 
subtitle page, which page is the startup page, are not parsed or used 
(that information is only available to the demuxer anyway), you have to 
select the page to be decoded manually with the txt_page option.

> What if there is a teletext stream containing
> one subtitle page?

It does not make any difference.

> What happens if the teletext stream contains
> multiple subtitle pages?

Nothing, the ones will be decoded which you selected with txt_page decoder 
option.

> Is it possible to use non-subtitle pages as
> subtitles?

Yes, absolutely.

> Or in other words: Is one FFmpeg subtitle
> stream provided for all pages plus one
> stream for each subtitle page?
>
> Or is this not a good idea?
>

At the moment, a single subtitle stream is provided for all the teletext 
packets, and the decoder decides which pages to decode from these teletext 
packets.

Creating separate streams in the demuxer for each entry in the teletext 
descriptor may have it's advantages, but I can't think of a way to split 
the teletext packets to multiple streams without decoding the whole 
teletext in the demuxer first. Also I don't know if the mpegts demuxer 
will like if we just start adding streams with the same PID values...

The only way I see is if we pass all teletext packets to all these 
streams, and as a packet side data also pass a default page filter to the 
decoder, but I don't know if that is something we should do...

Anyway, since we definitely need a stream with all the teletext packets, 
these extra subtitle streams can be added later :P

Regards,
Marton


More information about the ffmpeg-devel mailing list