recloudstream / recloudstream/cloudstream

MediaCodecAudioRenderer error

Open
#1,721 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Kotlin
Stars
10.7k
Forks
1.1k
Avg merge
1d 23h
Merged PRs (30d)
15

Description

Note

Works with external player [VLC for android] by changing player. Its an internal player issue.

Steps to reproduce
  • Install the MovieBoxProvider Repo From here
  • Play a movie ACE(Tamil) and then from source select TamilDub - 1080p
  • You will get the error as MediaCodecAudioRenderer error, index=1, format=Format(2, null, video/mp4, audio/mp4a-latm, mp4a.40.2, 394587, ta, [-1, -1, -1.0, null], [0, 48000]), format_supported=YES

https://github.com/user-attachments/assets/15db7a7c-b84c-4dfc-a1ab-5db73ea1cf89

Expected behavior

Should play

Actual behavior

Got error and fallbacked to another source

Cloudstream version and commit hash

4.5.2 d9594158

Android version

Android 11

Logcat
06-28 14:47:34.322  4834  5006 I PreviewImgMp4: Loading with url = https://macdn.hakunaymatata.com/resource/3f7f7f456d0aa48bda15176a6e28dd72.mp4?Expires=1751792859&Signature=7tzIr505QTxS6Xr-UnJqSUeTZ4t6phVICjYi0TTnoK0S2zfAG4qvcwOC77MC0meTqpysujUyE9uENm9dbChbtTp5DI0VbCNX6GqNnFDdjMpj8~JUrCJDv1UCvBkBnnWB7xfQ3fP8m8QonpeDa5A9M~f2HLchhizNIFzif2MYV45XjCpg-UtPHdv-lFq0Da6D3OZsBXM88a-I9fnzZR9qxlOmrH7UHnZlKcLEd1orJasPMBYRQ1fw7t3WyFLicc~tMxbfF19iQL1tpNWPtrRcNJ9MBMDnwBgOmqTPe3nHwJeo-sQpTABHMa1MvszJ7CMd03wcwZ7yU7a2y6rB0pwAeA__&Key-Pair-Id=KMHN1LQ1HEUPL headers = {Referer=https://api.inmoviebox.com, Cookie=}
06-28 14:47:34.322  4834  5006 V MediaHTTPService: MediaHTTPService(android.media.MediaHTTPService@3607c46): Cookies: null
06-28 14:47:34.323  4834  5006 V MediaHTTPService: makeHTTPConnection: CookieHandler (java.net.CookieManager@add71d9) exists.
06-28 14:47:34.323  4834  5006 V MediaHTTPService: makeHTTPConnection(android.media.MediaHTTPService@3607c46): cookieHandler: java.net.CookieManager@add71d9 Cookies: null
06-28 14:47:34.323  4834  4834 I CS3ExoPlayer: loadExo
06-28 14:47:34.324  4834  4834 I ExoPlayerImpl: Init a166e07 [AndroidXMedia3/1.6.0] [redfin, Pixel 5, Google, 33]
06-28 14:47:34.326  4834  4834 I NextRenderersFactory: Loaded FfmpegVideoRenderer.
06-28 14:47:34.326  4834  4834 I NextRenderersFactory: Loaded FfmpegAudioRenderer.
06-28 14:47:34.328  4834  4834 I CS3ExoPlayer: Handle event: PlayerAttachedEvent(player=androidx.media3.exoplayer.ExoPlayerImpl@a166e07, source=Player)
06-28 14:47:34.328  4834  4834 I MediaSessionImpl: Init 3ad6d5d [AndroidXMedia3/1.6.0] [redfin, Pixel 5, Google, 33]
06-28 14:47:34.329  4834  4834 I MediaSessionCompat: Couldn't find a unique registered media button receiver in the given context.
06-28 14:47:34.338  4834  4834 I CS3ExoPlayer: Handle event: StatusEvent(wasPlaying=IsBuffering, isPlaying=IsBuffering, source=Player)
06-28 14:47:34.339  4834  4834 I CS3ExoPlayer: Handle event: PositionEvent(source=Player, fromMs=7295, toMs=7295, durationMs=-9223372036854775807)
06-28 14:47:34.340  4834  4834 I CS3ExoPlayer: setActiveSubtitles 0
06-28 14:47:34.340  4834  4834 I CS3ExoPlayer: autoSelectFromSettings = null
06-28 14:47:34.344  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 0 < 3
06-28 14:47:34.355  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 0 < 3
06-28 14:47:34.367  4834  4849 D TrafficStats: tagSocket(122) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:34.368  4834  5640 D TrafficStats: tagSocket(119) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:35.024  4834  4864 D EGL_emulation: app_time_stats: avg=16.04ms min=6.95ms max=173.88ms count=63
06-28 14:47:35.345  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 0 < 3
06-28 14:47:35.355  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 0 < 3
06-28 14:47:35.364  4834  5006 I PreviewImgMp4: Started loading preview
06-28 14:47:35.367  4834  5006 I PreviewImgMp4: Generating preview for 50.0%
06-28 14:47:35.499  4834  4849 D TrafficStats: tagSocket(120) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:35.837  4834  5006 I PreviewImgMp4: Generating preview for 25.0%
06-28 14:47:35.969  4834  4849 D TrafficStats: tagSocket(112) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:36.035  4834  4864 D EGL_emulation: app_time_stats: avg=13.46ms min=2.72ms max=27.92ms count=74
06-28 14:47:36.184  4834  5006 I PreviewImgMp4: Generating preview for 75.0%
06-28 14:47:36.320  4834  5289 D TrafficStats: tagSocket(112) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:36.345  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 1 < 3
06-28 14:47:36.355  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 1 < 3
06-28 14:47:36.653  4834  5006 I PreviewImgMp4: Generating preview for 12.5%
06-28 14:47:36.799  4834  5311 D TrafficStats: tagSocket(112) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:37.079  4834  4864 D EGL_emulation: app_time_stats: avg=13.91ms min=2.58ms max=60.18ms count=74
06-28 14:47:37.087  4834  5006 I PreviewImgMp4: Generating preview for 37.5%
06-28 14:47:37.210  4834  5311 D TrafficStats: tagSocket(112) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:37.345  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 2 < 3
06-28 14:47:37.356  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 2 < 3
06-28 14:47:37.496  4834  5006 I PreviewImgMp4: Generating preview for 62.5%
06-28 14:47:37.728  4834  5311 D TrafficStats: tagSocket(112) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:37.945  4834  4864 D st.cloudstream3: writeFully: 100.006584 mb in 64154 notifs. 0.001559 mb/notif
06-28 14:47:38.018  4834  5006 I PreviewImgMp4: Generating preview for 87.5%
06-28 14:47:38.083  4834  4864 D EGL_emulation: app_time_stats: avg=7.44ms min=1.34ms max=34.77ms count=74
06-28 14:47:38.138  4834  5311 D TrafficStats: tagSocket(112) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:38.290  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 2 < 3
06-28 14:47:38.295  4834  4834 I CS3ExoPlayer: Handle event: EmbeddedSubtitlesFetchedEvent(tracks=[], source=Player)
06-28 14:47:38.295  4834  4834 I CS3ExoPlayer: Handle event: TracksChangedEvent(source=Player)
06-28 14:47:38.296  4834  4834 I CS3ExoPlayer: Handle event: SubtitlesUpdatedEvent(source=Player)
06-28 14:47:38.298  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 2 < 3
06-28 14:47:38.346  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 2 < 3
06-28 14:47:38.356  4834  4894 I PreviewImgMp4: Requesting preview for 0.5 but 2 < 3
06-28 14:47:38.391  4834  5006 I PreviewImgMp4: Generating preview for 6.25%
06-28 14:47:38.407  4834  5640 D TrafficStats: tagSocket(103) with statsTag=0xffffffff, statsUid=-1
06-28 14:47:38.415  4834  5638 I DMCodecAdapterFactory: Creating an asynchronous MediaCodec adapter for track type video
06-28 14:47:38.418  4834  5678 I OMXClient: IOmx service obtained
06-28 14:47:38.419  4834  5677 I MediaCodec: MediaCodec will operate in async mode
06-28 14:47:38.420  4834  5677 D MediaCodec: flushMediametrics
06-28 14:47:38.420  4834  5677 D SurfaceUtils: connecting to surface 0x76c64afd42b0, reason connectToSurface
06-28 14:47:38.420  4834  5677 I MediaCodec: [OMX.android.latte.h264.decoder] setting surface generation to 4950033
06-28 14:47:38.420  4834  5677 D SurfaceUtils: disconnecting from surface 0x76c64afd42b0, reason connectToSurface(reconnect)
06-28 14:47:38.420  4834  5677 D SurfaceUtils: connecting to surface 0x76c64afd42b0, reason connectToSurface(reconnect)
06-28 14:47:38.421  4834  5678 E ACodec  : [OMX.android.latte.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
06-28 14:47:38.422  4834  5678 I ACodec  : codec does not support config priority (err -1010)
06-28 14:47:38.423  4834  5638 D MediaCodec: keep callback message for reclaim
06-28 14:47:38.426  4834  5678 D SurfaceUtils: disconnecting from surface 0x76c64afd42b0, reason setNativeWindowSizeFormatAndUsage
06-28 14:47:38.426  4834  5678 D SurfaceUtils: connecting to surface 0x76c64afd42b0, reason setNativeWindowSizeFormatAndUsage
06-28 14:47:38.426  4834  5678 D SurfaceUtils: set up nativeWindow 0x76c64afd42b0 for 850x480, color 0x23, rotation 0, usage 0x402900
06-28 14:47:38.462  4834  5638 I DMCodecAdapterFactory: Creating an asynchronous MediaCodec adapter for track type audio
06-28 14:47:38.463  4834  5683 I OMXClient: IOmx service obtained
06-28 14:47:38.466  4834  5683 I MediaCodec: MediaCodec will operate in async mode
06-28 14:47:38.466  4834  5683 D MediaCodec: flushMediametrics
06-28 14:47:38.466  4834  5683 E ACodec  : setupRawAudioFormat: incorrect numChannels: 0
06-28 14:47:38.467  4834  5683 I ACodec  : codec does not support config priority (err -2147483648)
06-28 14:47:38.467  4834  5683 I ACodec  : codec does not support config operating rate (err -2147483648)
06-28 14:47:38.468  4834  5638 D MediaCodec: keep callback message for reclaim
06-28 14:47:38.472  4834  5683 E ACodec  : [OMX.google.aac.decoder] ERROR(0x80001001)
06-28 14:47:38.472  4834  5683 E ACodec  : signalError(omxError 0x80001001, internalError -2147483648)
06-28 14:47:38.472  4834  5683 E MediaCodec: Codec reported err 0x80001001/-2147479551 (Unknown error 2147479551), actionCode 0, while in state 6/STARTED
06-28 14:47:38.472  4834  5683 D MediaCodec: flushMediametrics
06-28 14:47:38.481  4834  5638 E MediaCodecAudioRenderer: Audio codec error
06-28 14:47:38.481  4834  5638 E MediaCodecAudioRenderer:   android.media.MediaCodec$CodecException: Error 0x80001001
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal: Playback error
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:   androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=2, format=Format(2, null, video/mp4, audio/mp4a-latm, mp4a.40.2, 394587, ta, [-1, -1, -1.0, null], [0, 48000]), format_supported=YES
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:745)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at android.os.Handler.dispatchMessage(Handler.java:102)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at android.os.Looper.loopOnce(Looper.java:201)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at android.os.Looper.loop(Looper.java:288)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at android.os.HandlerThread.run(HandlerThread.java:67)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:   Caused by: androidx.media3.exoplayer.mediacodec.MediaCodecDecoderException: Decoder failed: OMX.google.aac.decoder
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.createDecoderException(MediaCodecRenderer.java:1029)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:902)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.RendererHolder.render(RendererHolder.java:381)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1329)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:646)
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:       ... 4 more
06-28 14:47:38.482  4834  5638 E ExoPlayerImplInternal:   Caused by: android.media.MediaCodec$CodecException: Error 0x80001001
06-28 14:47:38.483  4834  5638 D MediaCodec: keep callback message for reclaim
06-28 14:47:38.483  4834  4834 I CS3ExoPlayer: Handle event: ResizedEvent(height=0, width=0, source=Player)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal: Disable failed.
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:   java.lang.IllegalStateException
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at android.media.MediaCodec.native_flush(Native Method)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at android.media.MediaCodec.flush(MediaCodec.java:2387)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.flush(AsynchronousMediaCodecAdapter.java:272)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:968)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:961)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:784)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.onDisabled(MediaCodecAudioRenderer.java:710)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.BaseRenderer.disable(BaseRenderer.java:244)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.RendererHolder.disableRenderer(RendererHolder.java:645)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.RendererHolder.disable(RendererHolder.java:539)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:2065)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.disableRenderers(ExoPlayerImplInternal.java:2058)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:1791)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:1748)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:815)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at android.os.Handler.dispatchMessage(Handler.java:102)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at android.os.Looper.loopOnce(Looper.java:201)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at android.os.Looper.loop(Looper.java:288)
06-28 14:47:38.484  4834  5638 E ExoPlayerImplInternal:       at android.os.HandlerThread.run(HandlerThread.java:67)
06-28 14:47:38.484  4834  5677 D SurfaceUtils: connecting to surface 0x76c64b00da60, reason connectToSurface
06-28 14:47:38.484  4834  5677 I MediaCodec: [OMX.android.latte.h264.decoder] setting surface generation to 4950034
06-28 14:47:38.484  4834  5677 D SurfaceUtils: disconnecting from surface 0x76c64b00da60, reason connectToSurface(reconnect)
06-28 14:47:38.484  4834  5677 D SurfaceUtils: connecting to surface 0x76c64b00da60, reason connectToSurface(reconnect)
06-28 14:47:38.484  4834  5678 D SurfaceUtils: disconnecting from surface 0x76c64b00da60, reason setNativeWindowSizeFormatAndUsage
06-28 14:47:38.484  4834  5678 D SurfaceUtils: connecting to surface 0x76c64b00da60, reason setNativeWindowSizeFormatAndUsage
06-28 14:47:38.484  4834  5678 D SurfaceUtils: set up nativeWindow 0x76c64b00da60 for 850x480, color 0x23, rotation 0, usage 0x402900
06-28 14:47:38.484  4834  5677 D SurfaceUtils: disconnecting from surface 0x76c64afd42b0, reason disconnectFromSurface
06-28 14:47:38.484  4834  5677 E Surface : freeAllBuffers: 1 buffers were freed while being dequeued!
06-28 14:47:38.486  4834  5677 D SurfaceUtils: disconnecting from surface 0x76c64b00da60, reason disconnectFromSurface
06-28 14:47:38.487  4834  5683 D MediaCodec: flushMediametrics
06-28 14:47:38.487  4834  5683 D MediaCodec: flushMediametrics
06-28 14:47:38.487  4834  5677 D MediaCodec: flushMediametrics
06-28 14:47:38.487  4834  5677 D MediaCodec: flushMediametrics
06-28 14:47:38.489  4834  4834 I CS3ExoPlayer: Handle event: ErrorEvent(error=androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=2, format=Format(2, null, video/mp4, audio/mp4a-latm, mp4a.40.2, 394587, ta, [-1, -1, -1.0, null], [0, 48000]), format_supported=YES, source=Player)
06-28 14:47:38.489  4834  4834 I CS3ExoPlayer: playerError = (ExtractorLink(name=MovieBox (Tamil dub - 480), url=https://macdn.hakunaymatata.com/resource/3f7f7f456d0aa48bda15176a6e28dd72.mp4?Expires=1751792859&Signature=7tzIr505QTxS6Xr-UnJqSUeTZ4t6phVICjYi0TTnoK0S2zfAG4qvcwOC77MC0meTqpysujUyE9uENm9dbChbtTp5DI0VbCNX6GqNnFDdjMpj8~JUrCJDv1UCvBkBnnWB7xfQ3fP8m8QonpeDa5A9M~f2HLchhizNIFzif2MYV45XjCpg-UtPHdv-lFq0Da6D3OZsBXM88a-I9fnzZR9qxlOmrH7UHnZlKcLEd1orJasPMBYRQ1fw7t3WyFLicc~tMxbfF19iQL1tpNWPtrRcNJ9MBMDnwBgOmqTPe3nHwJeo-sQpTABHMa1MvszJ7CMd03wcwZ7yU7a2y6rB0pwAeA__&Key-Pair-Id=KMHN1LQ1HEUPL, referer=, type=VIDEO), null)
06-28 14:47:38.490  4834  4834 I COMPACT : showToast = Renderer error
06-28 14:47:38.490  4834  4834 I COMPACT : ERROR_CODE_DECODING_FAILED (4003)
06-28 14:47:38.490  4834  4834 I COMPACT : MediaCodecAudioRenderer error, index=2, format=Format(2, null, video/mp4, audio/mp4a-latm, mp4a.40.2, 394587, ta, [-1, -1, -1.0, null], [0, 48000]), format_supported=YES
06-28 14:47:38.491  4834  4834 E Toast   : setGravity() shouldn't be called on text toasts, the values won't be used
Other details

No response

Acknowledgements
  • I am sure my issue is related to the app and NOT some extension.
  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I have updated the app to pre-release version Latest.
  • I will fill out all of the requested information in this form.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the MovieBoxProvider source on Android 11 and inspect the CS3ExoPlayer and AndroidXMedia3 MediaCodecAudioRenderer log entries. Compare the failing AAC format and codec error with playback through VLC; done means the selected source plays without falling back or producing the audio codec error.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.