Ask a questionAsk a question
 

AnswerSome questions about XAS file

  • Wednesday, November 15, 2006 11:41 AMCloser Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi All

    1) Where in HD-DVD spectfication I can find something about work with XAS files? I think that HD-DVD Spec contains not many information about it :(

    2) Where I can find HD-DVD project sample with XAS files?

    3) Every XAS file must have own XMF file, doesn't it?

    4) How can I support 2 subtitles (with different languages, for example: en, fr) in my HD-DVD project? Could you describe steps?

Answers

  • Wednesday, November 22, 2006 11:05 AMCloser Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
     Peter Torr - MSFT wrote:

    [skipped]

    Ok, I knew it.

    I found answers for some my questions after some experiments.

    3) Every XAS file must have own XMF file, doesn't it?

    It's correct. I think so :)

    4) How can I support 2 subtitles (with different languages, for example: en, fr) in my HD-DVD project? Could you describe steps?

    a) Add AdvancedSubtitleSegment sections in Title section in XPL file

                <AdvancedSubtitleSegment src="file:///dvddisc/ADV_OBJ/subtitle_fr_002.xmf" titleTimeBegin="00:00:00:00" titleTimeEnd="00:55:31:20" sync="hard">
                    <Subtitle track="1" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/subtitle_fr_002.xmf" size="381" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/subtitle_fr_002.xas" size="97436" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/Font/couri.ttf" size="245032" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                </AdvancedSubtitleSegment>
                <AdvancedSubtitleSegment src="
    file:///dvddisc/ADV_OBJ/subtitle_en_002.xmf" titleTimeBegin="00:00:00:00" titleTimeEnd="00:55:31:20" sync="hard">
                    <Subtitle track="2" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/subtitle_en_002.xmf" size="391" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/subtitle_en_002.xas" size="81318" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/SysResources/Default.ttf" size="367112" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                </AdvancedSubtitleSegment>

    b) Add SubtitleTrack sections in TrackNavigationList in XPL file

                <TrackNavigationList>
                    <VideoTrack track="1" selectable="true" />
                    <AudioTrack track="1" langcode="en:00" selectable="true" />
                    <SubtitleTrack track="1" langcode="fr:00" selectable="true" />
                    <SubtitleTrack track="2" langcode="en:00" selectable="true" />

                </TrackNavigationList>

    c) Make XMF file for each language (as sample for english)

    <?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/subtitle_en_002.xas" />
        <Resource src="file:///dvddisc/ADV_OBJ/subtitle_en_002.xas" />
        <Resource src="file:///dvddisc/ADV_OBJ/SysResources/Default.ttf" />
    </Application>

    d) Make XAS file for each language (as sample for english)

    <?xml version="1.0" encoding="utf-8"?>
    <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="pShadowText" style:font="file:///dvddisc/ADV_OBJ/SysResources/Default.ttf" style:fontSize="60px" 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="75%" style:width="80%" style:height="20%">
                    <p style="pShadowText" begin="00:00:00:41" end="00:00:04:11">Here, come and look at this!<br />lt`s a great bargain!</p>
                    <p style="pShadowText" begin="00:00:04:57" end="00:00:07:03">I`ll give you the cheapest<br />price before closing!</p>
                    <p style="pShadowText" begin="00:00:07:16" end="00:00:10:45">Japanese pork is only<br />135 yen per 100 grams!</p>
                    <p style="pShadowText" begin="00:00:11:08" end="00:00:14:57">Oh, you still won`t buy?<br />Then, 11 5 yen!</p>
    ...

    I think that need to define correct xml:lang attribute for each XAS file.

    That's all. You can use following hotkeys in HDiSim for working with subtitles.

    Subtitle Track On/Off           CTRL+S
    Change Subtitle Track           ALT+S

    P.S.

    I saw one problem... My XAS file has about 800 "p" tags and HDiSim 0.1 a very long load it. I think that is HDiSim problem.

All Replies

  • Wednesday, November 22, 2006 1:28 AMPeter Torr - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    An XAS is the same as an XMU (ie, a markup file) but subtitles have some restrictions, mostly in how the timing works. There is no indefinite timing (XPath) and so no user-input elements like buttons either.

    A subtitle is just an application, so it has an XMF and an XAS and some images or font files.

  • Wednesday, November 22, 2006 11:05 AMCloser Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
     Peter Torr - MSFT wrote:

    [skipped]

    Ok, I knew it.

    I found answers for some my questions after some experiments.

    3) Every XAS file must have own XMF file, doesn't it?

    It's correct. I think so :)

    4) How can I support 2 subtitles (with different languages, for example: en, fr) in my HD-DVD project? Could you describe steps?

    a) Add AdvancedSubtitleSegment sections in Title section in XPL file

                <AdvancedSubtitleSegment src="file:///dvddisc/ADV_OBJ/subtitle_fr_002.xmf" titleTimeBegin="00:00:00:00" titleTimeEnd="00:55:31:20" sync="hard">
                    <Subtitle track="1" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/subtitle_fr_002.xmf" size="381" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/subtitle_fr_002.xas" size="97436" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/Font/couri.ttf" size="245032" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                </AdvancedSubtitleSegment>
                <AdvancedSubtitleSegment src="
    file:///dvddisc/ADV_OBJ/subtitle_en_002.xmf" titleTimeBegin="00:00:00:00" titleTimeEnd="00:55:31:20" sync="hard">
                    <Subtitle track="2" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/subtitle_en_002.xmf" size="391" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/subtitle_en_002.xas" size="81318" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                    <ApplicationResource src="
    file:///dvddisc/ADV_OBJ/SysResources/Default.ttf" size="367112" loadingBegin="00:00:00:00" priority="1" multiplexed="false" />
                </AdvancedSubtitleSegment>

    b) Add SubtitleTrack sections in TrackNavigationList in XPL file

                <TrackNavigationList>
                    <VideoTrack track="1" selectable="true" />
                    <AudioTrack track="1" langcode="en:00" selectable="true" />
                    <SubtitleTrack track="1" langcode="fr:00" selectable="true" />
                    <SubtitleTrack track="2" langcode="en:00" selectable="true" />

                </TrackNavigationList>

    c) Make XMF file for each language (as sample for english)

    <?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/subtitle_en_002.xas" />
        <Resource src="file:///dvddisc/ADV_OBJ/subtitle_en_002.xas" />
        <Resource src="file:///dvddisc/ADV_OBJ/SysResources/Default.ttf" />
    </Application>

    d) Make XAS file for each language (as sample for english)

    <?xml version="1.0" encoding="utf-8"?>
    <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="pShadowText" style:font="file:///dvddisc/ADV_OBJ/SysResources/Default.ttf" style:fontSize="60px" 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="75%" style:width="80%" style:height="20%">
                    <p style="pShadowText" begin="00:00:00:41" end="00:00:04:11">Here, come and look at this!<br />lt`s a great bargain!</p>
                    <p style="pShadowText" begin="00:00:04:57" end="00:00:07:03">I`ll give you the cheapest<br />price before closing!</p>
                    <p style="pShadowText" begin="00:00:07:16" end="00:00:10:45">Japanese pork is only<br />135 yen per 100 grams!</p>
                    <p style="pShadowText" begin="00:00:11:08" end="00:00:14:57">Oh, you still won`t buy?<br />Then, 11 5 yen!</p>
    ...

    I think that need to define correct xml:lang attribute for each XAS file.

    That's all. You can use following hotkeys in HDiSim for working with subtitles.

    Subtitle Track On/Off           CTRL+S
    Change Subtitle Track           ALT+S

    P.S.

    I saw one problem... My XAS file has about 800 "p" tags and HDiSim 0.1 a very long load it. I think that is HDiSim problem.

  • Wednesday, November 22, 2006 8:43 PMPeter Torr - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Yes, that's about it. I have a sample that works in HDiSim but haven't posted it yet because I haven't been able to test it on a player.

    You can probably fix the loading issue by putting the <p>s inside some <div>s so that there aren't so many top-level elements.... or you can use multiple pages and load them at different times.