orchetect / TimecodeKit

The definitive SMPTE timecode library for Swift.
MIT License
91 stars 8 forks source link

TCC from fractional seconds #23

Closed melMass closed 3 years ago

melMass commented 3 years ago

Hi,

Thanks for this library! I have a few questions:

And the main reason for the issue, what would be the best approach to convert a fractional second-based TC to Timecode? I'm using SwiftFFmpeg and all time values are based on fractional seconds

Thanks

orchetect commented 3 years ago

If you know the timecode frame rate, you can init using Timecode(realTimeValue: TimeInterval, at: frameRate)

TCC (typealias Timecode.Components) is just a lightweight data struct to define raw values.

The documentation explains most of the library's capabilities in depth.

But as mentioned in your other thread, timecode frame rate cannot always be automatically inferred from video frame rate.

melMass commented 3 years ago

Thanks, I've missed it for some reason and thought it was all string-based.