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