[mythtv-users] Mythccextractor does not create a .srt file

Karl Dietz dekarl at spaetfruehstuecken.org
Tue Mar 19 18:30:19 UTC 2013


On 19.03.2013 17:45, Doug Vaughan wrote:
> Trond,
> Use the mediainfo utility to identify which tracks contain the "TEXT"
> subtitlesas those are the tracks you care looking for to generate an srt
> file. For example:
>  > mediainfo 2558_20120901010000.mpg
>
> A text subtitle would like:
>
> Text #1
> ID : 5603 (0x15E3)-888
> Menu ID : 1 (0x1)
> Format : Teletext
> Language : English
>
> The output givesyou the track PID (5603) and the code page (888), then
> use ccextractor like:

be aware that you may have to guess the right page number, e.g.
Text
ID                                       : 104 (0x68)-100
Menu ID                                  : 1 (0x1)
Format                                   : Teletext
Language                                 : German

page 100 is the initial page, the captions are on page 150, sadly I've
not yet seen proper signalling of the teletext caption page in the PMT.
(That is the reason that you can find lists of the subtitle pages on
the internet from associations of hearing impaired people.)
You can peek at the PMT by running
   mythutil --infile <therecording> --pidprinter --pids 0
which will show you the PAT including the PMT PID

Program Association Section
  PSIP tableID(0x0) length(13) extension(0x9800)
       version(4) current(1) section(0) last_section(0)
       tsid(38912) programCount(1)
   program number     1 has PID 0x0064

looking which PID is reported, then running
   mythutil --infile <therecording> --pidprinter --pids 0,0x0064

Program Map Section
  PSIP tableID(0x2) length(128) extension(0x1)
       version(11) current(1) section(0) last_section(0)
       pnum(1) pid(0x64)
...
   Stream #3 pid(0x68) type(0x06 private-data)
     Teletext Descriptor: 1 pages type(1) mag(1) page(00) lang(ger)
     Stream Identifier Descriptor (0x52): ComponentTag=0x3
...

while not really pretty that is the relevant information
type(1) is the initial page (main menu), mag(1) page(00) refers to page
100 and lang(ger) indicates German language. Together its "find the
German menu at page 100".
For subtitles you are looking for type 2 (subtitle) or 5 (subtitle for
hearing impaired people). (see EN 300 468 for more details)

According to the Nordig rules of operation the teletext descriptor is
mandatory when teletext is present. But the signaling of the individual
pages is not part of the spec.

Regards,
Karl

PS: Google hints that 888 is a common teletext page for subtitles in 
France and the UK. IIRC the main teletext services in the UK have been
stopped, so setting the initial page to the subtitle page makes sense.
According to Wikipedia there are active teletext services in Norway, so
you may have to figure out the correct page somehow. (e.g. by manually
browsing the teletext service)


More information about the mythtv-users mailing list