asquared / aa-recorder

Simple script to record from IP cameras via RTSP
MIT License
9 stars 2 forks source link

Tell us more about how to use your script #1

Closed pospelov-vyacheslav closed 8 years ago

pospelov-vyacheslav commented 8 years ago

Good afternoon. Tell us more about how to use your script, please. I do the following:

  1. ffmpeg installed on this statement: https://www.assetbank.co.uk/support/documentation/install/ffmpeg-debian-squeeze/ffmpeg-debian-jessie/
  2. I set node like this: apt-get install node
  3. install npm: apt-get install npm
  4. I downloaded aa-recorder: wget https://github.com/asquared/aa-recorder/archive/master.zip
  5. unpacked: unzip master.zip
  6. I prepared the files and folders: mkdir /srv/video-storage cd aa-recorder-master cp bin/aa-recorder /usr/bin/aa-recorder cp examples/config.json /etc/aa-recorder.conf.json nano /etc/aa-recorder.conf.json { "storageDir": "/srv/video-storage", "cameras": [ { "name": "camera1004", "url": "rtsp://admin:123456@192.168.0.124:1004/mpeg4", "args": { "videocodec": "h264", "compression": "20", "fps": "20", "duration": "120", "resolution": "1280x738" } } ] }

7 execute: cd examples ./aa-recorder.service

it gives me: bash: ./aa-recorder.service: Access denied

8 cd ../bin ./aa-recorder /etc/aa-recorder.conf.json nothing gives. I expect the appearance of a folder in "/srv/video-storage" mp4-files, but they are not there. What am I doing wrong?

9 execute commands "npm install -g aa-recorder" it gives me:

npm ERR! not a package /tmp/npm-668-8N3qzHVu/1469446776017-0.9159347319509834/tmp.tgz

ref@1.3.2 install /usr/local/lib/node_modules/aa-recorder/node_modules/diskusage/node_modules/ref node-gyp rebuild

gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12) gyp ERR! System Linux 3.16.0-4-amd64 gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/aa-recorder/node_modules/diskusage/node_modules/ref gyp ERR! node -v v0.10.29 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

ffi@2.0.0 install /usr/local/lib/node_modules/aa-recorder/node_modules/diskusage/node_modules/ffi node-gyp rebuild

path.js:309 var path = (i >= 0) ? arguments[i] : process.cwd(); ^ Error: ENOENT, no such file or directory at Object.exports.resolve (path.js:309:52) at Function.Module._resolveLookupPaths (module.js:260:17) at Function.Module._resolveFilename (module.js:328:31) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/usr/share/node-gyp/bin/node-gyp.js:13:11) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! ref@1.3.2 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ref@1.3.2 install script. npm ERR! This is most likely a problem with the ref package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls ref npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.16.0-4-amd64 npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "aa-recorder" npm ERR! cwd /home/user/2/aa-recorder-master/bin npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/user/2/aa-recorder-master/bin/npm-debug.log npm ERR! not ok code 0

asquared commented 8 years ago

The .service file is not executable, it's a config file for systemd. Don't try to run that.

As far as the npm errors go, you may need to npm install -g npm to update your npm installation. The npm shipped by Debian is a bit out of date.

Once you've successfully done npm install -g aa-recorder the script will be installed to /usr/local/bin, so you should just be able to run aa-recorder from the prompt.

On Jul 25, 2016 7:45 AM, "pospelov-vyacheslav" notifications@github.com wrote:

Good afternoon. Tell us more about how to use your script, please. I do the following:

  1. ffmpeg installed on this statement: https://www.assetbank.co.uk/support/documentation/install/ffmpeg-debian-squeeze/ffmpeg-debian-jessie/
  2. I set node like this: apt-get install node
  3. install npm: apt-get install npm
  4. I downloaded aa-recorder: wget https://github.com/asquared/aa-recorder/archive/master.zip
  5. unpacked: unzip master.zip
  6. I prepared the files and folders: mkdir /srv/video-storage cd aa-recorder-master cp bin/aa-recorder /usr/bin/aa-recorder cp examples/config.json /etc/aa-recorder.conf.json nano /etc/aa-recorder.conf.json

{ "storageDir": "/srv/video-storage", "cameras": [ { "name": "camera1004", "url": "rtsp://admin:123456@192.168.0.124:1004/mpeg4", "args": { "videocodec": "h264", "compression": "20", "fps": "20", "duration": "120", "resolution": "1280x738" } } ] }

  1. run: cd examples ./aa-recorder.service

it gives me: bash: ./aa-recorder.service: Access denied

1.

cd ../bin ./aa-recorder /etc/aa-recorder.conf.json nothing gives. I expect the appearance of a folder in "/srv/video-storage" mp4-files, but they are not there. What am I doing wrong? 2.

execute commands "npm install -g aa-recorder" it gives me:

npm ERR! not a package /tmp/npm-668-8N3qzHVu/1469446776017-0.9159347319509834/tmp.tgz

ref@1.3.2 install /usr/local/lib/node_modules/aa-recorder/node_modules/diskusage/node_modules/ref node-gyp rebuild

gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12) gyp ERR! System Linux 3.16.0-4-amd64 gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/aa-recorder/node_modules/diskusage/node_modules/ref gyp ERR! node -v v0.10.29 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

ffi@2.0.0 install /usr/local/lib/node_modules/aa-recorder/node_modules/diskusage/node_modules/ffi node-gyp rebuild

path.js:309 var path = (i >= 0) ? arguments[i] : process.cwd(); ^ Error: ENOENT, no such file or directory at Object.exports.resolve (path.js:309:52) at Function.Module._resolveLookupPaths (module.js:260:17) at Function.Module._resolveFilename (module.js:328:31) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/usr/share/node-gyp/bin/node-gyp.js:13:11) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! ref@1.3.2 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ref@1.3.2 install script. npm ERR! This is most likely a problem with the ref package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls ref npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.16.0-4-amd64 npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "aa-recorder" npm ERR! cwd /home/user/2/aa-recorder-master/bin npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/user/2/aa-recorder-master/bin/npm-debug.log npm ERR! not ok code 0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/asquared/aa-recorder/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AAF3r-Sb2RkEUePyJboltfIPxjX3ez4Lks5qZKHcgaJpZM4JUCja .

asquared commented 8 years ago

Also, don't forget to consult your camera manual for the RTSP arguments you can use. The args in the example are for AXIS brand cameras. If you're using a camera from a different manufacturer, you may have to change the args accordingly.