Live Streaming Decoding
Hi, does this have the option for live steram decoding?. I am in need of one. and this is the closest. but not sure if it works. Please let me know, and if you have sample code. thanks
If the stream is an Ogg Opus byte stream it should work. I think the internal opusfile lib requires the Ogg header page to be appended first. I haven't tried out-of-sequence Ogg Opus files. Have you seen the Opus example at fetch-stream-audio?
Hi, thanks, i haven't seen it before..i was reading through the code is a bit confusing.. but to make sure.. it'll work on client side decoding correct?. I'm looking because I have an online radio.i'm using ogg. because is light. and is what i want. but of course. ios does not support it.. and I only have one stream.. i will give it a try tomorrow morning.but if you have any code samples. or hints. let me know. thanks Santiago
On Sat, May 23, 2020 at 2:37 PM AnthumChris [email protected] wrote:
If the stream is an Ogg Opus file it should work. I think the internal opusfile lib requires the Ogg header page to be appended first. I haven't tried out-of-sequence Ogg Opus files. Have you seen the Opus example at fetch-stream-audio https://fetch-stream-audio.anthum.com/?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AnthumChris/opus-stream-decoder/issues/12#issuecomment-633143732, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPLTKU2NFMWPZZN3273TBLRTA6Z5ANCNFSM4NIRVAUQ .
Yes, it does client-side decoding. Happy to help, feel free to email me directly and I can make some time.
Its too slow for streaming, I had to save the decoded frames into a list and play the audio with a delay.
@adminy Have you seen the fetch-stream-audio example? You may consider posting a question on StackOverflow if you're encountering difficulties with your code so the community can possibly assist you.
No thanks @AnthumChris, I am sticking with libopus of course, but I don't need programming help.
I found out something new from fetch-stream-audio, which is constructing audio buffers ahead of time.
The reason I am saying it's slow is because I'm going to be using it in a voice call application, so for me the goal is to reduce latency as much as possible (dropping frames is normal), I think I'm almost there. I'll also be refactoring the code for mono channel sound.
As for the network infrastructure, it will be web sockets since it's a stream not a static file. So again, it is very important that I improve that latency.
Nice one! Sounds like a fun project.
@AnthumChris Have you experienced Opus streams stopping on Chrome or Chromium after 2.5 hours?
@guest271314 I have not, but it may be best to file a bug with that team. Let's try to keep this thread focused on and specific to the original author's question without potentially digressing from it.
@AnthumChris The Chromium bug was already filed https://bugs.chromium.org/p/chromium/issues/detail?id=1161429. I did not locate your email address and this is the closest open bug in your repository to the issue described.
Yes, live streaming is possible. I have achieved that requirement several ways, with both WAV input and converting WAV to Opus with opusenc and using MediaSource https://github.com/guest271314/captureSystemAudio#stream-file-being-written-at-local-filesystem-to-mediasource-capture-as-mediastream-record-with-mediarecorder-in-real-time and WebTransport for both speech synthesis (essentially the voice use case) and streaming arbitrary live audio to the browser, e.g., https://github.com/guest271314/webtransport/blob/main/webTransportAudioWorkletWebAssemblyMemoryGrow.js. Cheers.