ArtskydJ / node-sox-stream

:mega: A stream-friendly wrapper around SoX
53 stars 14 forks source link

Error: sox WARN mp3-util #14

Open ithustle opened 5 years ago

ithustle commented 5 years ago

Hey!

Now I'm having this error on my ubuntu server


Error: sox WARN mp3-util:
at Socket.<anonymous> (/opt/bitnami/apache2/htdocs/node_modules/sox-stream/index.js:33:23)                                                           at Socket.emit (events.js:182:13)
main.js:442:20)
at addChunk (_stream_readable.js:277:12)
at readableAddChunk (_stream_readable.js:262:11)
at Socket.Readable.push (_stream_readable.js:217:10)
at Pipe.onread (net.js:638:20)                                     x
Error: ENOENT: no such file or directory, unlink '/tmp/490cd0d9-1eea-4bfe-a6de-6647b36c9ea2'
Error: ENOENT: no such file or directory, unlink '/tmp/490cd0d9-1eea-4bfe-a6de-6647b36c9ea2'
ithustle commented 5 years ago

I think if the audio has a 256k bitrate the error is throwed. Because all audio that has 256k bitrate doesn't play. Any ideas?

ArtskydJ commented 5 years ago

I recommend running a similar command via the command line. That way the full sox warning message should be shown.

If you're not sure what command is getting run, you could modify sox-stream/index.js line 26 a little bit...

                return flattened.concat(ele)
            }, [])
+       console.log(args.join(' '))
        var sox = cp.spawn(opts.soxPath || 'sox', args)
        sox.stdout.pipe(soxOutput)
ithustle commented 5 years ago

@ArtskydJ, I had the same warning message via command line.

ithustle commented 5 years ago

Is this lib supports fade?

ArtskydJ commented 5 years ago

Is this lib supports fade?

I'm not sure what you're asking. This library supports effects, using options.effects. However, the library is just a thin wrapper around child_process.spawn('sox').