audiocogs / ogg.js Goto Github PK
View Code? Open in Web Editor NEWAn Ogg demuxer for aurora.js ported using emscripten
An Ogg demuxer for aurora.js ported using emscripten
With this order I was able to make all codecs work, ogg file playback have issues with seekbar. It is not updated with the defualt mp3 demopage.
Hi,
after building ogg.js and adding it in a script tag I get :
ogg.js:2ReferenceError: Can't find variable: Module
What do I miss please?
I've been using Aurora and mp3.js for some time now with no issues. Attempting to add ogg vorbis for the poor souls on Safari and Edge. My page uses decodeToBuffer, but this does not seem to work for the ogg.js demuxer.
Here is my test page, using opus. The issue also exists with vorbis. Replacing the test file with an MP3 fires the callback and prints to the console as expected.
In my actual app, decoding is either garbled or triggers an abort
exception, but this is difficult to reproduce in a small test case.
I've been trying, and trying and trying. But I have not been able to write an encoder using libvorbis. I'm specifically interested in libvorbis, because it has the potential to be encoded onto WebM. There is already an image-array-to-WebM encoder, but there is a missing piece to the puzzle: a Vorbis encoder.
So, my issue is, I can't get the code to compile properly. Your code compiles, but the part of libvorbis required to encode audio doesn't seem to get linked, and hence, I get issues of missing function errors. I have pretty much given up, not because I can't encode, but because I have compiler/linker errors.
I was hoping that maybe you might be able to help me out a little.
awesome, i'm very glad to see this trend, people trying to port video stuff to javascript.
i've been trying to port avconv for ages without success, see:
https://gist.github.com/binarykitchen/5230096
https://gist.github.com/binarykitchen/5329825
have asked kripken (Alon) for help but i am still stuck with this one:
emscripten-core/emscripten#1042
i am unable to read local files for video encoding. maybe you can have a look there and give me clues? because i think you must have solved this somehow withing the compilation process for oggvorbis.js
thanks a lot. my aim is to develop an online web app where deaf people can communicate with each other in sign language.
cheers
michael
Do you have a compiled version? I can't get it to compile locally, and I created a VM setting up emscripten and I'm still getting tons of errors thrown...
ala:
libogg/include/ogg/config_types.h:19:9: error: expected identifier or '('
typedef @SIZE16@ ogg_int16_t;
^
libogg/include/ogg/config_types.h:20:9: error: expected identifier or '('
typedef @USIZE16@ ogg_uint16_t;
^
libogg/include/ogg/config_types.h:21:9: error: expected identifier or '('
typedef @SIZE32@ ogg_int32_t;
^
libogg/include/ogg/config_types.h:22:9: error: expected identifier or '('
typedef @USIZE32@ ogg_uint32_t;
^
libogg/include/ogg/config_types.h:23:9: error: expected identifier or '('
typedef @SIZE64@ ogg_int64_t;
... ad infinitum ...
I have no need to actually compile it myself, I just want a compiled vorbis.
Any help?
I'm trying to decode a lot of samples (one per keyboard key) on server-side with Node.js but after 50 samples successfully decoded, I get this error:
/node_modules/web-audio-api/node_modules/ogg.js/build/libogg.js:1
nctionPointers[i]){Runtime.functionPointers[i]=func;return 2*(1+i)}}throw"Fini
^
Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.
I'm on windows 7 64 bits and running node v0.10.17
Did you know any workaround or quick fix ? Thanks a lot
I'm having issues with aurora+ogg.js+vorbis.js in a Web Worker, so I'm attempting to build from source to see if a newer Browserify version makes everything mesh nicely.
This is a brand new Ubuntu Server 15.10 inside a VM, so it's safe to assume there are no conflicts from my existing environment.
The first issue was the arguments to sed
being incorrect inside compileOgg.sh
. I imagine an update changed the syntax. I had to change sed -i '' 's/-O20/-O2/g' configure
to sed -i 's/-O20/-O2/g' configure
. Note the missing empty string as the second argument.
There are several errors, so I've attached a log. I'm not sure if they're related or simply a cascade from the first error.
install.txt
Files less BUFFER_SIZE not playing. That code
while (this._stream.available(BUFFER_SIZE)) {
Ogg.HEAPU8.set(this._stream.readBuffer(BUFFER_SIZE).data, this.buf);
Ogg._AVOggRead(this.ogg, this.buf, BUFFER_SIZE, this.callback);
}
To get it work I've changed it to
do {
var toRead = BUFFER_SIZE<=this._stream.list.availableBytes?BUFFER_SIZE:this._stream.list.availableBytes;
Ogg.HEAPU8.set(this._stream.readBuffer(toRead).data, this.buf);
Ogg._AVOggRead(this.ogg, this.buf, toRead, this.callback);
} while (this._stream.available(BUFFER_SIZE))
I've done it by guess, and without clear understanding what i'm doing.
On ogg.js#11494
Ogg.HEAPU8.set(this._stream.readBuffer(BUFFER_SIZE).data, this.buf);
(I beautified this for easy debugging)
I set breakpoint on that line and watched the variables:
BUFFER_SIZE:8192
this.buf:1802398516
Ogg.HEAPU8: Uint8Array[16777216]
(This was right before the error happened)
Stack trace:
Uncaught RangeError: Source is too large ogg.js:11494
AV.Demuxer.extend.readChunk ogg.js:11494
(anonymous function) demuxer.coffee:18
EventEmitter.emit events.coffee:25
(anonymous function) http.coffee:51
Browser: Chromium 37
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.