Prerequisites

A list of some things used in this project that is good to have some working knowledge of before or while diving into the code.

If you don't know it already might be good to recap and/or learn node a bit. This might be easier coming from another OO language. Safari book online node intro video + blog post on learning node js.

Electron

electron, is what powers the atom code editor. It's a way to make apps for the desktop in node. It creates a chrome v8 environment that allows your app to run independently of the browser.

Why Electron and not nwjs?

  1. I personally found nwjs documentation easier to follow wants you get a round the different contexts.

  2. In nwjs you can easily hand a front end that could be moved to work as standalone "static site" or be a part of a web app. Allowing for max decoupling

  3. As far as I understood electron is more opinionated and this would not be possible within that.

Small NWJS apps Examples

OS X desktop application to transcibe video or audio files using IBM Watson Speech to text API. This was an initial prototype preceeding autoEdit2. The idea was to test the quality of the IBM Watson STT recognition with the user in isolation from other functionality. It proved very popular with video producers.

Note: Because it was a "throw away prototype" there some unresolved bugs, such as if the video exceeds 100mbs when converted into audio to send to IBM STT API it will be rejected by the API and no error raised to the user. In autoEdit2 this has been fixed by chunking the audio into 5 minutes clips.

NWJS os x desktop app that given a srt and a video burns the captions onto the video. Can also export as gif.

Use of

Cue sheet generator

Example running ruby script and using nwjs for GUI only

backbone

Is what is used on the client side. The app has been built in such a way that the front end can be used as stand alone, such as for the demo. Or if making a web based version of

backbone.sync

Overwriting the call to api

underscore

Backbone uses underscore as a dependencies, so made use of this to simplify certain operations.

JQuery

JQuery it's a backbone dependencies. So made use of this to simplify certain client side operations.

Bootstrap

For HTML components and for js client side components bootstrap js

Native node components used

fs, path, etc..

ffmpeg and node wrapper fluent-ffmpeg

Worth having a look at fluent-ffmpeg and [ffmpeg][ffmpeg]. Ffmpeg does not have great documentation.

On the other hand fluent ffmpeg allows you to the set ffmpeg bin, which is handy for packaging and using ffmpeg inside nwjs without requiring it as a dependency, is documented with examples and is generally more straightforward. t

[ffmpeg]:https://www.ffmpeg.org/

Last updated