Giter Site home page Giter Site logo

jeevikasirwani / etro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from etro-js/etro

0.0 0.0 0.0 33.34 MB

Typescript video-editing framework for the browser

Home Page: https://etrojs.dev

License: GNU General Public License v3.0

Shell 0.19% JavaScript 3.74% TypeScript 94.19% HTML 1.87%

etro's Introduction

Etro

Build Status Discord

Etro is a typescript framework for programmatically editing videos. It lets you composite layers and add filters (effects). Etro comes shipped with text, video, audio and image layers, along with a bunch of GLSL effects. You can also define your own layers and effects with javascript and GLSL.

Features

  • Composite video and audio layers
  • Use built-in hardware accelerated effects
  • Write your own effects in JavaScript and GLSL
  • Manipulate audio with the web audio API (audio effects coming soon)
  • Define layer and effect parameters as keyframes or custom functions
  • Render to a blob in realtime (offline rendering coming soon)

Installation

npm i etro

System Dependencies

  • node-canvas

If you have problems while installing etro you may need to manually install additional dependencies. See: compiling node-canvas

Basic Usage

Let's look at an example:

import etro from 'etro'

var movie = new etro.Movie({ canvas: outputCanvas })
var layer = new etro.layer.Video({ startTime: 0, source: videoElement })  // the layer starts at 0s
movie.addLayer(layer)

movie.record({ frameRate: 24 })  // or just `play` if you don't need to save it
    .then(blob => ...)

The blob could then be downloaded as a video file or displayed using a <video> element.

See the documentation for a list of all built-in layers.

Effects

Effects can transform the output of a layer or movie:

var layer = new etro.layer.Video({ startTime: 0, source: videoElement })
    .addEffect(new etro.effect.Brightness({ brightness: +100) }))

See the documentation for a list of all built-in effects.

Dynamic Properties

Most properties also support keyframes and functions:

// Keyframes
layer.effects[0].brightness = new etro.KeyFrame(
  [0, -75],  // brightness == -75 at 0 seconds
  [2, +75]  // +75 at 2 seconds
)

// Function
layer.effects[0].brightness = () => 100 * Math.random() - 50

See the documentation for more info.

Using in Node

To use Etro in Node, see the wrapper:

Running the Examples

Start the development server (only used for convenience while developing; you don't need a server to use Etro):

npm i
npm run build
npm start

Now you can open any example (such as http://127.0.0.1:8080/examples/introduction/hello-world1.html).

Further Reading

Contributing

See the contributing guide

License

Distributed under GNU General Public License v3. See LICENSE for more information.

etro's People

Contributors

clabe45 avatar dependabot[bot] avatar leanjunio avatar yvz5 avatar abidjappie avatar vantezzen avatar gulianrdgd avatar jay-lee-code avatar blueuwu avatar adouz avatar codesourc3 avatar gaston-flores avatar geopic avatar jeevikasirwani avatar imezemz avatar m5r avatar pavan-nambi avatar surajpandya24 avatar viktoriussuwandi avatar hmansh avatar bu7maydabdu avatar pvanderlaat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.