IRT-Open-Source / scf

Subtitling Conversion Framework
Apache License 2.0
52 stars 18 forks source link

Issue in the conversion of EBUTTXML2STL format #70

Closed jayotirana closed 4 years ago

jayotirana commented 4 years ago

I have an xml file and converting the same to stl format, some information is missing in the stl output file using the conversion end point: EBU-TT → STL Sample xml File:

<?xml version="1.0" encoding="UTF-8"?>
<tt:tt xmlns:tt="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:ttp="http://www.w3.org/ns/ttml#parameter"  
xmlns:ebuttm="urn:ebu:tt:metadata" xmlns:ebutts="urn:ebu:tt:style" xml:space="preserve" ttp:timeBase="smpte" ttp:frameRate="25" ttp:frameRateMultiplier="1 1" ttp:dropMode="nonDrop" ttp:markerMode="discontinuous" ttp:cellResolution="40 24" xml:lang="en-GB" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/ns/ttml">
    <tt:head>
        <tt:metadata>
            <ebuttm:documentMetadata>
                <ebuttm:documentEbuttVersion>v1.0</ebuttm:documentEbuttVersion>
                <ebuttm:documentIdentifier>ABCD123A02-1</ebuttm:documentIdentifier>
                <ebuttm:documentOriginatingSystem>TTProducer 1.7.0.0</ebuttm:documentOriginatingSystem>
                <ebuttm:documentCopyright>BBC</ebuttm:documentCopyright>
                <ebuttm:documentReadingSpeed>176</ebuttm:documentReadingSpeed>
                <ebuttm:documentTargetAspectRatio>4:3</ebuttm:documentTargetAspectRatio>
                <ebuttm:documentIntendedTargetFormat>WSTTeletextSubtitles</ebuttm:documentIntendedTargetFormat>
                <ebuttm:documentOriginalProgrammeTitle>Snow White</ebuttm:documentOriginalProgrammeTitle>
                <ebuttm:documentOriginalEpisodeTitle>Series 1, Episode 1</ebuttm:documentOriginalEpisodeTitle>
                <ebuttm:documentSubtitleListReferenceCode>ABC D123A/02</ebuttm:documentSubtitleListReferenceCode>
                <ebuttm:documentCreationDate>2015-01-20</ebuttm:documentCreationDate>
                <ebuttm:documentRevisionDate>2015-01-20</ebuttm:documentRevisionDate>
                <ebuttm:documentRevisionNumber>1</ebuttm:documentRevisionNumber>
                <ebuttm:documentTotalNumberOfSubtitles>809</ebuttm:documentTotalNumberOfSubtitles>
                <ebuttm:documentMaximumNumberOfDisplayableCharacterInAnyRow>37</ebuttm:documentMaximumNumberOfDisplayableCharacterInAnyRow>
                <ebuttm:documentStartOfProgramme>10:00:00:00</ebuttm:documentStartOfProgramme>
                <ebuttm:documentCountryOfOrigin>UK</ebuttm:documentCountryOfOrigin>
                <ebuttm:documentPublisher>Company Name</ebuttm:documentPublisher>
                <ebuttm:documentEditorsName>John Smith</ebuttm:documentEditorsName>
            </ebuttm:documentMetadata>
            <ttm:agent type="person" xml:id="sp1">
                <ttm:name type="other">Snow White</ttm:name>
            </ttm:agent>
            <ttm:agent type="person" xml:id="sp2">
                <ttm:name type="other">Fairy Godmother</ttm:name>
            </ttm:agent>
            <ttm:agent type="person" xml:id="sp3">
                <ttm:name type="other">Narrator</ttm:name>
            </ttm:agent>
            <!-- Embedded STL file -->
            <ebuttm:binaryData textEncoding="BASE64" binaryDataType="EBU Tech 3264" fileName="DRIB511W02.STL">ODUwU1RMMjUuMDExMDAwOVdvbGYgSGFsbCAgICAgICAgICAgICAgICAgICAgICAgSERTMTQ3NDU3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+PACkD/wALAx0UCwMfBxYCAA0gICAgICAgAwsLUGFpbnQgaXQgYnJpZ2h0ZXIuCgqPj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj48=</ebuttm:binaryData>
        </tt:metadata>
        <tt:styling>
            <tt:style xml:id="S1" tts:color="white" tts:backgroundColor="black" tts:textAlign="center" />
            <tt:style xml:id="S2" tts:color="yellow" tts:backgroundColor="black" tts:textAlign="center" />
        </tt:styling>
        <tt:layout>
            <tt:region xml:id="R1" tts:origin="0c 18c" tts:extent="40c 6c" />
            <tt:region xml:id="R2" tts:origin="0c 16c" tts:extent="40c 4c" />
        </tt:layout>
    </tt:head>
    <tt:body ttm:role="caption">
        <tt:div>
            <!-- Subtitle zero - not for display -->
            <tt:p xml:id="C0" region="R1" begin="00:00:00:00" end="00:00:00:02" style="S2">
                <tt:span>Snow White</tt:span>
                <tt:br />
                <tt:span>ABC D123A/02</tt:span>
                <tt:br />
                <tt:span>XYZ12345</tt:span>
            </tt:p>
            <!-- Begin subtitles for display -->
            <tt:p xml:id="C1" region="R2" begin="10:00:32:05" end="10:00:36:08">
                <tt:span style="S2">This programme contains some violent<tt:br/>
                scenes and some strong language
                </tt:span>
            </tt:p>
            <tt:p xml:id="C2" region="R2" begin="10:02:04:00" end="10:02:06:10">
                <tt:span ttm:agent="sp2" style="S1">Snow White, wake up!<tt:br/></tt:span>
                <tt:span ttm:agent="sp1" style="S2">But I'm so tired!</tt:span>
            </tt:p>
            <tt:p xml:id="C809" region="R1" begin="01:03:29:20" end="01:03:29:24">
                <tt:span ttm:agent="sp3" style="S1">..and they all lived happily ever after.</tt:span>
            </tt:p>
        </tt:div>
    </tt:body>
</tt:tt>

Or use this file for conversion: https://bbc.github.io/subtitle-guidelines/sample-ebutt-prepared.html

spoeschel commented 4 years ago

some information is missing in the stl output file

Hmm, could you please specify which information exactly you miss in the conversion result?

jayotirana commented 4 years ago

..and they all lived happily ever after.</tt:span> </tt:p> Xml File: ebutt-xml-output STL File: stl-output

Xml file has four blocks and in the STL file only 3 blocks loaded and the third one also not in the correct format.

spoeschel commented 4 years ago

Ah, I see; there is indeed an issue in this conversion path. Note that the involved module EBU-TT2STLXML is still in beta state. Nevertheless this is an issue that will be fixed soon. Thanks for raising this!