Comments (7)
Thanks for reporting the bug. Yep, that error is currently happening. It's kind weird the output flac :) I think the problem is not related on how the conversion is done, but on how extra bytes are handled. But I will investigate right now to fix the issue.
from node-flac-bindings.
After doing some tests I figured out that the problem was exactly what I though (see 7d6fc19). I make some tests with 24bit raw audio and the output was correct.
I hope this fixes the problem. Try it. I created the version 1.2.3
so updating the library version should be fine to test.
from node-flac-bindings.
OK so that's a partial fix. The original test with S24_LE still fails but it encodes fine if I use S24_3LE, which I suppose is "proper" 24bit, i.e. 3x8bit.
S24_LE as I understand it is actually 32bit but with the first byte zeroed.
from node-flac-bindings.
Well, as I see if S24_LE
is 24 bit audio in 32 bit integers, that's something you must take care of, because the encoder expects 24 bit audio input if it is said to take as input 24 bit audio.
I could implement a version to take care of this situation (S24_LE
). But in my opinion, the issue is fixed because 24 bit audio is encoded correctly.
from node-flac-bindings.
In 016a49f I implemented the version when you have 24 bit input stored in 32 bit integers, but must be explicitly set to the encoder. Use the option inputAs32
set to true
to tell that the input is 24 bit audio but stored in 32 bit ints (no conversion done internally with this option because flac expects all inputs to be 32 bit integers).
from node-flac-bindings.
OK that works, but there's a typo on line 34 of encoder.js. I changed self._inputAs32 = Boolean(option.inputAs32) || false;
to read options.inputAs32
to make it work.
IMO that option should probably be default for 24bit as S24_LE is the norm and S24_3LE the exception. I've tried running ffprobe
on my 24/96 and 24/192 FLAC files and they all report something like this:
Duration: 00:03:39.88, start: 0.000000, bitrate: 3340 kb/s Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit)
Either way I'm happy. Thanks a lot for your quick response.
from node-flac-bindings.
Yep, that's a typo, I couldn't test anything, I'm kind busy right now :). Fixing that.
Also I like you're idea of making this option as true by default when the input is 24 bit, so I will make the change. I didn't play a lot with 24 bit audio, and I see you know more about that in this topic. I will add this thing right now, because is quickly to change.
from node-flac-bindings.
Related Issues (20)
- Can't instantiate flac.FileDecoder HOT 9
- prebuild-install WARN install No prebuilt binaries found (target=12.18.0 runtime=node arch=x64 libc= platform=win32) HOT 8
- Any documentation on how to write metadata to a flac file? HOT 5
- FLAC StreamDecoder unable to decode file when FileDecoder does HOT 17
- "Encoder has not been initialized yet" Error raised while using StreamEncoder HOT 7
- Installation fails on Android HOT 4
- Crashes on node 14.x HOT 2
- how to create metadata HOT 4
- Illegal instruction (Core dumped) error on Synology DS718+ HOT 10
- Decoder initialization failed: Error_opening_file HOT 26
- When I packaged the Electron project, it didn't work HOT 8
- Windows build errors HOT 11
- A specific song cannot be converted on windows HOT 16
- upgrade to 3.0.0, ES module error HOT 15
- New release breaks my code HOT 8
- macbook pro m1, 13.2 (22D49) can't load libflac HOT 6
- Support for foreign metadata RIFF chunks HOT 3
- FLAC compressionLevel parameter is ignored HOT 5
- Miss check object on ptr HOT 1
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 node-flac-bindings.