Log in

View Full Version : Add external subtitles in HD DVD


orbitlee
25th January 2007, 15:59
Since english is not my native language, so I'd like to add external subtitles when watching HD DVD. Here is the method I use to add a simplified chinese external subtitle.

In VPLST000.XPL,


<PrimaryAudioVideoClip titleTimeBegin="00:00:00:00" titleTimeEnd="01:11:37:47" src="file:///dvddisc/HVDVD_TS/FEATURE_1.MAP" dataSource="Disc">
<Video track="1" mediaAttr="1" />
<Audio track="1" streamNumber="1" mediaAttr="1" description="English 5.1" />
<Audio track="2" streamNumber="2" mediaAttr="1" description="English DTS-HD 5.1" />
<Audio track="3" streamNumber="5" mediaAttr="1" description="Commentary with David Twohy, Karl Urban And Alexa Davalos 2.0" />
<Subtitle track="1" streamNumber="1" mediaAttr="1" description="English SDH" />
</PrimaryAudioVideoClip>
<PrimaryAudioVideoClip titleTimeBegin="01:11:37:47" titleTimeEnd="02:13:56:22" src="file:///dvddisc/HVDVD_TS/FEATURE_2.MAP" dataSource="Disc" seamless="true">
<Video track="1" mediaAttr="1" />
<Audio track="1" streamNumber="1" mediaAttr="1" description="English 5.1" />
<Audio track="2" streamNumber="2" mediaAttr="1" description="English DTS-HD 5.1" />
<Audio track="3" streamNumber="5" mediaAttr="1" description="Commentary with David Twohy, Karl Urban And Alexa Davalos 2.0" />
<Subtitle track="1" streamNumber="1" mediaAttr="1" description="English SDH" />
</PrimaryAudioVideoClip>
<AdvancedSubtitleSegment src="file:///dvddisc/ADV_OBJ/chs.xmf" titleTimeBegin="00:00:00:00" titleTimeEnd="02:13:56:22" sync="hard">
<Subtitle track="2" />
<ApplicationResource src="file:///dvddisc/ADV_OBJ/chs.xmf" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
<ApplicationResource src="file:///dvddisc/ADV_OBJ/chs.xas" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
</AdvancedSubtitleSegment>
<TrackNavigationList>
<AudioTrack track="1" langcode="en:01" selectable="true" />
<AudioTrack track="2" langcode="en:01" selectable="true" />
<AudioTrack track="3" langcode="en:03" selectable="true" />
<SubtitleTrack track="1" langcode="en:01" selectable="true" />
<SubtitleTrack track="2" langcode="zh:01" selectable="true" />
</TrackNavigationList>


In chs.xmf


<?xml version="1.0" encoding="utf-8"?>
<Application xmlns="http://www.dvdforum.org/2005/HDDVDVideo/Manifest">
<Region x="0" y="0" width="1920" height="1080" />
<Markup src="file:///dvddisc/ADV_OBJ/chs.xas" />
<Resource src="file:///dvddisc/ADV_OBJ/chs.xas" />
</Application>


In chs.xas



<?xml version="1.0" encoding="gb2312"?>
<root xml:lang="en" xmlns="http://www.dvdforum.org/2005/ihd" xmlns:style="http://www.dvdforum.org/2005/ihd#style" xmlns:state="http://www.dvdforum.org/2005/ihd#state">
<head>
<styling>
<style id="simsun" style:font="file:///dvddisc/ADV_OBJ/simsun.ttc" style:fontSize="100px" style:color="rgba(128, 128, 128, 255)" style:textAlign="center" />
<style id="mingliu" style:font="file:///dvddisc/ADV_OBJ/mingliu.ttc" style:fontSize="100px" style:color="rgba(128, 128, 128, 255)" style:textAlign="center" />
</styling>
</head>
<body xml:base="file:///dvddisc/ADV_OBJ/">
<div style:position="absolute" style:x="10%" style:y="90%" style:width="80%" style:height="10%">
<p style="simsun" begin="00:01:21:74" end="00:01:24:30">gb2312 chinese character at here…</p>
<p style="simsun" begin="00:02:21:74" end="00:02:24:30">gb2312 chinese character at here…</p>
<p style="simsun" begin="00:03:21:74" end="00:03:24:30">gb2312 chinese character at here…</p>
</div>
</body>
</root>

orbitlee
25th January 2007, 16:01
I wrote a small program to convert existing srt to xas. It only supports simplified chinese and traditional chinese.
Feel free to modify the source code to support more languages and customizations.

Usage: srt2xas <srt file> <xas file> <encoding>
Encoding: chs or cht


Edit: this method only works on PDVD 7.x Ultra, not 6.5

Edit: Fixed a bug which handle some XML special characters
whitespace, <, > , &, ', " incorrectly.

mikeathome
25th January 2007, 19:23
Hi,
is there a 'simple' way to just change the location of an existing subtitle stream. The ReadItClear feature from PowerDVD is not working for me.

Thanks,
mike

nikopaha
26th January 2007, 11:13
Do you have any idea how I can outline subtitles, so it is easier to read?

zoolook
17th February 2007, 11:52
any idea how to connect external subtitles to Blu-Ray movies (memento for example)?

Kiriakos
17th February 2007, 19:25
Thanks to orbitlee for the tool and the knowledge that shared with us.
I am having trouble with the method though. I am doing all those things and the subs are selectable throught he PDVD 7.1 but when selected, nothing of them on the screen. I am wondering if there is somethng that i am doing wrong. The .xas file looks ok, the others also, PDVD reacts to the .XPL insert of Advanced subtitle line but when it must show them, nothing. If anyone has been through this with success (or orbitlee his self-please), please post your files-inputs or send them to take a look on them. I am from Greece and we have only one (yes 1 ) title with subs!

@orbitlee: I think that your programm can do the convertion for greeks as is. Is that true or i have to do something with the code of srt2xas? Thanks again.

Thanks in advance.

Regards,
Kiriakos

bass4040
19th February 2007, 05:30
I didn't know this was possible. I assumed it had to be authored from the studio. I would like to do that for Oldboy (Jap) in hd-dvd if it's possible. It doesn't have english subs.