torch2424 / live-stream-radio

24/7 live stream video radio station CLI / API 📹 📻
https://torch2424.github.io/live-stream-radio/
241 stars 64 forks source link

Allow Absolute Paths / Fix relative paths #84

Open torch2424 opened 6 years ago

torch2424 commented 6 years ago

Right now paths are all relative to where it was launched. This should be fixed.

Also, absolute paths don't work in the config.json, since they are just appended to the Current Working Directory

djeraseit commented 5 years ago

This has caused me issues with using the pre-built ffmpeg files. I can't seem to get config.json right. Do I need to copy the directory into the livestream project folder? How do I specify in config.json?

If ffmpeg path is not empty, this error is thrown. I presume because it can't find ffmpeg using the config.json ffmpeg path option.

(node:11010) UnhandledPromiseRejectionWarning: Error: spawn EACCES at _errnoException (util.js:992:11) at ChildProcess.spawn (internal/child_process.js:323:11) at exports.spawn (child_process.js:502:9) at /var/www/live-stream-radio/node_modules/fluent-ffmpeg/lib/processor.js:152:24 at FfmpegCommand.proto._getFfmpegPath (/var/www/live-stream-radio/node_modules/fluent-ffmpeg/lib/capabiliti) at FfmpegCommand.proto._spawnFfmpeg (/var/www/live-stream-radio/node_modules/fluent-ffmpeg/lib/processor.js) at FfmpegCommand.proto.availableFormats.proto.getAvailableFormats (/var/www/live-stream-radio/node_modules/) at /var/www/live-stream-radio/node_modules/fluent-ffmpeg/lib/capabilities.js:568:14 at nextTask (/var/www/live-stream-radio/node_modules/async/dist/async.js:5324:14) at Object.waterfall (/var/www/live-stream-radio/node_modules/async/dist/async.js:5334:5) (node:11010) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by thr) (node:11010) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise .

djeraseit commented 5 years ago

UPDATE: on ffmpeg_path key in config.json be sure to include the ffmpeg file command (i.e. './extracted-ffmpeg-folder-to-new-stream-directory/ffmpeg')

torch2424 commented 5 years ago

I think the ffmpeg path works best if it is absolute. Could you try that?