[mythtv-users] Mytharchive and DVB subtitles not working?
J.Pilk at tesco.net
Tue May 18 11:57:47 UTC 2010
On 17/05/10 14:58, Thomas Pontoppidan wrote:
> 2010/5/17 Mike Perkins<mikep at randomtraveller.org.uk>
>> Thomas Pontoppidan wrote:
>>> Any hints on where to look for a solution to this problem?
>>> I have trawled through the mytharchive script searching for code regarding
>>> identification of subtitles, but I only found code related to the handling
>>> of DVB subtitles *after* they were selected for processing:( Where is the
>>> code that selects the relevant subtitle streams?
>>> I can't understand why teletext is treated as a subtitle stream in the
>>> place? - I know it can contain subtitles, but there is no way Mytharchive
>>> can tell which page holds the subtitles anyway, so in my opinion it never
>>> makes sense to include it in a DVD project?
>>> By convention, teletext subtitles are always on page 888.
> Problem is solved! To skip my ramling see bottom of message:-)
> Hmm, conventions are fine, but in this case neither Danish nor Swedish
> national television broadcasters seem to adhere to conventions - DR teletext
> subtitles are on page 399, and SVT are on page 199 (SVT1) and 299 (SVT2).
> But I can see now that the correct page is actually specified in the
> ProjectX log (PID: 0x853(dan_i100 dan_s.hip399) so that shouldn't be a
> problem:) However, afaik, in Denmark teletext subtitles are only used for
> hearing impaired (i.e. shows with danish audio) so when a show is already
> subtitled either with "burned" subtitles or DVB, there are no teletext
> I found the part of the script where the subtitles are selected in
> mythburn.py. But when I read the code it already seems to prefer dvbsub in
> this piece of code:
> 04504 # first try to find a stream with preferred language 1
> 04505 for node in nodes:
> 04506 index = int(node.attributes["ffmpegindex"].value)
> 04507 lang = node.attributes["language"].value
> 04508 format = string.upper(node.attributes["codec"].value)
> 04509 pid = int(node.attributes["id"].value)
> ==>04510 if not found and lang == preferredlang1 and format ==
> 04511 subtitle = (index, format, pid, lang)
> 04512 found = True
> Only if that (and the second preferred language) fails will it select the
> first stream:
> 04525 # finally use the first subtitle stream
> 04526 if not found:
> 04527 for node in nodes:
> 04528 index = int(node.attributes["ffmpegindex"].value)
> 04529 format = string.upper(node.attributes["codec"].value)
> 04530 pid = int(node.attributes["id"].value)
> 04531 if not found:
> 04532 subtitle = (index, format, pid, lang)
> 04533 found = True
> I found it strange that "format" is defined in upper-case (04508) and then
> compared to the lower case string in 04510 so I changed "dvbsub" => "DVBSUB"
> and now it chooses the right stream! I guess this should be reported as a
> bug, but I don't know how...
I've added a reference to this thread to this ticket, which is another
'pending' patch to mythburn.py
More information about the mythtv-users