Open danielpmc opened 4 years ago
Try deleting package-lock.json
before you install.
rm package-lock.json
npm i
Do you get the same output?
yes same output
And what if you install everything manually?
npm i audio-gain event-clock fs-extra lame ashishbajaj99/mic nodemailer nodeshout path string-to-ms
same error.
Could it be a problem with my NodeJS version? ( I'm using v12.16.2 )
Could well be. As you can see from the bottom of README.md, I had to downgrade Node.js to get this to work on one of my PCs. I recall having installed on another PC without doing this, but haven't yet had time to look into this again and see why it works on one and not the other. You could try downgrading Node.js as well, although that might be a problem if you have other Node projects on your PC.
Just downgraded my NodeJS to 8.10.0 and all modules installed as they should when running the project im getting:
[ STR ] Stream started [ REC ] Initialised [ REC ] Start: recording "2020-04-26_14-25" on reel 1 events.js:183 throw er; // Unhandled 'error' event ^
Error: spawn arecord ENOENT at _errnoException (util.js:1022:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19) at onErrorNT (internal/child_process.js:372:16) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) at Function.Module.runMain (module.js:695:11) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3
Looks like arecord
isn't happy, and ENOENT suggests it can't find a file/directory. Check your config file and make sure the recordings folder exists.
just created a "recordings" folder and still getting the same error
Ok i was able to get it running. (well the project not crashing) but when playing audio its not recording (the recording file is there. 0bytes after a few mins of audio playing) and its not broadcasting to my icecast server.
Any ideas? (No errors when running now)
Little update again: I got the streaming to icecast working by changing channels in config to 1. it says its recording but its not. any ideas?
Hmm I'm not sure, could you post your config?
Sure. also after about 15 - 20mins of streaming to icecast it will stop. no errors or no crashes
`{ "common": { "format": { "sampleRate": "44100", "channels" : "1" } },
"input": {
"device" : "hw:1,0",
"silentFrames" : 325,
"format": {
"bitDepth" : "16"
}
},
"stream": {
"metadata": {
"name" : "Removed",
"description" : "Removed",
"genre" : "pop music",
"url" : "Removed"
},
"server": {
"host" : "Removed",
"port" : 8000,
"user" : "source",
"password" : "Removed",
"mount" : "stream"
},
"format": {
"bitrate" : "128"
}
},
"recorder": {
"minsPast": [0, 30],
"output": {
"directory" : "/recordings",
"bleed" : 2,
"keepFor" : "30d"
},
"format": {
"lossless" : false,
"bitrate" : "320"
}
},
"mail": {
"host": "smtp.example.com",
"port": 465,
"name": "Stream",
"addr": "noreply@example.com",
"auth": {
"user": "noreply@example.com",
"pass": "hackme"
},
"recipients": [
"recipient1@example.com",
"recipient2@example.com"
]
}
} `
After some more extensive testing over long periods, I am now getting the issue you describe (#2), but after 10+ hours in my case.
@danielpmc if you still have this set up, would you be able to try running mic
in debug mode? There's a similar issue reported there, and I wonder if this is also an issue with arecord
.
To run in debug mode you set debug: true
at index.js(13).
I'm going to give this a go and see if I get anything.
Hey sorry. i still have this setup, i will try it tonight and see what i get.
binding.target.mk:111: recipe for target 'Release/obj.target/binding/src/binding.o' failed make: *** [Release/obj.target/binding/src/binding.o] Error 1 make: Leaving directory '/root/radio-streamer/node_modules/ref/build' gyp ERR! build error gyp ERR! stack Error:
make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:310:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Linux 3.16.0-6-amd64 gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/radio-streamer/node_modules/ref gyp ERR! node -v v12.16.2 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN notsup Unsupported engine for event-clock@1.2.2: wanted: {"node":"0.10.x"} (current: {"node":"12.16.2","npm":"6.14.4"}) npm WARN notsup Not compatible with your version of node/npm: event-clock@1.2.2npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ref@1.3.5 install:
node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ref@1.3.5 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-04-26T09_15_39_206Z-debug.log