media icon indicating copy to clipboard operation
media copied to clipboard

Video Freeze and buffering, DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.

Open amit12kumardish opened this issue 7 months ago • 7 comments

04-02 03:40:27.441  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.449  5920  5920 D EventLogger: rendererReady [eventTime=14235.07, mediaPos=300.64, window=0, period=0, rendererIndex=1, audio, true]
04-02 03:40:27.451  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.454  5920  5920 D EventLogger: state [eventTime=14235.07, mediaPos=300.64, window=0, period=0, READY]
04-02 03:40:27.454  5920  5920 D AnalyticsListener: PlaybackStateChanged: 3
04-02 03:40:27.455  5920  5920 D EventLogger: isPlaying [eventTime=14235.07, mediaPos=300.64, window=0, period=0, true]
04-02 03:40:27.455  5920  5920 D AnalyticsListener: IsPlayingChanged: true
04-02 03:40:27.462  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.472  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.481  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.491  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.501  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.512  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.523  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.532  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.543  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.554  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.564  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.573  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.584  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.593  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.604  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.614  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.624  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.633  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.643  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.654  5920  6533 W DefaultLoadControl: Target buffer size reached with less than 500ms of buffered media data.
04-02 03:40:27.657  5920  5920 D EventLogger: rendererReady [eventTime=14235.28, mediaPos=300.64, window=0, period=0, rendererIndex=1, audio, false]
04-02 03:40:27.659  5920  5920 D EventLogger: state [eventTime=14235.28, mediaPos=300.64, window=0, period=0, BUFFERING]
04-02 03:40:27.659  5920  5920 D AnalyticsListener: PlaybackStateChanged: 2
04-02 03:40:27.660  5920  5920 D EventLogger: isPlaying [eventTime=14235.28, mediaPos=300.64, window=0, period=0, false]

any idea, why this is happening, continuously i am getting above logs repeateadly..

even i'm using in built LoadControl itself.

ISSUE: start a playback, after few hours , sometime with in an hour, video is freezing and buffering is observed( very fast).

amit12kumardish avatar Apr 02 '25 10:04 amit12kumardish

i am playing live stream.

amit12kumardish avatar Apr 02 '25 10:04 amit12kumardish

Hi @amit12kumardish,

Could you lease provide media we can use to reproduce the issue? Thanks!

tianyif avatar Apr 02 '25 11:04 tianyif

I don't think there's issue with media, since on replaying same live channel, issue is not there.

I'm playing live content so wasn't able to capture the content when issue happened.

Also, I have one question, in my stream eac3 audio comes randomly, sometime comes sometime doesn't

Is there a way I can tell player to not consider eac3 tracks itself.

On Wed, 2 Apr, 2025, 4:36 pm Tianyi Feng, @.***> wrote:

Hi @amit12kumardish https://github.com/amit12kumardish,

Could you lease provide media we can use to reproduce the issue? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/androidx/media/issues/2298#issuecomment-2772214597, or unsubscribe

  • This message originated outside of DISH and was sent by: @.*** @.***> *

https://github.com/notifications/unsubscribe-auth/BERVOZSEIC2J5T4X4RXQJO32XPABVAVCNFSM6AAAAAB2JD5RGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONZSGIYTINJZG4 . You are receiving this because you were mentioned.Message ID: @.***> [image: tianyif]tianyif left a comment (androidx/media#2298) https://github.com/androidx/media/issues/2298#issuecomment-2772214597

Hi @amit12kumardish https://github.com/amit12kumardish,

Could you lease provide media we can use to reproduce the issue? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/androidx/media/issues/2298#issuecomment-2772214597, or unsubscribe https://github.com/notifications/unsubscribe-auth/BERVOZSEIC2J5T4X4RXQJO32XPABVAVCNFSM6AAAAAB2JD5RGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONZSGIYTINJZG4 . You are receiving this because you were mentioned.Message ID: @.***>

amit12kumardish avatar Apr 02 '25 11:04 amit12kumardish

@amit12kumardish,

Also, I have one question, in my stream eac3 audio comes randomly, sometime comes sometime doesn't

I think it would be helpful if you send us the media with this issue, as well as the bug report.

tianyif avatar Apr 02 '25 12:04 tianyif

I think usually this happens when the load control decides to not further load media while the buffer size is below 500ms. This can for instance happen if the load control doesn't have additional memory to allocate for some reasons.

I think this can be fixed by configuring the load control to fit to the media played, or by setting DefaultLoadControl.Builder.setPrioritizeTimeOverSizeThresholds(true).

It's worth a try.

marcbaechinger avatar Apr 07 '25 10:04 marcbaechinger

ok @marcbaechinger will give it a try

amit12kumardish avatar Apr 07 '25 10:04 amit12kumardish

Thi problem occurs with files that have an incomplete/invalid second audio track. The file plays with vlc successfully but with exoplayer has the error "Target buffer size reached with less than 500ms of buffered media data.". Sometimes it crashes after that with an exception "Loading finished before preparation is complete". or "Playback stuck buffering and not loading".

Here is a sample file

https://drive.google.com/file/d/17yHQsjVfVkKER6JmwF9d-Uwcnxd4bBcr/view?usp=sharing

I have a work-around that disables the bad track and restarts playback after getting an exception. Let me know if you want the details.

bennettpeter avatar Jun 20 '25 14:06 bennettpeter