audiocogs / opus.js Goto Github PK
View Code? Open in Web Editor NEWAn Opus audio decoder for aurora.js ported using emscripten
An Opus audio decoder for aurora.js ported using emscripten
Hello! My android app uses OPUS to record and play audio. OPUS is not supported on most mobile browsers such as Safari and Chrome so I gave a shot with this awesome library.
I used the prebuilt opus.js and succeeded to play opus files. However, some of my files cannot be played and I have no idea why this happens on some files. I've confirmed that these files are correct opus files using opusinfo and these files can be played on VLC player as well. I've attached links that you can download.
Not playable with opus.js
New logical stream (#1, serial: 562e250d): type opus
Encoded with libopus unknown-fixed
WARNING: EOS not set on stream 1 (normal for live streams)
Opus stream 1:
Pre-skip: 312
Playback gain: 0 dB
Channels: 1
Original sample rate: 16000Hz
Packet duration: 60.0ms (max), 60.0ms (avg), 60.0ms (min)
Page duration: 60.0ms (max), 60.0ms (avg), 60.0ms (min)
Total data length: 13896 bytes (overhead: 24.8%)
Playback length: 0m:05.573s
Average bitrate: 19.95 kb/s, w/o overhead: 15 kb/s
New logical stream (#1, serial: 7ea06812): type opus
Encoded with libopus unknown-fixed
WARNING: EOS not set on stream 1 (normal for live streams)
Opus stream 1:
Pre-skip: 312
Playback gain: 0 dB
Channels: 1
Original sample rate: 16000Hz
Packet duration: 60.0ms (max), 60.0ms (avg), 60.0ms (min)
Page duration: 60.0ms (max), 60.0ms (avg), 60.0ms (min)
Total data length: 33886 bytes (overhead: 22.7%)
Playback length: 0m:14.693s
Average bitrate: 18.45 kb/s, w/o overhead: 14.26 kb/s
Whether to support opus audio frames coming from websocket, accepting frame by frame
opus.js suggests you can both encode and decode signal.
Please add encoding support. Maybe create opus-decode.js for only decoding?
i've installed av and opus.js:
"av": "^0.4.9",
"opus.js": "^0.1.1",
however when i try to play it in browser i get the following error:
GET http://192.168.0.105:9966/cordova.js
vue.runtime.common.js:6183 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
restapi.js:6 o serviço está em http://127.0.0.1:3000
libopus.js:1 Uncaught TypeError: Cannot read property 'match' of undefined
at Object.staticInit (libopus.js:1)
at Object. (libopus.js:1)
at Object.162._process (libopus.js:28)
at s (_prelude.js:1)
at _prelude.js:1
at Object.164.../build/libopus (decoder.js:2)
at s (_prelude.js:1)
at _prelude.js:1
at Object.163../src/decoder (index.js:1)
at s (_prelude.js:1)
staticInit @ libopus.js:1
(anonymous) @ libopus.js:1
162._process @ libopus.js:28
s @ _prelude.js:1
(anonymous) @ _prelude.js:1
164.../build/libopus @ decoder.js:2
s @ _prelude.js:1
(anonymous) @ _prelude.js:1
163../src/decoder @ index.js:1
s @ _prelude.js:1
(anonymous) @ _prelude.js:1
221.av @ opusplayer.js:3
s @ _prelude.js:1
(anonymous) @ _prelude.js:1
(anonymous) @ detalhemidia.vue?24694260:21
229.../../components/opusplayer @ detalhemidia.vue?24694260:47
s @ _prelude.js:1
(anonymous) @ _prelude.js:1
216.../features/config/doar.vue @ appcore.js:39
s @ _prelude.js:1
(anonymous) @ _prelude.js:1
234../components/appcore @ main.js:4
s @ _prelude.js:1
e @ _prelude.js:1
(anonymous) @ _prelude.js:1
backend.js:1 [vue-devtools] Ready. Detected Vue v2.1.10
any help/guidance is welcome.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.