Comments (2)
What happens if you remove the effects
parameter?
If you're familiar with the command line, you can try this:
Try running this command in your console:
sox --type mp3 inputfile.wav --type wav output1.wav trim 10
If that works, then run this in your console:
sox --type mp3 inputfile.wav --type wav - trim 10 > output2.wav
If one or the other fails, then it is probably an issue with your input file (or sox).
If both commands work fine, then sox-stream is probably at fault.
from sox-stream.
First, the trim effect works normally (as expected) on the command line as does the trim effect with redirected output. I also tested command line piping of input into SOX, which works as expected. If I remove the trim effect, used within sox-stream, I get the expected behavior. In that regard I've tested volume and tempo effects which both work fine. This issue appears specific to the trim effect.
In attempting to debug this myself over the past week, I looked at some of the node stream setup options {close: false} etc but it's unclear to me how to successfully pass those options for a child_process instantiation. It seems that the child_process 'exit' event fires immediately after the EPIPE error is encountered. I've not yet fully tested the possibility that it's a subprocess memory issue, ie node --max-old-space-size as it may be the case that the trim effect requires that the entire input is loaded into memory as part of the trim transformation, as distinct from other transformations.
UPDATE: I have now tested the process with an allocation of 8GB to the node process via --max-old-space-size=8192 with no impact. My understanding is this command line arg to Node should allocate 8GB to each node process and subprocess, so running out of (allocated) memory is seemingly not the cause of this issue.
from sox-stream.
Related Issues (20)
- VBR on MP3 files HOT 2
- Breaks with newer versions of node HOT 1
- spawn sox ENOENT HOT 9
- Error: sox WARN mp3-util HOT 5
- Problem with MP3 files in OSX HOT 3
- Why write to temp file? HOT 3
- Pipe to on data HOT 3
- Segmentation fault in sox results in a zero-byte stream.
- sox-stream does not work with file descriptor HOT 1
- replay-gain is required in typescript, but should not be HOT 1
- How create realtime reading stream ? HOT 1
- Streams & Pipe resulting in ENOENT HOT 5
- sox FAIL formats: no handler for detected file type `opus' HOT 1
- How to pass additional parameter (ex. the "-s" for "sox tempo -s 0.5") HOT 5
- Failure causes infinite loop HOT 4
- sox: invalid option -- - HOT 11
- How to connect additional output streams? HOT 2
- Get it works with bpm.js HOT 11
- Empty file HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sox-stream.