edl
v2.0.0
Published
A modern TypeScript library for creating Edit Decision Lists (EDL). EDL is a plain text format that describes a video sequence for reconnecting media in video editing software. This is a modernized fork of @pietrop/edl-composer.
Readme
EDL
A modern TypeScript library for creating Edit Decision Lists (EDL). EDL is a plain text format that describes a video sequence. It can be opened in video editing software to reconnect media to assemble a video sequence.
This is a modernized fork of @pietrop/edl-composer with:
- Full TypeScript support with strict typing
- Modern build system (tsup, pnpm, vitest)
- Dual ESM/CJS package exports
- Built-in timecode conversion utilities
- SMPTE drop-frame timecode support (29.97 & 59.94 fps)
- Automatic FCM (Frame Count Mode) detection
- Improved developer experience
Features
- EDL Generation: Create industry-standard EDL files from JSON sequences
- Timecode Handling: Accurate timecode calculations with offset support
- Frame Rate Support: Works with all standard frame rates (23.976, 24, 25, 29.97, 30, 50, 59.94, 60 fps)
- SMPTE Drop-Frame: Automatic drop-frame timecode support for 29.97 and 59.94 fps
- MXF Support: Special handling for MXF files with separate video/audio tracks
- TypeScript: Full type safety with exported types for better IDE support
Setup
Setup for Contributing
Clone the repo
git clone [email protected]:jordanburke/edl.gitInstall dependencies
pnpm installAnd if you want to try it out
pnpm example-usageSetup for usage
To use in your project, the module can be found on npm as edl
so just run the following to add to your project.
npm install edlUsage
The EDL sequence should have the following attributes
var edlSq = {
"title": "Demo Title of project",
"events": [
{ "id":1,
"startTime": 10, // in seconds
"endTime": 20,
"reelName":"SomeReelName",
"clipName":"Something.mov",
"offset": "00:00:28:08", //offset is optional default is "00:00:00:00"
"fps": 25
},
{ "id":2,
"startTime": 45,
"endTime": 55,
"reelName":"SomeOtherReelName",
"clipName":"SomethingElse.mov",
"offset": "00:00:28:08",
"fps": 29.97
},
{ "id":2,
"startTime": 45,
"endTime": 55,
"reelName":"NA",
"clipName":"SomethingElse.mov",
"offset": "00:00:28:08",
"fps": 24
}
]
}And it can be parsed and composed into an EDL as following.
var edl = new EDL(edlSq);
console.log(edl.compose());This returns a string that you can write to file or else.
TITLE: Demo Title of project
FCM: DROP FRAME
001 SOMEREE AA/V C 00:00:38:08 00:00:48:08 00:00:00:00 00:00:10:00
* FROM CLIP NAME: Something.mov
FINAL CUT PRO REEL: SomeReelName REPLACED BY: SOMEREE
002 SOMEOTH AA/V C 00:01:13;08 00:01:23;08 00:00:10:00 00:00:20:00
* FROM CLIP NAME: SomethingElse.mov
FINAL CUT PRO REEL: SomeOtherReelName REPLACED BY: SOMEOTH
003 AX AA/V C 00:01:13:08 00:01:23:08 00:00:20:00 00:00:30:00
* FROM CLIP NAME: SomethingElse.mov
SMPTE Drop-Frame Support
The library automatically detects when drop-frame timecode should be used:
- Automatic Detection: For 29.97 and 59.94 fps content, the library automatically uses drop-frame timecode format (semicolons
;) when timecodes are 1 minute or longer - FCM Header: The EDL header automatically sets
FCM: DROP FRAMEorFCM: NON-DROP FRAMEbased on the content - Timecode Format: Drop-frame timecodes use semicolons (e.g.,
00:01:00;00) while non-drop use colons (e.g.,00:01:00:00)
System Architecture
High level overview of system architecture
See docs guides understanding edl specs
Development env
How to run the development environment Coding style convention ref optional, eg which linter to use Linting, github pre-push hook - optional
- node
- npm
Build
How to run build
Build the library:
pnpm buildThis creates both ESM and CommonJS builds in the dist/ directory.
Tests
How to carry out tests
Run tests using Vitest
pnpm testOr run tests once:
pnpm test:runDeployment
How to deploy the code/app into test/staging/production
No deployment just a node module
