i-flicks

Video sharing website and application.

Overview

i-flicks pulls together several components to give a full, open source video sharing application.

i-flicks is intended for small teams or individuals who want a stand alone video presentation system. It will work with a few hundred or low thousands of videos and a handful of concurrent viewers. i-flicks originated from a desire to share family videos hosted on a home server and I couldn't find a fully featured Node implementation.

As of the time of writing this, i-flicks is still in active developmnent and the version number reflects API changes (semantic versioning), not production stability. Database changes should be additive between versions and so new versions won't overwrite your existing videos unless you switch between SQL Server and NEDB or your uploads directory is inside your node_modules folder!).

If you are interested in a larger installation or new features please get in touch as that's the best way to make it happen.

For all operating systems
Create a folder for your new project on your computer and move to that folder.
run:

npm install i-flicks

Check the runOnce file exists. Sometimes we forget to rename it before deploying to NPM. If it doesn't then rename the .done file:
cd node_modules/i-flicks/views
mv runOnce.done.hbs runOnce.hbs *OR* rename runOnce.done.hbs runOnce.hbs

There is currently a bug in Fluent-FFmpeg which means videos in portrait mode cause a crash.
Open file below your install folder at ./node_modults/i-flicks/node_modules/fluent_ffmpeg/lib/ffprobe.js
Add "lines = lines.filter(Boolean);" to line 15.
Check the Github issue for updates.

Create a node application, create a "settings" object with paths to the software installed above and require i-flicks....
For example, add this to a file called app.js

How to listen on port 80
Node.js requires elevated privileges or root access to listen on port 80 or 443. It isn't a good idea to do this and so something needs to forward requests to port 80 onto the Node.js port. IPTables or Nginx both work.
IPTables is quicker to setup as it is installed on most Linux distrubutions. Nginx works on Windows and Linux and adds a bit more flexibility.

What about io.js, HTTPS, SPDY or HTTP2?
i-flicks works with other io.js amd alternative HTTP modules. None have been production tested but all work when tested as a Friday afternoon bit of fun.

Settings

The settings object options are as follows:

Setting

Default

Purpose

databasePath

""

Path to database file storage. Defaults to nothing and so uses the root of your application.

ffmpegPath

"/"

Path to the ffmpeg executable. For example, 'C:/Program Files/ffmpeg/bin/ffmpeg.exe' (note the forward slashes) or '/usr/bin/ffmpeg')

ffprobePath

"/"

Path to the ffprobe executable

flvMetaPath

"/"

Path to the FLVMeta executable

maxFFmpegInatances

1

Number of copies of FFmpeg to run at once. If the encoding server only runs FFmpeg and has lots of processor cores then this can be high, otherwise leave it at 1 or 2.

uploadPath

"/"

Where to store uploaded files

mediaPath

"/"

Where to store encoded media files

statsDServer

undefined

If you have a StatsD server then i-flicks can log various metrics to it.

statsDDebug

undefined

StatsD debug flag.

statsDPrefix

undefined

Text prefix for statsD log metric names.

cssPath

undefined

Absolute path to a file used to override the default stylesheet.

css

white.css

Built in style skins. Values are white.css and black_yellow.css.

env

development

Environment variable. Overrides NODE_ENV for this application. If not set then uses NODE_ENV. Values are development and production.

mailgunKey

undefined

If using MailGun (free option available) then this is the key provided.

mailgunDomain

undefined

Mailgun domain.

gmailUsername

undefined

If using GMail then this is the username used to logon to GMail. Note that GMail is only suitable for small volumes of mail and Google may block the account. It is not the recommended option but it is an easy one to get started.