NodeJs server for streaming video from path
npm install video-server
Video server exports express app
let app = require('video-server');
app.listen(app.get('PORT'));
All videos stored at internal directory by default (storage root)
Is multipart request. Body must contain video
parameter with file.
It also can contain category
parameter. In storage root will be created subdirectory when category
presented
Returns json object with id
property. Id is a relative path to file from storage root
renders sample view with html5 video object
send partial content video streaming
Install video server as global dependency
npm install -g video-server
Then run
video-server [-p] [-d]
-p, --port
- port for web server
-d, --storage_dir
- path for direcoty with video
-h, --help
- help
To change port run
app.set('PORT', 80)
Default is 8000
To change directory where videos are stored
app.set('STORAGE_DIR', '/path/to/your/directory/')