-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Chrome mobile doesn't play the recorded file #28
Comments
The page you linked says android 5+ supports opus in an mkv container. The library is On Wed, 22 Jul 2015 at 11:15 Diego Mesa notifications@github.com wrote:
|
To make playback work, you could decode the file using oggopusDecoder.js and playback the raw PCM. |
@chris-rudmin I've been trying to make this work using oggopusDecoder.js as you suggested, but with no success. Could you provide a small example how this could be achieved in combination with an |
@alexthewilde To playback in an
I'll try to post some code samples later on when I get some time. |
@chris-rudmin I've been researching this issue a bit more and found hpr.dogphilosophy.net/test/. This test shows that Please have a look at this demo: http://jsfiddle.net/pm84nsdh/3/ Can you spot any difference in these two ogg files which causes the one to play but not the other? |
Yes, the difference is one file is Vorbis encoded the other is Opus encoded. Ogg is just the container. https://wiki.xiph.org/OggOpus |
@chris-rudmin thanks for clarifying! |
@alexthewilde Don't despair though, decoding the ogg is not hard. I'll try and post an example tonight. |
Made an example page to decode the file to wav audio. Hope this helps https://github.com/chris-rudmin/DecodeToWav |
@chris-rudmin that's super helpful, cheers! I guess I can make it work from there. |
@alexthewilde if you are reading the file from the server I think you can do it like this to get an arraybuffer:
|
How may time can you record in android chrome? I record about 10s and the browser crash down! |
@diegomesata Never tried in mobile. I would assume you are limited by device resources (memory). If you are saving the file to the server in the end, you could try and stream the data as it is encoded instead of storing locally. To do this, you should override |
@diegomesata If you could leave me a stack trace, or whatever error you get, it might be helpful. Perhaps it is something we can fix. |
@chris-rudmin today browser doesn't crash down, sorry for the false alarm. At server side what library could I use to decode the ogg to wav? Edit: My server side is c#. Could it be https://github.com/ioctlLR/NVorbis? |
@diegomesata Personally, I like sox. I think you can run command line stuff in c#. If so you also have the choice of opus-tools. |
Thank you for all your help, opus-tools converts the file to wav without problem, but with sox I got: sox.exe FAIL formats: no handler for detected file type `opus' |
Hello, I'm testing the example on Chrome mobile Android 5.0, it records ok, but I can't play the recorded file.
According to this doc http://developer.android.com/guide/appendix/media-formats.html .ogg files can be played on android.
Do you have any idea?
Thank you
The text was updated successfully, but these errors were encountered: