Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
#1 | Link |
|
Registered User
Join Date: Apr 2006
Posts: 78
|
Add external subtitles in HD DVD
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, Code:
<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>
Code:
<?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>
Code:
<?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>
|
|
|
|
|
|
#2 | Link |
|
Registered User
Join Date: Apr 2006
Posts: 78
|
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. Last edited by orbitlee; 27th January 2007 at 08:52. |
|
|
|
|
|
#6 | Link |
|
Registered User
Join Date: Feb 2007
Posts: 16
|
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 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|