-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with MP3 files in OSX #15
Comments
The issue is that if you pipe in a stream, soxi ./test.mp3 # works; sox looks at the file ext
soxi ./test # does not work
cat ./test.mp3 | soxi - # my guess is that this will not work
cat ./test | soxi # my guess is that this will not work either
cat ./test.mp3 | soxi - --type=mp3 # my guess is that this will work
cat ./test | soxi - --type=mp3 # my guess is that this will also work If my guesses are correct, then this is an issue with |
Hey, thanx, I totally overlooked the documentation and forgot I could give ext in input. Currently using like this, sox({
input: {
type: fileName.split(".").pop()
},
output: {
// Other things
}
}) So this library is working perfectly fine, only catch is if the user want to give I think we can close this issue. Also I would suggest that you should document it in README about the same(MP3 support with input.type doesn't work) Thanks. Have a great day. |
Install |
I tried to give input file as MP3, which gives a odd error as
After debuging and also checking through the issues noted at #14, I found out that sox will understand MIME type from extensions for MP3 file only.
when I try to do
I get a valid response, but when I do
(obviously I renamed the file to without an extension)
thats the same error I get, i.e.
sox FAIL formats: can't determine type of file
I have tested it with various mp3 files, even files from online sources as sample mp3 for sound testing. Tested many other formats as well, but the problem seems to come only for MP3, which leads
Now the problem after looking at the source code is, as all is done through streams, it is very hard to get extension unless the input is from
fs.createWriteStream
orfs.createReadStream
as noted in here(stackoverflow).For my use case, I have solved it by adding an extension to the the function call for createTempFile()
as static, but Please look into this, as it is a undocumented bug.
The text was updated successfully, but these errors were encountered: