ebu / ebu-tt-live-toolkit

Toolkit for supporting the EBU-TT Live specification
http://ebu.github.io/ebu-tt-live-toolkit/
BSD 3-Clause "New" or "Revised" License
25 stars 10 forks source link

Invalid timestamp format when converting XML #493

Open danielthepope opened 5 years ago

danielthepope commented 5 years ago

When I use ebu_tt_live.documents.converters.ebutt3_to_ebuttd to convert a EBU-TT-Live document with ttp:timeBase="media" to an EBU-TT-D, the media timecodes remain unchanged.

An input line could look like

<tt:p xml:id="C2" region="R3" begin="2.0s" end="6.8s" style="S1">

Output timestamps remain unchanged: begin="2.0s" when it should be more like begin="00:00:02.000" (not sure about the milliseconds)

nigelmegitt commented 5 years ago

Thanks @danielthepope you're right here. This is because Tech3380 v1.0.1 says ebuttdt:distributionMediaTimingType is

hours:minutes:seconds followed by an optional fraction.

But there's no distribution media timing type converter used in bindings/converters/ebutt3_ebuttd.py, class EBUTT3EBUTTDConverter, method _process_timing_type which should be making some kind of new type based on the input data even when converting from media timebase to media timebase.

We should try to tackle this in release/3.0

nigelmegitt commented 5 years ago

I suspect the EBU-TT-D XSD needs updating here too.