Project folder structure
Project folder structure.
Going onto subsequent version the project structure is likely to change a bit, but an overview can give you an idea of the the main parts, components and architecture of the application.
As of v1.0.6
:
build.js
build.js
Deployment script. more info on packaging and building a new release here.
docs
Project page
docs
Project pageContains a jeckyll site for the project page, hosted on github pages.
Uses this template for the Landing page pratt-app-landing-page demo
While the user manual has been moved on gitbooks
Documentaiton
Was initially Using jsdoc and [docco][docco] for automatic documentation generated. See updating documentation section for more on how to update jsdoc and [docco][docco]. But have decided to move the documentation gitbooks (which is what you are most likely reading now). And still need to decide what is the place, if any for automated generated documentation.
spec
spec
Test suite npm run test
. Uses jasmine for testing. Testes are setup to be all in one place rather then divided with their respective components, for ease of use. Altho test coverage is far from complete and could do with some attention, see supporting the project if that's something you'd be interested getting involved with.
nwjs
nwjs
Is the front end of the project.
db.js
overrides backbone.sync
method to provide a backend for the app and persistent storage using linvodb3, which uses medeadown
to storing db on the user file system. See current db setup tutorial for more info.
in index.html
the window object is used to provide an interface between the nwjs mixed contexts
in lib/app/app.js
the choice between the demo db and the production db is made.
demo_paperedit.json
anddemo_transcription.json
provide the data for the demo when index.html
is run in client side mode in the browser. and lib/app/demo_db.js
provides the logic for the demo db.
lib
lib
app
contains the backbone project. this is packaged for the client side with browserify.
lib/app
lib/app
backbone app. Setup using browserify, and ejs for templating.
lib/bin/ffmpeg
and ffprobe
binaries
lib/bin/ffmpeg
and ffprobe
binariesPackaged binaries of ffmpeg
and ffprobe
inside lib/bin
so that the app does not relies on this as a dependency when packaged inside nwjs.
config.js
defined the path to where these binaries are stored.
To access this binaries in the app, we can then do, eg inside lib/interactive_transcription_generator
.
edl_composer
module
edl_composer
moduleSee EDL format, and Export section as well as EDL composer module.
lib/interactive_transcription_generator
lib/interactive_transcription_generator
After the user uploads a video or audio file the backbone app override default backbone.sync
and calls the nwjs/db.js
which after saving the transcription model in db, triggers this module to get stt transcription, video preivew, and metadata info.
At a hight level this module:
converts the file to an audio file meet the IBM Watson STT Specs, using the submodule
transcriber
.if greater then 5 min long it splits it into 5 min chunk.
It keeps tracks of the time offset of each clip.
It sends audio files to IBM STT API.
If submitted file was greater then 5 min.
When results starts to come back as json after about 5 min or less results are re-interpolated into one json file.
The json returned by IBM is converted into json meeting autoEdit2 specs and saved in db.
User can now view interactive an transcription.
interactive_transcription_generator
. On top of prepping the audio or video file to get a transcription from IBM, it also generates a webm html5 video preview and reads the metadata, which is something needed make an EDL.
The transcriber
module used by interactive_transcription_generator
can also chose between using Gentle open source STT, Pocketsphinx or IBM to generate the transcription depending on what was specified by the user.
interactive_transcription_generator
:
The pocketsphinx
module was originally extracted from the Video grep project.
The implementation of this module is discussed in more details in subsequent sections.
srt
module
srt
modulesrt module is a simplified version of srt parse composer module also npm.
Last updated