-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Problem with codec re-initialization during HLS MP3 playback #5063
Comments
@ojw28 can you have a look at this in the context of codec reuse? |
I think there's a problem with the order in which you're doing things. Your code looks like it's:
After step (2), playback will start as soon as it can from the default position, because that's what you asked for in step (1). Step (3) will then perform a seek. If the player prepares itself quickly enough then you may hear a short amount of audio between the player processing (2) and (3), followed by a cut when it processes (3), followed by more audio after (3). You'll probably find that moving Regarding codec release and re-initialization: This isn't the cause of the audible cut. It's just a symptom of the fact that a seek is occurring after preparation, which you can resolve as described above. This is because we currently re-initialize the audio codec on seek. We're optimizing this in a future release, and indeed if you use the latest |
@ojw28 It´s not that is a jump/lag in the begining of the stream. It happens at the end of every chunk, that is every 10 seconds. I just confirmed that it´s still a problem after changing our code. |
I see. It looks like we think the format of each segment is different, due to the presence of an In An alternative would be to modify the HLS module to not output formats if only the metadata is changing. This might be a better short term fix. @AquilesCanta - Thoughts? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The input.getLength() check is invalid because the length may be unknown (i.e. if the server doesn't include a Content-Length response header when serving chunks). Issue: #5063 (tangentially related only) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=222406347
Issue: #5063 PiperOrigin-RevId: 222975020
This should be fixed in the |
The input.getLength() check is invalid because the length may be unknown (i.e. if the server doesn't include a Content-Length response header when serving chunks). Issue: #5063 (tangentially related only) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=222406347
Issue: #5063 PiperOrigin-RevId: 222975020
Issue description
We use exoPlayer for audio playback, but we have a problem with where the audio codec gets released and just milliseconds later it initialized again. This creates a short but noticed "cut" in the audio. When looking in profiler we can tell that something is happening. i´ll attach a link to a screenshot of the profiler output.
This is what it looks like when we init the player ..
Reproduction steps
You can try with this link right here.
http://delivery-42-lb1.elib.se/library/v4/mp3:http/2f0d8302-ca3f-4f8c-9c89-1f18c4e1df06.mp3/playlist.m3u8?StreamSession=79cb6038-9a03-467c-9193-a6a466f547c2&validate=3ca0f7b4436f43b5c99006788f0629cf
For us it´s enough just to play the stream, this happens on both our app, and the a different app that the company providing the links wrote, also based on exoPlayer.
Link to test content
http://delivery-42-lb1.elib.se/library/v4/mp3:http/2f0d8302-ca3f-4f8c-9c89-1f18c4e1df06.mp3/playlist.m3u8?StreamSession=79cb6038-9a03-467c-9193-a6a466f547c2&validate=3ca0f7b4436f43b5c99006788f0629cf
Version of ExoPlayer being used
2.7.0 (also tried to bump to 2.9.0 with no luck)
Device(s) and version(s) of Android being used
Samsung galaxy s8+ / s7 both running 8.0.0
Huawei Honor 8 android 7.0
Google Pixel 2XL runnig 9.0.0
A full bug report captured from the device
I have sent you a mail with the profile trace session we captured.
The text was updated successfully, but these errors were encountered: