ebu / libadm

Audio Definition Model (ITU-R BS.2076) handling library
https://libadm.readthedocs.io
Apache License 2.0
39 stars 16 forks source link

timecode formatting not compatible with some proprietary tools #168

Closed phill-williams closed 2 years ago

phill-williams commented 2 years ago

The 9-zero precision of timecode in libadm breaks certain proprietary ADM BWAV rendering & encoding tools. Changing to 5-zero precision restores support. For example:

end="00:00:46.046000000" <-- unsupported
end="00:00:46.04600" <-- OK

Although this is better characterized as a bug in the proprietary tools, it is easier to address here than to convince 3rd parties to update their software.

Is there any downside/risk to reducing the precision used by libadm?

phill-williams commented 2 years ago

Fixed this issue in a fork: 4f1bb730a87abfee00df277c794214f149f552b0

tomjnixon commented 2 years ago

Hi,

I'd rather not reduce the maximum precision when writing, as this can cause problems with software that expects the rtime plus the duration of one block to match the next rtime exactly.

The ideal fix would be to only write only the number of digits required (with a minimum of 5 to satisfy the silly requirement in BS.2072-2 section 5.11) -- that way library users can round the values themselves before writing if required. I'll get that implemented.

If you have any contacts with your 3rd party it would be great to convince them to support this as-is, though.

tomjnixon commented 2 years ago

If you have any contacts with your 3rd party it would be great to convince them to support this as-is, though.

Saying that, libadm doesn't support more than 9 digits, so we can't really complain.