Comments (9)
@seabrus I started this project initially because I wanted a web audio that was free in the monetary sense. I'm not sure you are aware, but using mp3 encoders and decoders requires a usage license (which is not cheap BTW).
If you take a look at the decoder example, you can see how to convert ogg/opus to a riff/wav format on the client which can be used in a normal audio tag. I never tried the decoder in a mobile browser so i can't say how fast it will be.
Let me know what route you take and how it works out!
from opus-recorder.
@chris-rudmin thanks for the prompt response. Yes, I know about the mp3
license problem. But it looks like the situation has been changing and even in the USA mp3
will be free soon. I'm from the EU and most of my potential users are from the Europe too.
That said, I'll take a look at the example you mentioned.
One more idea is to convert to OGG Vorbis
. No support from Safari, but Google's browsers support it.
from opus-recorder.
AAC in a mp4
container (*.m4a) - it looks like this is the answer.
Sizes:
- test.oga -- 313 kB (opus)
- test.mp3 -- 387 kB
- test.m4a -- 431 kB
- test.wav -- 4600 kB (4.6 MB)
from opus-recorder.
Cool. A note about the file size, if you do client side decoding of opus, the data transferred will be that of the test.oga file but will consume 4.6MB of memory on the device.
from opus-recorder.
Hi,
1). WAV.
My app typically works with records of about 10 - 25 MB in size (OGG format) - it is about 0.5 - 1 hour of recording. These are mono records (mainly speech). Your package copes with that recording absolutely great because it is the smallest size I could achieve.
But if I convert these files into WAV (even on the client only) it will be 12 times larger, i.e., about 120 - 250 MB. Taking into accout that a typical page in my app contains several records it may be quite problematic to use this approach on the mobile devices (that said, tests should be done to check that exactly).
2). That is why I try to find another way to solve the problem. The M4A/AAC format looks as a very promising solution. It is license free. It is quite compact. So my question is: Is it possible to develop a version of your package which will convert files to this fotmat (not to the OGG Opus) on the client? I mean that everything is the same like it is now but the package produces a M4A file/blob as a result?
Such a version will be much more universal from the point of view of browsers coverage.
Have a nice day
from opus-recorder.
@seabrus Distributing AAC files doesn't require a license but writing a decoder/encoder would require a license: https://en.wikipedia.org/wiki/Advanced_Audio_Coding#Licensing_and_patents. You might be able to compile an open source codec to javascript. Good luck!
from opus-recorder.
@chris-rudmin I see "There is no happiness in life" :)
from opus-recorder.
@seabrus You might be able to create a ring buffer (Web Audio Node) that loops for playback and decode just the necessary chunks into raw PCM as required. This way you don't decode all at once and don't explode the page memory as well.
from opus-recorder.
If you setup your backend appropriately you could even serve the ogg file one page at a time allowing for very fast playback on the client.
from opus-recorder.
Related Issues (20)
- How to use with Vite? HOT 6
- The first recording is not saved in Safari on IOS 15.1 HOT 1
- Robotic, torn audio on IOS 15.1 HOT 3
- Issue while using decoder with React application HOT 11
- Recorder output file size too small - Vue.js HOT 4
- building and running on windows 10 HOT 4
- Error running waveRecorder.html example HOT 3
- using waveform-playlist with opus-recorder HOT 1
- Uncaught TypeError: Cannot read properties of undefined (reading 'length')
- Not working with Vite + Vue 3
- wasm streaming compile failed: TypeError: Could not download wasm module falling back to ArrayBuffer instantiation how can i resolve this issue ? HOT 3
- Convert 16 bit signed int to 32 bit float HOT 8
- Audio distorted after 30 seconds HOT 6
- few seconds of recording are missing at the beginning (especially on IOS) HOT 1
- Play pages real-time HOT 2
- ondataavailable not fired with waveWorker
- TypeScript definitions HOT 1
- Opus Player
- Is it possible to Decode two audio sources HOT 4
- Error webassembly.compile 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 opus-recorder.