Comments (4)
Any chance of any pointers for where to look or where to ask for hints?
from opus.
OK so further digging:
I downloaded node-opus which is documented to work with node-ogg
I have noticed the result of Encoder.encode
is not the same between node-opus and @discordjs/opus. It seems node-opus spits out what I believe to be an ogg_packet, and discordjs/opus gives a buffer.
ie.:
opus stream -> discord/opus.decode -> node-opus.encode -> log:
{ packet: <Buffer 4f>,
bytes: 19,
b_o_s: 1,
e_o_s: 0,
granulepos: -1,
packetno: 0,
'ref.buffer':
<Buffer 18 33 11 04 01 00 00 00 13 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00> }
compared to
opus stream -> discord/opus.decode -> discord/opus.encode -> log:
<Buffer 78 80 64 26 7e d0 2f e8 f5 a5 6d 1c da 41 04 0b 33 d9 ee 3a 0b ee 53 a6 f6 bb cf 55 c8 e3 36 e1 18 4a 9f e9 7f 94 8d a3 0c 96 b3 a1 f7 03 e7 9a 78 db ... >
So that will be my problem. I need to create ogg packets from these buffers is my guess...
I'm curious though why these two opus encoding libraries are so different though unless I've royally messed something up
from opus.
The answer on how to do this is in here and only builds in node 10 I think so I suppose this can be closed
https://github.com/Rantanen/node-opus/blob/master/lib/Encoder.js#L66
Unless there is an easier way you know of to achieve this?
from opus.
Because we cannot depend on node-ogg and we should not either. This library is stripped of all dependencies that come with node-opus usally.
Reason being is that TooTallNate/node-ogg#23
And it doesn't look like it's really maintained, nor do I have the interest in maintaining another native library myself to keep it up to date for node LTS changes.
from opus.
Related Issues (20)
- Can't install on CentOs HOT 1
- Can't install opus on my M1 Mac
- Support for Raspberry pi 4
- Not installing in mac m1 (macOs 11.2)
- [SECURITY] DoS in @discordjs/opus due to invalid encoders/buffers (CVE-2022-25345) HOT 1
- Can not install @discordjs/opus in build/local environment HOT 6
- Where 0.5.0 version? My project broken because it not exist anymore HOT 1
- Add JSDoc to decode method HOT 1
- question: NPM wont install ubuntu
- Json decoder error HOT 2
- I can't download opus on djs 14 HOT 1
- Unable to NPM Install HOT 1
- dyld[53422]: missing symbol called on `decode`. HOT 5
- unable to npm install macOS HOT 8
- Add Glibc 2.36 in the precompiled binaries
- @discordjs/opus does not support nodejs versions > v18.18.2 HOT 13
- Cannot decode opus that came from openAI (Data corrupted) HOT 1
- NPM Install Failure 404 HOT 2
- [Bun] Cannot find module "@discordjs/opus/prebuild/node-v115-napi-v3-linux-x64-glibc-2.29/opus.node"
- Support for Node 20 HOT 2
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 opus.