Re: Time expression Semantics question on Media Time Base

Hi Alexander,

I cannot see anywhere in TTML2 where sub-frames are described in a way that could be interpreted as a fraction.

There is no value of "metric" that corresponds to sub-frames, and the only place where the syntax of a time-expression can include sub-frames is in clock-time; the syntax of the "sub-frames" component only allows for digits, and no fraction delimiter.

Similarly the syntax of the "frames" component also only allows for digits. The "f" metric does allow for fractional values, but in my reading they are distinct from sub-frames, and there is no hint that the number should be interpreted in some special way for the "f" metric compared to any other metric.

I think you have ended up at the same conclusion: sub-frames are integers, where they are permitted. Frames are integers in clock-time expressions, but can have fractional components in offset-time expressions.

Kind regards,

Nigel



On 14/08/2024, 11:32, "Alexander Cerutti" <cerutti.alexander@gmail.com <mailto:cerutti.alexander@gmail.com>> wrote:


External: Think before clicking


Hi Nigel, thank you for your reply. Definitely helpful.


About your detailed comment on fractional part of frames and subframes, that I'm reporting here below, I have a few doubts.


> >- "24.5f" => means (3600 * 0) + (60 * 0) + 0 + ((24 + (0.5 / subFrameRate)) / effectiveFrameRate)


> Whatever a fraction of a frame means, it is not "subframe". I read this as being wrong, rather it should be:


> - "24.5f" => means (3600 * 0) + (60 * 0) + 0 + ((24.5 + (0 / subFrameRate)) / effectiveFrameRate)


Said that I'm sharing with you the doubt about the meaning of a fraction of frame, as reported in the specification and the previous message, the same formula is valid for both clock-time and offset-time.


> M = referenceBegin + 3600 * hours + 60 * minutes + seconds + ((frames + (subFrames / subFrameRate)) / effectiveFrameRate)


However, a clock-time follows the semantics described in 12.3.1 <time-expression>:


> hours ":" minutes ":" seconds ( fraction | ":" frames ( "." sub-frames )? )?


Acknowledging that, as a matter of clarity, "fraction" (which starts with a dot) has been separated from "frames" and "sub-frames" (which also starts with a "."), I would interpret that the dot is always being used to split the fraction, of whatever unit and in whatever time-expression format, but at this point I guess this is wrong by my side.


However, for how I'm understanding it, also looking around the web, can actually be the fractional part of frames, but they do not follow the same rules of seconds and milliseconds (1s = 1000ms, so 1f != 1000sf). Instead, if we assume 5sf with a rate of 1, 1f = 5sf. Therefore writing 24.5f is NOT 24f and 5sf and, in case of offset-time, there is not a way to express subframes (which will be then zeroed).


I guess we can conclude, therefore, that "sub-frames" are supposed to be parsed as integers and not as floating point part of frames, because of the division with ttp:subFrameRate.


I'm I correct?


Thanks again,
Alexander'

Received on Friday, 16 August 2024 09:51:30 UTC