Method: Timecode#with_frames_as_fraction

Defined in:
lib/timecode.rb

#with_frames_as_fractionObject Also known as: with_fractional_seconds

FFmpeg expects a fraction of a second as the last element instead of number of frames. Use this method to get the timecode that adheres to that expectation. The return of this method can be fed to ffmpeg directly.

Timecode.parse("00:00:10:24", 25).with_frames_as_fraction #=> "00:00:10.96"


356
357
358
359
360
# File 'lib/timecode.rb', line 356

def with_frames_as_fraction
  vp = value_parts.dup
  vp[-1] = (100.0 / @fps) * vp[-1]
  WITH_FRACTIONS_OF_SECOND % vp
end