TimecodeKit

The definitive SMPTE timecode library for Swift.

MIT License

Stars
87
Committers
2

Bot releases are visible (Hide)

TimecodeKit - 1.6.7

Published by orchetect over 1 year ago

  • AVAsset: Added videoFrameRate(interlaced:)
  • AVAsset: Renamed frameRate() to timecodeFrameRate()
  • TimecodeFrameRate: Added videoFrameRate(interlaced:)
  • VideoFrameRate: Added init(asset:)
  • VideoFrameRate: Fixed typo in _48p case name
TimecodeKit - 1.6.6

Published by orchetect over 1 year ago

  • Added methods to extract start timecode and frame rate from AVAsset
TimecodeKit - 1.6.5

Published by orchetect over 1 year ago

  • Timecode: Added roundedUp(toNearest:) / roundUp(toNearest:) methods
  • Timecode: Added roundedDown(toNearest:) / roundDown(toNearest:) methods
TimecodeKit - 1.6.4

Published by orchetect almost 2 years ago

  • TimecodeInterval: Added init(cmTime:) and cmTime property
  • CMTime: Added toTimecodeInterval(at:) method
  • Added Fraction(_: CMTime) and CMTime(_: Fraction) inits
  • Added Fraction(...).toCMTime() and CMTime(...).toFraction() methods
TimecodeKit - 1.6.3

Published by orchetect almost 2 years ago

  • Timecode: Negative value calculations now more accurate
  • Timecode: init(rawValues:) negative input now returns Components with only largest non-zero component negated
  • Timecode.FrameCount: Added isNegative
  • TimecodeInterval: Added Equatable, Hashable conformance
  • TimecodeInterval: Added init(_: Fraction) and rationalValue
  • TimecodeInterval: Removed Sign, now using FloatingPointSign
  • TimecodeInterval: sign property is now public
  • Fraction: Added abs()
  • Fraction: Added isNegative, negate(), negated()
  • Fraction: isSimplestForm renamed to isReduced
  • Fraction: Added toTimecodeInterval(at:) convenience method

Full Changelog: https://github.com/orchetect/TimecodeKit/compare/1.6.2...1.6.3

TimecodeKit - 1.6.2

Published by orchetect almost 2 years ago

  • Timecode: Rational value (fraction, including CMTime) now supports subframes.
    Subframes were previously truncated in 1.6.1.

Full Changelog: https://github.com/orchetect/TimecodeKit/compare/1.6.1...1.6.2

TimecodeKit - 1.6.1

Published by orchetect almost 2 years ago

  • Timecode: Added CMTime init, setTimecode(CMTime) methods and cmTime property
  • Fraction: refined instance methods

Full Changelog: https://github.com/orchetect/TimecodeKit/compare/1.6.0...1.6.1

TimecodeKit - 1.6.0

Published by orchetect almost 2 years ago

TimecodeKit 1.6.0

New Frame Rate Paradigm

Version 1.6.0 introduces a new frame rate paradigm:

  • Renamed: Timecode.FrameRate to top-level TimecodeFrameRate
  • New: VideoFrameRate

In summary:

  • VideoFrameRate rates are actual video format rates (25p, 25i, 29.97p, 29.97i, etc.)
    • can be constructed from a raw floating-point fps value: init(fps:)
    • can be converted to a corresponding TimecodeFrameRate: timecodeFrameRate(drop:)
  • TimecodeFrameRate rates are timecode display rates (25, 29.97, 29.97d, etc.)

New Rational Fraction Notation

Some file formats encode video frame rate and/or time locations (timecode) in rational number notation: a fraction of two whole number integers. (AAF encodes video rate this way, whereas FCPXML (Final Cut Pro) encodes both video rate and time locations as fractions.)

TimecodeKit now incorporates initializers and properties to facilitate the use of rational fractions, and can convert to/from them.

TimecodeKit - 1.5.0

Published by orchetect almost 2 years ago

  • For ancillary value types (real time, audio samples, FrameCount):
    • Added clamping, wrapping, and rawValues variants to both init and setTimecode() methods.
      Previously only primary value types (String, TCC) had these. (#49)
  • Added Int overloads for audio samples in addition to where Double was already used (#50)
  • Minor API consistency tweaks
TimecodeKit - 1.4.0

Published by orchetect almost 2 years ago

Fixed

  • 30d / 60d / 120d: Conversions for real time and audio samples are now correct
  • 30d / 60d / 120d: Rate fraction is now correct (inherently fixes aafMetadata and CMTime as well)

Improvements

  • Internal refactors to simplify various calculations
  • Timecode(raw:) video frame rate heuristic now omits 30d/60d/120d from being possible matches, as they are not video rates and are display rates only
TimecodeKit - 1.3.1

Published by orchetect about 2 years ago

  • Bugfix: Fixed Timecode Comparable calculation regression
TimecodeKit - 1.3.0

Published by orchetect about 2 years ago

Library Updates

  • TimecodeKit is now dependency-free
  • Improved inlining compatibility with Xcode 14 betas

TimecodeInterval

  • Renamed Timecode.Delta (marked deprecated) to be top-level TimecodeInterval
  • Added Timecode unary operators - and + to construct a new TimecodeInterval instance
  • Timecode: Added init(flattening: TimecodeInterval)

TimecodeTransformer

  • Renamed Timecode.Transformer (marked deprecated) to be top-level TimecodeTransformer
  • TimecodeTransformer: now allows multiple transforms in series
  • Timecode: Added .transform(using: TimecodeTransformer) and .transformed(using: TimecodeTransformer)
TimecodeKit - 1.2.11

Published by orchetect about 2 years ago

  • Removed inlining to improve compatibility with Xcode 14
TimecodeKit - 1.2.10

Published by orchetect over 2 years ago

  • Improved tvOS and watchOS support
TimecodeKit - 1.2.9

Published by orchetect almost 3 years ago

  • Fixed Xcode platforms build error that showed up in Xcode 13.2
TimecodeKit - 1.2.8

Published by orchetect almost 3 years ago

  • Allows all semicolons for string separators (Adobe Premiere style) ie: 00;00;00;00 and all permutations
TimecodeKit - 1.2.7

Published by orchetect almost 3 years ago

  • Added FrameRate(raw:favorDropFrame:) init
  • Added FrameRate.fraction
  • Added FrameRate Formats for convenience:
    • .aafMetadata returns pre-formatted strings for AAF XML fields
    • .frameDurationCMTime returns an AVFoundation CMTime instance using the rate fraction to represent duration of 1 frame in seconds
TimecodeKit - 1.2.6

Published by orchetect about 3 years ago

  • Moved UI components to their own optional module
  • Improved stability
TimecodeKit - 1.2.5

Published by orchetect about 3 years ago

  • Adjusted dependency version, removed deprecations
TimecodeKit - 1.2.4

Published by orchetect about 3 years ago

  • Changed internal capture semantics