[FFmpeg-devel] Adding Teletext Tags to mpeg TS demuxer
Alwin Esch
aesch65350
Fri Sep 18 23:17:40 CEST 2009
Hello Reimar,
thanks for the reply.
Yes, with the language is right, is missing and must be added.
But to handle it as subtitle can be confusing the software like XBMC for
finding the right codec and need a bigger rewrite to handle multiply
subtitle streams at the same time. Normally only one Subtitle stream can
showed during playback but it is possible that more as one data stream is
present and all must be parsed normally in the Background (like Teletext
together with MVP) and the primary goal of Teletext is to delivery data for
News, Sports and so on. The name "CODEC_ID_DVB_TELETEXT" is ok, but I take
"CODEC_ID_EBU_TELETEXT" think it is more standardized to the "ETSI EN 300
472"
http://broadcasting.ru/pdf-standard-specifications/multiplexing/dvb-txt/en30
0472.v1.3.1.pdf page 5.
Alwin
-----Urspr?ngliche Nachricht-----
Von: ffmpeg-devel-bounces at mplayerhq.hu
[mailto:ffmpeg-devel-bounces at mplayerhq.hu] Im Auftrag von Reimar D?ffinger
Gesendet: Freitag, 18. September 2009 21:51
An: FFmpeg development discussions and patches
Betreff: Re: [FFmpeg-devel] Adding Teletext Tags to mpeg TS demuxer
On Fri, Sep 18, 2009 at 06:09:50PM +0200, Alwin Esch wrote:
> the attached patch adding codec Id's for mpeg TS streams which including
> Teletext data. The changes to parse the TS stream inside mpegts.c is only
a
> extension of the "static const StreamType DESC_types[]" table with the
ID's
> taken from ETSI EN 300 468 V1.5.1 (Digital Video Broadcasting (DVB);
> Specification for Service Information (SI) in DVB systems). Due to that
> inside avcodec.h no Data Codec section is present I add the ID's to
0x17500,
> hope this is acceptable.
>
> It is required for adding Teletext support to XBMC, see Ticket
> http://www.xbmc.org/trac/ticket/7187 on XBMC trac.
This conflicts a bit with a patch I have in my local try. While it can
be considered a bit of a stretch, I think these might better be handled
as subtitle streams (particularly since teletext can also encode
subtitles). In particular, your patch also does not parse the language
from the teletext stream.
Index: libavcodec/avcodec.h
===================================================================
--- libavcodec/avcodec.h (revision 19911)
+++ libavcodec/avcodec.h (working copy)
@@ -330,6 +330,7 @@
CODEC_ID_SSA,
CODEC_ID_MOV_TEXT,
CODEC_ID_HDMV_PGS_SUBTITLE,
+ CODEC_ID_DVB_TELETEXT,
/* other specific kind of codecs (generally used for attachments) */
CODEC_ID_TTF= 0x18000,
Index: libavformat/mpegts.c
===================================================================
--- libavformat/mpegts.c (revision 19911)
+++ libavformat/mpegts.c (working copy)
@@ -531,6 +531,7 @@
{ 0x6a, CODEC_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3
descriptor */
{ 0x7a, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3
descriptor */
{ 0x7b, CODEC_TYPE_AUDIO, CODEC_ID_DTS },
+ { 0x56, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
{ 0x59, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling
descriptor */
{ 0 },
};
@@ -701,6 +702,13 @@
mpegts_find_stream_type(st, desc_tag, DESC_types);
switch(desc_tag) {
+ case 0x56: /* DVB teletext descriptor */
+ language[0] = get8(&p, desc_end);
+ language[1] = get8(&p, desc_end);
+ language[2] = get8(&p, desc_end);
+ language[3] = 0;
+ av_metadata_set(&st->metadata, "language", language);
+ break;
case 0x59: /* subtitling descriptor */
language[0] = get8(&p, desc_end);
language[1] = get8(&p, desc_end);
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list