New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

frames-to-rational

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frames-to-rational

Convert frames to a rational number for use with FCPX

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

frames-to-rational

Turn a frame count into a rational numer (for use with FCPX) - Learn more about FCPXml on it's documentaion.

Instead of frames or timecode, FCPX will expect 1 frame of 25fps video - for example - to look like this:

100/2500s

This module will take in a frame count and frame rate, then spit out the rational number.

Allows conversion to any of the following frame rates.

  • 23.98
  • 24
  • 25
  • 29.97
  • 30
  • 50
  • 59.94
  • 60

Install

npm install frames-to-rational

Usage

const framesToRational = require("frames-to-rational");

// Convert 1 frame at 25fps to a rational number
framesToRational.convert(1, "25");
// -> 100/2500s

// Convert 156200 frames at 29.97fps to a rational number
framesToRational.convert(156200, "29.97");
// -> 156200001/30000s

// Convert 7200 frames at 30fps to a rational number
framesToRational.convert(7200, "30");
// -> 720000/3000s

When importing a FCPXml file to Final Cut Pro X, the application will refractor all the numbers above to the shortest version possible.

Keywords

frames

FAQs

Package last updated on 02 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts