RiversideRadio / radio-streamer

Streams and records an audio input
3 stars 0 forks source link

Build and runtime errors #1

Open danielpmc opened 4 years ago

danielpmc commented 4 years ago

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.2

npm 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

EwanRoycroft commented 4 years ago

Try deleting package-lock.json before you install.

rm package-lock.json
npm i

Do you get the same output?

danielpmc commented 4 years ago

yes same output

EwanRoycroft commented 4 years ago

And what if you install everything manually?

npm i audio-gain event-clock fs-extra lame ashishbajaj99/mic nodemailer nodeshout path string-to-ms
danielpmc commented 4 years ago

same error.

Could it be a problem with my NodeJS version? ( I'm using v12.16.2 )

EwanRoycroft commented 4 years ago

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.

danielpmc commented 4 years ago

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

EwanRoycroft commented 4 years ago

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.

danielpmc commented 4 years ago

just created a "recordings" folder and still getting the same error

danielpmc commented 4 years ago

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)

danielpmc commented 4 years ago

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?

EwanRoycroft commented 4 years ago

Hmm I'm not sure, could you post your config?

danielpmc commented 4 years ago

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"
    ]
}

} `

EwanRoycroft commented 4 years ago

Nothing there suggests that there should be a problem. I have not had problems with Icecast dropping out or with the recordings. Perhaps you can try troubleshooting the various packages and see if your system has a problem with any of them. Specifically mic, lame and nodeshout.

EwanRoycroft commented 4 years ago

After some more extensive testing over long periods, I am now getting the issue you describe (#2), but after 10+ hours in my case.

EwanRoycroft commented 4 years ago

@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.

danielpmc commented 4 years ago

Hey sorry. i still have this setup, i will try it tonight and see what i get.