question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error

See original GitHub issue

The error message comes up sometimes when I try to access a video displayed in my Flutter application. I am using Chewie (https://pub.dev/packages/chewie) when rendering my videos. The video is an mp4 file and works most of the time.

Full error message: Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, null, -1, null, [1280, 720, 29.973475], [-1, -1]), format_supported=YES

It is not evident to me how the problem can be reproduced because it happens arbitrarily.

I don’t know the ExoPlayer version number. But I downloaded Chewie and video_player yesterday so I should have the latest. If I can find the version number in the bug report let me know. The expected behavior is no error message and a working video Device: Samsung SM-J105H Android version 5.1.1

Here is info from the bugReport. I do not know what information is of use…

01-18 12:22:38.159   770  1228 D InputMethodManagerService: windowGainedFocus mCurrentFocusedUserId - 0 and mSecureKeypadEnabled-false
01-18 12:22:38.169  1691  1691 D InputMethodFrameWorkUtils: InputMethodSubtype is found as local:sv
01-18 12:22:38.169  1691  1691 D InputMethodFrameWorkUtils: InputMethodSubtype is set as local:sv
01-18 12:22:38.169  9355  9400 I flutter : singleTestscreenItem :: Chewie Error: Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, null, -1, null, [1280, 720, 29.973475], [-1, -1]), format_supported=YES
01-18 12:22:38.169  1691  1691 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1748 android.content.ContextWrapper.sendBroadcast:392 com.sec.android.inputmethod.inputmethodframework.InputMethodFrameWorkUtils.setCurrentInputMethodSubtype:49 com.ime.framework.common.InputManagerImpl.finishInput:5031 com.sec.android.inputmethod.SamsungKeypad.onFinishInput:682 
01-18 12:22:38.179 14816 14816 W linker  : libliger.so: unused DT entry: type 0x6ffffef5 arg 0x4b4c
01-18 12:22:38.179  1691  1691 D SamsungIME: onStartInput: No inputType, No imeOption, isInputViewShown = false, isExtractViewShown = false, isShowInputRequested = false, isConfigChanged = false
01-18 12:22:38.179  9497  9497 D StatusBar: getNumberOfActiveSim: 1
01-18 12:22:38.179   770   848 V WindowStateAnimator: Finishing drawing window Window{c0d5266 u0 d0 SurfaceView}: mDrawState=READY_TO_SHOW
01-18 12:22:38.189 14816 14816 W linker  : libliger.so: unused DT entry: type 0x6ffffffe arg 0x4b0c

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:31
  • Comments:40 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
adamkochcommented, Mar 19, 2021

I am also seeing similar error in a production Flutter app that uses the video_player package (the chewie flutter package uses video_player as well).

I see a number of crashes in Crashlytics, almost always Samsung devices like Samsung A11.

Unfortunately Flutter itself (or Crashlytics in Flutter) doesn’t seem to capture much additional info, it sends me this:

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.4D401F, -1, null, [720, 480, 25.0], [-1, -1]), format_supported=YES, null, null). Error thrown null.
       at .()

The Flutter video_player package is using a recent, but not latest version of ExoPlayer, v2.12.1: https://github.com/flutter/plugins/blob/2068cce1d06c7cbbc6e241f83af24e67dc72863d/packages/video_player/video_player/android/build.gradle#L47

4reactions
ianvillamiacommented, Aug 17, 2021

Any fixes for flutter? still not able to find a fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

PlatformException(VideoError, Video player had error com ...
Hey i got the same error today in 2022/19/8 .Just adding fijkplayer: ^0.10.0 in your project pubsec.yaml file it would work then.
Read more >
Platformexception (videoerror, video player had error com ...
I am trying to make a reels app. I am getting this error, I checked other answers for this question all of them...
Read more >
Can't load multiple videos on one page in Flutter - Reddit
ExoPlaybackException : MediaCodecVideoRenderer error, index=0, format=Format(1, ... Video player had error com.google.android.exoplayer2.
Read more >
com.google.android.exoplayer2.ExoPlaybackException
This page shows Java code examples of com.google.android.exoplayer2. ... @Override public void onPlayerError(ExoPlaybackException error) { final String what ...
Read more >
[Solved]-PlatformException(VideoError, Video player had error ...
Coding example for the question PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: Source error, null, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found