Skip to content
Browse files

update README

  • Loading branch information...
1 parent 2e4154d commit a884497f61956acab50eb3a16e3840dfd4aad704 @roman01la committed Feb 13, 2014
Showing with 20 additions and 7 deletions.
  1. +17 −3 README.md
  2. +1 −2 models/user.js
  3. +2 −2 routes/api/videos/post.js
View
20 README.md
@@ -5,10 +5,24 @@ Made for demo purpose only.
Real-time video encoding application built with Node.js, Express, Passport and MongoDB.
-Make sure you have both `mongodb` and `avconv` installed, as well as `node.js`, `npm` and `bower`. Install all deps:
+Make sure you have both `avconv` (or use `ffmpeg` instead) and `mongodb` installed, as well as `node.js`, `npm` and `bower`:
+###MongoDB
+Download: [docs.mongodb.org/manual/installation](http://docs.mongodb.org/manual/installation/). Add to PATH and run `mongod --dbpath=/path/to/db/`, where `/path/to/db` is already existing directory.
+
+###Node.js & NPM
```
-sudo npm install && bower install
+sudo apt-get install python-software-properties python g++ make
+sudo add-apt-repository ppa:chris-lea/node.js
+sudo apt-get update
+sudo apt-get install nodejs
```
-and run with `node app.js`
+Create a symlink: `sudo ln -s /usr/bin/nodejs /usr/bin/node`
+
+###Bower
+```
+sudo npm install -g bower
+```
+Install dependencies:
+`sudo npm install && bower install` and run with `node app.js`
View
3 models/user.js
@@ -1,8 +1,7 @@
/* User model */
var mongoose = require('mongoose'),
- Schema = mongoose.Schema,
- Video = require('./video').schema;
+ Schema = mongoose.Schema;
var User = new Schema({
username: {
View
4 routes/api/videos/post.js
@@ -16,10 +16,10 @@ var post = function (req, res) {
url = '/files/' + fileName.digest('hex') + '.webm';
filePath = rootPath + '/public' + url;
- args = ['-i', 'pipe:0', '-f', 'webm', '-threads', '2', '-s', 'hd480',
+ args = ['-i', 'pipe:0', '-f', 'webm', '-s', 'hd480',
'-ab', '96k', '-vb', '600k', 'pipe:1'];
- avconv = spawn('avconv', args);
+ avconv = spawn('avconv', args); // If no avconc, use ffmpeg instead
output = fs.createWriteStream(filePath);
form.on('part', function (part) {

0 comments on commit a884497

Please sign in to comment.
Something went wrong with that request. Please try again.