Skip to content
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

[BUG]: Error in mkv videos "errorCode": "24001" #4161

Closed
himanshu8443 opened this issue Sep 11, 2024 · 10 comments
Closed

[BUG]: Error in mkv videos "errorCode": "24001" #4161

himanshu8443 opened this issue Sep 11, 2024 · 10 comments
Assignees
Labels
Accepted Issue is confirmed and accepted by maintainers team bug Platform: Android Repro Provided

Comments

@himanshu8443
Copy link

himanshu8443 commented Sep 11, 2024

Version

6.5.0

What platforms are you having the problem on?

Android

System Version

14

On what device are you experiencing the issue?

Real device

Architecture

Old architecture

What happened?

Getting error in some mkv files

{"errorCode": "24001", "errorException": "androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=1, format=Format(2, Hindi - NimitMak SilverRG, null, audio/mpeg-L2, null, -1, hi, [-1, -1, -1.0, null], [2, 48000]), format_supported=NO_UNSUPPORTED_TYPE", "errorStackTrace": "androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=1, format=Format(2, Hindi - NimitMak SilverRG, null, audio/mpeg-L2, null, -1, hi, [-1, -1, -1.0, null], [2, 48000]), format_supported=NO_UNSUPPORTED_TYPE
        at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:623)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loopOnce(Looper.java:224)
        at android.os.Looper.loop(Looper.java:318)
        at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: androidx.media3.exoplayer.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: [-49999], Format(2, Hindi - NimitMak SilverRG, null, audio/mpeg-L2, null, -1, hi, [-1, -1, -1.0, null], [2, 48000])
        at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1079)
        at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:551)
        at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1560)
        at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.onInputFormatChanged(MediaCodecAudioRenderer.java:517)
        at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:994)
        at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:814)
        at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1112)
        at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:544)
        ... 4 more
", "errorString": "ExoPlaybackException: ERROR_CODE_DECODER_INIT_FAILED"}

showing audio is unsupported but I tried in various other native players that use Exoplayer and the video is playing fine

Reproduction Link

No response

Reproduction

Try playing the sample URL and the player shows error

here is a sample video URL = https://pixeldra.in/api/file/bQb6RKk3?download,

Copy link

Thank you for your bug report. We will review it and get back to you if we need more information.

There is a newer version of the library available. You are using version 6.4.5, while the latest stable version is 6.5.0. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

Copy link

Thank you for your bug report. We will review it and get back to you if we need more information.

@seyedmostafahasani
Copy link
Collaborator

seyedmostafahasani commented Sep 14, 2024

@himanshu8443
I tested it with your URL, but I didn't see any errors in logcat. Could you please give me some clues about it?

@himanshu8443
Copy link
Author

himanshu8443 commented Sep 15, 2024

@himanshu8443 I tested it with your URL, but I didn't see any errors in logcat. Could you please give me some clues about it?

Whenever I play this URL player closes and logs the above error. I don't know if it is a device-specific issue but I am also getting the same error in android emulator. Have you tried it in emulator? And also try changing the audio track

Properties
avd.ini.displayname      Pixel_3a_API_34_extension_level_7_x86_64
avd.ini.encoding         UTF-8
AvdId                    Pixel_3a_API_34_extension_level_7_x86_64
disk.dataPartition.size  6442450944
hw.accelerometer         yes
hw.arc                   false
hw.audioInput            yes
hw.battery               yes
hw.camera.back           emulated
hw.camera.front          emulated
hw.cpu.ncore             2
hw.device.hash2          MD5:0e6953ebf01bdc6b33a2f54746629c50
hw.device.manufacturer   Google
hw.device.name           pixel_3a
hw.dPad                  no
hw.gps                   yes
hw.gpu.enabled           yes
hw.gpu.mode              auto
hw.keyboard              yes
hw.lcd.density           440
hw.lcd.height            2220
hw.lcd.width             1080
hw.mainKeys              no
hw.ramSize               1536
hw.sdCard                yes
hw.sensors.orientation   yes
hw.sensors.proximity     yes
hw.trackBall             no
image.androidVersion.api 34
image.sysdir.1           system-images\android-34\google_apis\x86_64\
PlayStore.enabled        false
runtime.network.latency  none
runtime.network.speed    full
snapshot.present         no
tag.display              Google APIs
tag.id                   google_apis
vm.heapSize              256

@seyedmostafahasani
Copy link
Collaborator

I tested it on the emulator, and it works correctly.

@freeboub
Copy link
Collaborator

The answer is here : google/ExoPlayer#6525
The mime type is audio/mpeg-L2 which is not mandatory on android device integration. The solution should be to build with ffmpeg (I never try)

@himanshu8443
Copy link
Author

himanshu8443 commented Sep 15, 2024

ok, I can confirm when I tried playing it without using selectedAudioTrack property video played fine. The error only occurs on using onAudioTracks property and changing the audio track using selectedAudioTrack
by default audio selected is index 1 (audio/mp4a-latm) changing to 'audio/mpeg-L2' causes error
so just adding selectedAudioTrack={{ type: SelectedTrackType.INDEX, value: 0, }} in player properties should reproduce the issue

I tested in some other player that also claims to uses Exo Player it was playing fine that's why I thought its not Exo Player issue may be it is

@freeboub
Copy link
Collaborator

I reproduce the issue on an exoplayer sample (without ffmpeg). In fact in the sample, the track is grey because it is not supported. Here user cannot identify the track as unsupported. I will add a new flag to be able to track unsupported tracks.
I really think the solution is to enable ffmpeg in exoplayer to be able to play this track...

@freeboub freeboub added Accepted Issue is confirmed and accepted by maintainers team and removed Waiting for Review labels Sep 15, 2024
@freeboub freeboub self-assigned this Sep 15, 2024
@mkbhdana
Copy link

I reproduce the issue on an exoplayer sample (without ffmpeg). In fact in the sample, the track is grey because it is not supported. Here user cannot identify the track as unsupported. I will add a new flag to be able to track unsupported tracks. I really think the solution is to enable ffmpeg in exoplayer to be able to play this track...

yes ffmpeg is really needed to provide support on various devices. this is the only blocker i am facing currently.

@freeboub
Copy link
Collaborator

freeboub commented Oct 5, 2024

Let's follow up in: #3106

@freeboub freeboub closed this as completed Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue is confirmed and accepted by maintainers team bug Platform: Android Repro Provided
Projects
None yet
Development

No branches or pull requests

4 participants