[Q]How to get subtitle or Closed-Caption data from TS packet?

975 views
Skip to first unread message

its...@magicn.com

unread,
Feb 14, 2008, 9:31:34 PM2/14/08
to BIT Everest
Dear BIT Everest & members,

These days I'm trying to add subtitle/Closed-Caption function to
BitEverest's ISDB-T source code.
But The ARIB spec is too difficult to understand protocol structures
and fuzzy to understand completely.
Can you or anyone explain how to extract subtitle/closed-caption data
from TS packet?
I hope someone reply to me.

Best Regards,
itsmeks

Lin Ma (GMail)

unread,
Feb 15, 2008, 12:22:48 AM2/15/08
to bitev...@googlegroups.com

Hi Itsmeks,

 

I hope there isn't late ;-)

 

Here is a simple instruction.

 

1.       Parse the PMT table and get closed caption PID (its stream type should be 0x06 according to ARIB spec.)

2.       Listen this PID and get closed caption data. Please use PES listener. The closed caption data comes in PES stream (not section)

3.       Start parsing the closed caption as follows (please refer to ARIB spec. B24_r40_Vol1_P3.pdf)

a.       Parse the data_group() structure, optionally check CRC

b.      If data_group_id is 0x1, 0x20, 0x21, or 0x22, parse the caption_management_data structure

                                                               i.      Parse the data_unit structure, get data_unit_parameter etc.

                                                             ii.      If data_unit_parameter  is 0x20, parse caption_data() structure, also known as caption statement data

1.       Parse the data_unit structure, the data byte followed is statement body if data_unit_parameter is 0x20, or 1-byte DRCS if the data_unit_parameter is 0x30.

                                                            iii.      Or if data_unit_parameter  is 0x30, parse 1-byte DRCS

 

You need to parse the statement body and DRCS accordingly. DRCS is 1-pixel bitmap (as I know). The statement body data can be converted to font pixel information by some way.

 

 

Yours,

Lin

its...@magicn.com

unread,
Feb 17, 2008, 8:51:40 PM2/17/08
to BIT Everest
Dear Lin

Thanks for your fast advice.
Let me check it asap.
If I have question, can I ask you again?

BR,
itsmeks
> Behalf Of itsm...@magicn.com
> Sent: Friday, February 15, 2008 10:32 AM
> To: BIT Everest
> Subject: [Q]How to get subtitle or Closed-Caption data from TS packet?
>
> Dear BIT Everest & members,
>
> These days I'm trying to add subtitle/Closed-Caption function to
>
> BitEverest's ISDB-T source code.
>
> But The ARIB spec is too difficult to understand protocol structures
>
> and fuzzy to understand completely.
>
> Can you or anyone explain how to extract subtitle/closed-caption data
>
> from TS packet?
>
> I hope someone reply to me.
>
> Best Regards,
>
> itsmeks- 따온 텍스트 숨기기 -
>
> - 따온 텍스트 보기 -

Lin Ma (GMail)

unread,
Feb 17, 2008, 9:00:34 PM2/17/08
to bitev...@googlegroups.com
Dear Itsmeks,

You are welcome. Thanks a lot for joining us. I'm glad to answer any
question that I know :-)

ckart...@gmail.com

unread,
Jun 13, 2014, 9:57:40 AM6/13/14
to bitev...@googlegroups.com, its...@magicn.com
Dear Mr.Lin ,

I am working in ISDB (ARIB) Closed Captions
Since the Spec in translated one i am having trouble in understanding few informations from the SPEC .
In ARIB B14v3_8 "Display Zone" Section , it is mentioned that , "if intervals between characters are not multiples of 4, then the values of the interval
between characters/4 (interval between lines/4) are rounded down."

But i am not able to understand the intended meaning

As per my current calculation and the SPEC intended spacing information,  the following is the table that shows the difference between SPEC and my calculation:

Display Area

Font Size

Horizontal Spacing

Vertical Spacing

Number of Chars/Lines
(As per my current  calculation) 

    Number of chars/line(As per Spec )

800X472                    

36

4

2

800/(36+4) = 20     /
472 / (36+2) =
12.4 

20,12

800X470

30

6

6

800/(30+6) = 22.2 /  
470 / (30+6) = 
13.0       

20,12

600X390

24

6

6

600/(24+6) = 20    /  
 390 / (24+6) =
13.0       

20,12

600X390 

24

10

10

600/(20+10) = 20   /
390 / (20+10) =
13.0

20,12

500X340

16

9

9

500/(16+9) =  20   /
390 / (16+9) =
15.6       

20,12


Regards ,
Karthick C

Justin Yoo

unread,
Jun 14, 2014, 11:37:50 AM6/14/14
to bitev...@googlegroups.com, its...@magicn.com
Dear Karthick C,

I would like to explain my understanding for your question.
"the values of the interval between characters/4 (interval between lines/4) are rounded down." means that the values will be 0 or 4 or 8 or 12 or 16...

Display Area : your current calculation
1. 800x472 : 20, 12.4
- 20 is multiples of 4: 20
- 12.4 is not multiples of 4,  12.4 -> 12

2. 800X470 : 22.2, 13.0
- 22.2 is not multiples of 4,  22.2 -> 20
- 13 is not multiples of 4,  13 -> 12

3. 600X390 : 20, 13
- 20 is multiples of 4: 20
- 13 is not multiples of 4,  13 -> 12

4. 600X390 : 20, 13
- 20 is multiples of 4: 20
- 13 is not multiples of 4,  13 -> 12

5. 500X340 : 20, 15.6
- 20 is multiples of 4: 20
- 15.6 is not multiples of 4,  15.6 -> 12

Regards,
JC Yoo

--
You received this message because you are subscribed to the Google Groups "BIT Everest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biteverest+...@googlegroups.com.
To post to this group, send email to bitev...@googlegroups.com.
Visit this group at http://groups.google.com/group/biteverest.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages