-
Notifications
You must be signed in to change notification settings - Fork 146
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
Unable to play audio when not playing from beginning of a file. #48
Comments
In the case of MP3 it might work. Normally we need the beginning of the file since container formats usually provide format info at the beginning. MP3 is weird in that it doesn't really have a container format, so the demuxer just looks for the first valid MP3 frame. Maybe your chunk sizes aren't big enough? If it doesn't find anything in the first chunk it receives, it won't look further. Another option, is since you know it is MP3 just skip the demuxer all together and go straight to the decoder. This would require slightly more work on your part, but you could basically subclass the MP3Demuxer ( Try increasing your chunk size from (I assume) your custom source first, then try the custom demuxer idea... |
I changed the MP3.js file while testing to just return true in the probe function (for now, instead of extending the class). |
Yeah sounds like a chunk size issue maybe. Is it possible for you to increase it? What does your source look like? |
Audio is coming from FFmpeg sending the audio through HTTP to a server that's relaying that audio over WebSocket to aurora. Have to experiment with FFmpeg options I think. |
I'm working on this same issue:- using ffmpeg, data arrives into mp3.js, but not much else:- Tried with and without -re and changed chunk_size to various sizes, nada. Any advise welcomed. |
Server is very simple setup:
|
@asherawelan what does your client side code look like? I assume you implemented some sort of web socket source. I've actually never tried this with aurora, so I'm interested in getting this working. |
Here it is :)
|
It seems no matter how many bytes are coming through it keeps failing the |
I looked at that code you linked to in mp3.js above where you are seeing the error, and have a possible explanation. That code is looking for the next frame after the current one, which is apparently not loaded yet. Or perhaps because the next frame hasn't been encoded yet since it is streaming, looking for the next frame there is wrong. I'll play around a bit and see if I can figure something out. |
You legend! I'm happy to tip you for your time...cheers! Sent from my iPhone
|
Any further news on this? Happy to tip the person who can fix it... cheers! |
I would love to know if there is any progress! Streaming live feeds seems like THE reason to use these javascript codecs rather than simply using the browser html5 audio tags. Its the perfect used case except that it isn't working. |
I never got it working for live streaming, such a shame... |
Bump |
Any further progress on this @devongovett - really keen to get this working... Cheers |
i'm also interested. is at any solutions? |
I think this is related to what's discussed here audiocogs/mp3.js#12 |
Anyone found a solution to this? Thanks |
I was wondering the same thing. Anyone found a working solution? I'am able to receive audio packets at browser level, but I don't have any sound. |
See this thread |
I wasn't sure whether to put this issue here or in the MP3.js repo because I was running into this problem while attempting to use it for my demuxer/decoder and not sure if the issue was specific to just the MP3 demuxer.
It seems in order to successfully find the correct demuxer (MP3 in this case) through probing the first chunk of audio data that aurora receives, it must receive the beginning chunk of the actual file being streamed? I'm not entirely sure here because I'm not yet very familiar with the MP3 codec but that's what the code looked like it was doing to me.
I came across this when connecting to a server that started streaming audio data from a continuous source (not a discrete track that had a beginning) and noticing the data was received but a demuxer not found and so there was no playback. I had assumed this would be supported since one of the purposes of the library was to play podcast or radio style streams.
If you could help clarify that would be great.
The text was updated successfully, but these errors were encountered: