Skip to content

Releases: eoyilmaz/timecode

1.4.0

17 Jan 15:45
Compare
Choose a tag to compare

(description from #52)
Added a mean to get the timestamps of a given SMPTE Timecode. Two timebases are considered:

  • Video system time: to_systemtime()
  • Real time: to_realtime()

NTSC framerates will return different values as the system time is not aligned to the wall-clock time. All others should return the exact same value.

DF 29.97:

> tc = Timecode("29.97", '00:59:59;29')
> tc.to_systemtime()
'01:00:00.000'
> tc.to_realtime()
'00:59:59.996'

NDF 29.97:

> tc = Timecode("29.97", '00:59:59:29', force_non_drop_frame=True)
> tc.to_systemtime()
'01:00:00.000'
> tc.to_realtime()
'01:00:03.600'

PAL 50:

> tc = Timecode("50", '00:59:59:49')
> tc.to_systemtime()
'01:00:00.000'
> tc.to_realtime()
'01:00:00.000'

I did not implement setters as I don't think there's a meaningful usage or need to them.
Hopefully this may help others understand better Timecodes running at different rates and the relations to the wall-clock time.

The second commit is to preserve the drop frame flag on elementary operations.

> tc = Timecode(29.97, '00:00:00:00',  force_non_drop_frame=True)
> assert tc.drop_frame is False
> tc = tc + 1
> tc
'00:00:00:01' #before: '00:00:00;01'
> tc.drop_frame
False #before: True

Thanks for @cubicibo for contribution.

As usual, version 1.4.0 is also released to PyPI and running pip install timecode will install it.

1.3.2

01 Jan 16:04
Compare
Choose a tag to compare

No functional changes in this version, it only contains documentation update to docstring format and clarification on the accepted framerate values.

1.3.1

03 Feb 03:32
Compare
Choose a tag to compare
  • Fix: Fixed 23.98, 29.97 DF, 29.97 NDF, 59.94 and 59.94 NDF rollover to 00:00:00:00 after 24 hours.

1.3.0

02 Nov 21:37
Compare
Choose a tag to compare
  • Fix: Fixed a huge bug in 29.97 NDF and 59.97 NDF calculations introduced in v1.2.3.

  • Fix: Fixed Timecode.framerate when it is given as 23.98. The framerate attribute will not be forced to 24 and it will stay 23.98.

  • Update: Timecode.tc_to_frames() method now accepts Timecode instances with possibly different frame rates then the instance itself.

  • Fix: Fixed Timecode.div_frames() method.

  • Update: Test coverage has been increased to 100% (yay!)

1.2.5

02 Nov 16:57
Compare
Choose a tag to compare
  • Fix: Fixed an edge case when two Timecodes are subtracted the resultant Timecode will always have the correct amount of frames. But it is not possible to have a Timecode with negative or zero frames as this is changed in 1.2.3.

  • Fix: Fixed Timecode.float property for dropframe timecodes.

1.2.4

16 Oct 22:04
Compare
Choose a tag to compare
  • Update: It is now possible to supply a Fraction instances for the framerate argument.

1.2.3

06 Oct 20:53
Compare
Choose a tag to compare
  • Update: Passing frames=0 will now raise a ValueError. This hopefully will clarify the usage of the TimeCode as a duration. If there is no duration, hence the frames=0, meaning that the number of frames of the duration that this TimeCode represents is 0, which is meaningless.
  • Update: Also added some validation for the frames property (oh yes it is a property now).

0.4.2

15 Jun 08:29
Compare
Choose a tag to compare
  • Update: Version bump for PyPI.

0.4.1

15 Jun 08:29
Compare
Choose a tag to compare
  • Fix: Fixed a test that was testing overloaded operators.

0.4.0

06 Jun 07:10
Compare
Choose a tag to compare
  • New: Frame delimiter is now set to ":" for Non Drop Frame, ";" for Drop Frame and "." for millisecond based time codes. If Timecode.__init__() start_timecode is passed a string with the wrong delimiter it will be converted automatically.

  • Update: All tests involving Drop Frame and millisecond time codes are now set to use the new delimiter.

  • New: Timecode.tc_to_string() method added to present the correctly formatted time code.

  • New: Timecode.ms_frame boolean attribute added.

  • New: Timecode.__init__() now supports strings, ints and floats for the framerate argument.