4.2.3 • Published 12 months ago

edl-genius v4.2.3

Weekly downloads
13
License
MIT
Repository
-
Last release
12 months ago

edl-genius · Build Status Coverage Status PRs Welcome GitHub license

An ES6 module to parse Edit Decision Lists. Currently, only CMX 3600 EDLs are supported, but I plan to include support for File129.

Installing / Getting started

$ npm install --save edl-genius
const EditDecisionList = require('edl-genius');

let e = new EditDecisionList(29.97, 'cmx3600');
edl.readFile('/path/to/your/edl')
  .then((edl) => {
    console.log(edl.events);
  })

/*
[ Event {
    sourceFrameRate: 29.97,
    recordFrameRate: 29.97,
    number: 1,
    reel: 'ACC112',
    trackType: 'V',
    transition: 'C',
    sourceStart: Timecode { frameRate: 29.97, frameCount: 197203 },
    sourceEnd: Timecode { frameRate: 29.97, frameCount: 197400 },
    recordStart: Timecode { frameRate: 29.97, frameCount: 107892 },
    recordEnd: Timecode { frameRate: 29.97, frameCount: 108089 },
    sourceClip: 'ACC112 WARBIRDS.NEW.01',
    sourceFile: 'ACC112 WARBIRDS'
    transitionTo: 'ACC118 BATTLEPIGS.NEW.01 },
  Event {
    sourceFrameRate: 29.97,
    recordFrameRate: 29.97,
    number: 2,
    ...
*/

Developing

Built With

This package was built in an environment running Node.js 10.0.0. Travis CI is used to check builds against the latest Node.js and the latest LTS release of Node.js (10.7.0 and 8.11.3 as of this writing).

The only development dependencies are packages needed for testing and linting. I use Mocha for testing and Istanbul to check test coverage.

Setting up Dev

git clone https://github.com/bradcordeiro/edl-genius.git
cd edl-genius/
npm install

Versioning

This package uses Semantic Versioning.

Tests

The goal is to have 100% test coverage of all edge cases. Tough when you're dealing with EDLs, a text exchange format that some vendors deviate from. All pull requests are welcome, and if you'd like to submit a pull request with additional tests, without changing the package code, that's totally cool.

npm test

To run the tests using Mocha.

npm run test-coverage

To get a code coverage report.

Style guide

This package was written using the Airbnb Style Guide. An .eslintrc.json file is included in source control, and ESLint as well as the Airbnb plugin are included as development dependencies.

API Reference

The goal of this module is really just to get information out of a text EDL and into JavaScript native data types. Each class defined by this module is really just object storage, with methods to get the information into those objects.

Timecode objects are created using timecode-boss module, which I also wrote. You can check its repository for its API. A common method of Timecode objects you'll probably want to use is toString().

EDL Class

Constructor
new EDL(frameRate : Number, type : String)
Returns an empty EDL, with its record frame rate set to the argument. The record frame rate defaults to 29.97 (a.k.a. 30 drop-frame) if omitted, and type defaults to 'cmx3600'. The record frame rate is the frame rate of the sequence the EDL represents, as opposed to the frame rate of the source material in it, which is parsed by this package.
Properties
NameTypeDescription
frameRateNumberThe record frame rate (i.e. the frame rate of the video sequence the EDL describes)
eventsEventAn array of Events found in the EDL. (See Event class description below)
Methods
MethodArgument TypeReturn TypeDescription
readFile(file)StringPromiseReads the file argument, and stores the found EDL Events in the EDL object's events property. The Promise Resolver is given this as its argument.
fromString(string)StringPromiseParses a string, and stores the EDL Events in the EDL object's events property. The Promise Resolver is given this as its argument.
toJSON(stringify)BooleanObject or StringReturns a JSON-strigifiable object if stringify is false, or a JSON string if stringify is true
filterDuplicateMultitrack()noneEDLReturns a new EDL with duplicate events removed (ignoring track number).

Event Class

Properties

For clarity, here is an example event that EDL could parse:

004  QEVL1GRN V2    C        01:31:44:03 01:31:44:12 01:00:02:24 01:00:03:01
M2   QEVL1GRN       037.5                01:31:44:03
* GETTY IMAGES__QEVL1GRND130_UNDERGROUND_EL CHAPO TUNNELS_INTERIOR OF ALCATRAZ PRI
* SON. ROW OF CELLS, CLOSE-UP OF CELL DOOR BARS, INSIDE OF JAIL CELL_180563302
* SOURCE FILE: QEVL1GRND130.MOV
* FROM CLIP NAME:  QEVL1GRND130.NEW.01
* TO CLIP NAME:  QEVL1ESCP001.NEW.01
NameTypeDescriptionExample (referencing above event)
numberNumberThe event number of the event in the EDL4
reelStringA short (generally 8 character) name of the source clip.QEVL1GRN
trackTypeStringA single character for the type of track (V for video, A for audio).V
trackNumberNumberA track number, for EDLs that describe multi-track sequences.2
transitionStringA transition type, generally C for a cut, or W000 for another transition.C
sourceStartTimecodeThe start of the source clip for the event.01:31:44:03
sourceEndTimecodeThe end of the source clip for the event.01:31:44:12
recordStartTimecodeThe start of the clip's position in the sequence01:00:02:24
recordEndTimecodeThe end of the clip's position in the sequence01:00:03:01
motionEffectMotionEffectAny speed-change applied to the clip (see MotionEffect class below){ reel: 'QEVL1GRN', speed: 37.5, entryPoint: 01:31:44:03 }
sourceFileStringThe source file name for the source clipQEVL1GRND130.MOV
sourceClipStringThe clip name from the editing system that generated the EDLQEVL1GRND130.NEW.01
toClipStringIf there is a transition from this clip to another, the clip name it transitions toQEVL1ESCP001.NEW.01
commentStringAny miscellaneous comments added to the event in the EDLGETTY IMAGES__QEVL1GRND130_UNDERGROUND_EL CHAPO TUNNELS_INTERIOR OF ALCATRAZ PRISON. ROW OF CELLS, CLOSE-UP OF CELL DOOR BARS, INSIDE OF JAIL CELL_180563302

MotionEffect Class

Properties
NameTypeDescriptionExample (referencing above event)
reelStringA short source reference for the clip'QEVL1GRN'
speedNumberThe frame rate at which the source clip is to be played37.5
entryPointTimecodeThe start time of the source clip being effected01:31:44:03

Licensing

Released under the MIT License.

4.2.3

12 months ago

4.2.2

12 months ago

4.2.1

1 year ago

4.0.0

1 year ago

4.1.2

1 year ago

4.2.0

1 year ago

4.1.1

1 year ago

3.4.11

2 years ago

3.4.9

2 years ago

3.4.10

2 years ago

3.4.8

2 years ago

3.4.7

3 years ago

3.4.6

3 years ago

3.4.5

3 years ago

3.4.4

3 years ago

3.4.3

4 years ago

3.4.2

4 years ago

3.4.1

4 years ago

3.4.0

4 years ago

3.3.1

4 years ago

3.3.0

4 years ago

3.3.8

4 years ago

3.2.8

4 years ago

3.2.7

4 years ago

3.2.6

4 years ago

3.2.5

4 years ago

3.2.4

4 years ago

3.1.4

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.5.0

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.4

6 years ago

1.2.4

6 years ago

1.1.4

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago