ExoPlayer
ExoPlayer copied to clipboard
Huge dropped frames on a video comparing to MediaPlayer
- ExoPlayer: 2.14.1
- Android 8.1
- Android device: Samsung J7 prime
I tried to play the video below locally with ExoPlayer. However, the video FPS is really bad. A lot of frames got dropped. I could reproduce this issue with the demo project (by putting the test file in the raw folder...). Do you have any suggestions to improve it? It worked pretty well with MediaPlayer, but I want some enhanced features of ExoPlayer.
This is the exoplayer logcat:
2021-06-16 21:55:20.659 24844-25131/ W/AudioCapabilities: Unsupported mime audio/x-ima
2021-06-16 21:55:20.673 24844-25131/ W/AudioCapabilities: Unsupported mime audio/mpeg-L1
2021-06-16 21:55:20.674 24844-25131/ W/AudioCapabilities: Unsupported mime audio/mpeg-L2
2021-06-16 21:55:20.683 24844-25131/ W/AudioCapabilities: Unsupported mime audio/x-ms-wma
2021-06-16 21:55:20.741 24844-25131/ W/VideoCapabilities: Unsupported mime video/mp43
2021-06-16 21:55:20.754 24844-25131/ W/VideoCapabilities: Unrecognized profile/level 1/32 for video/mp4v-es
2021-06-16 21:55:20.754 24844-25131/ W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es
2021-06-16 21:55:20.754 24844-25131/ W/VideoCapabilities: Unrecognized profile/level 32768/64 for video/mp4v-es
2021-06-16 21:55:20.759 24844-25131/ W/VideoCapabilities: Unsupported mime video/wvc1
2021-06-16 21:55:20.762 24844-25131/ W/VideoCapabilities: Unsupported mime video/wvc1
2021-06-16 21:55:20.783 24844-25131/ W/VideoCapabilities: Unsupported mime video/x-ms-wmv7
2021-06-16 21:55:20.786 24844-25131/ W/VideoCapabilities: Unsupported mime video/x-ms-wmv8
2021-06-16 21:55:20.820 24844-25131/ I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
2021-06-16 21:55:20.849 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.Exynos.avc.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.850 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.SEC.avc.sw.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.851 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.Exynos.avc.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.851 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.SEC.avc.sw.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.867 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.Exynos.avc.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.869 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.SEC.avc.sw.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.869 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.Exynos.avc.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.869 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.SEC.avc.sw.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.890 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.Exynos.avc.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.892 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.SEC.avc.sw.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.892 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.Exynos.avc.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.893 24844-25131/ D/MediaCodecInfo: NoSupport [codec.profileLevel, avc1.4D4034, video/avc] [OMX.SEC.avc.sw.dec, video/avc] [on7xelte, SM-G610F, samsung, 27]
2021-06-16 21:55:20.897 24844-25131/ I/ACodec: [] Now uninitialized
2021-06-16 21:55:20.897 24844-25135/ I/ACodec: [] onAllocateComponent
2021-06-16 21:55:20.902 24844-25135/ I/OMXClient: Treble IOmx obtained
2021-06-16 21:55:20.907 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Loaded
2021-06-16 21:55:20.909 24844-25134/ D/SurfaceUtils: connecting to surface 0xca11d808, reason connectToSurface
2021-06-16 21:55:20.910 24844-25134/ I/MediaCodec: [OMX.google.h264.decoder] setting surface generation to 25440257
2021-06-16 21:55:20.910 24844-25134/ D/SurfaceUtils: disconnecting from surface 0xca11d808, reason connectToSurface(reconnect)
2021-06-16 21:55:20.910 24844-25134/ D/SurfaceUtils: connecting to surface 0xca11d808, reason connectToSurface(reconnect)
2021-06-16 21:55:20.912 24844-25135/ E/ACodec: [OMX.google.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
2021-06-16 21:55:20.912 24844-25135/ I/ACodec: can't find wfdsink-exynos-enable
2021-06-16 21:55:20.914 24844-25135/ I/ACodec: codec does not support config priority (err -1010)
2021-06-16 21:55:20.914 24844-25135/ I/ACodec: codec does not support config operating rate (err -1010)
2021-06-16 21:55:20.920 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Loaded->Idle
2021-06-16 21:55:20.936 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Idle->Executing
2021-06-16 21:55:20.938 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Executing
2021-06-16 21:55:20.952 24844-25131/ I/ACodec: [] Now uninitialized
2021-06-16 21:55:20.952 24844-25141/ I/ACodec: [] onAllocateComponent
2021-06-16 21:55:20.954 24844-25141/ I/OMXClient: Treble IOmx obtained
2021-06-16 21:55:20.957 24844-25141/ I/ACodec: [OMX.google.aac.decoder] Now Loaded
2021-06-16 21:55:20.958 24844-25141/ I/ACodec: codec does not support config priority (err -2147483648)
2021-06-16 21:55:20.959 24844-25141/ I/ACodec: codec does not support config operating rate (err -2147483648)
2021-06-16 21:55:20.960 24844-25141/ I/ACodec: [OMX.google.aac.decoder] Now Loaded->Idle
2021-06-16 21:55:20.978 24844-25141/ I/ACodec: [OMX.google.aac.decoder] Now Idle->Executing
2021-06-16 21:55:20.978 24844-25141/ I/ACodec: [OMX.google.aac.decoder] Now Executing
2021-06-16 21:55:20.984 24844-25141/ I/ACodec: [OMX.google.aac.decoder] Now handling output port settings change
2021-06-16 21:55:20.990 24844-25141/ I/ACodec: [OMX.google.aac.decoder] Now Executing
2021-06-16 21:55:23.547 24844-25134/ I/ACodec: [OMX.google.h264.decoder] signalFlush
2021-06-16 21:55:23.547 24844-25135/ I/ACodec: [OMX.google.h264.decoder] ExecutingState flushing now (codec owns 7/8 input, 7/8 output).
2021-06-16 21:55:23.547 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Flushing
2021-06-16 21:55:23.736 24844-25135/ I/ACodec: [OMX.google.h264.decoder] FlushingState onOMXEvent(0,1,0)
2021-06-16 21:55:23.736 24844-25135/ I/ACodec: [OMX.google.h264.decoder] FlushingState onOMXEvent(0,1,1)
2021-06-16 21:55:23.736 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Executing
2021-06-16 21:55:25.541 24844-25134/ I/ACodec: [OMX.google.h264.decoder] signalFlush
2021-06-16 21:55:25.542 24844-25135/ I/ACodec: [OMX.google.h264.decoder] ExecutingState flushing now (codec owns 7/8 input, 7/8 output).
2021-06-16 21:55:25.542 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Flushing
2021-06-16 21:55:25.737 24844-25135/ I/ACodec: [OMX.google.h264.decoder] FlushingState onOMXEvent(0,1,0)
2021-06-16 21:55:25.737 24844-25135/ I/ACodec: [OMX.google.h264.decoder] FlushingState onOMXEvent(0,1,1)
2021-06-16 21:55:25.737 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Executing
2021-06-16 21:55:27.519 24844-25134/ I/ACodec: [OMX.google.h264.decoder] signalFlush
2021-06-16 21:55:27.519 24844-25135/ I/ACodec: [OMX.google.h264.decoder] ExecutingState flushing now (codec owns 7/8 input, 7/8 output).
2021-06-16 21:55:27.519 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Flushing
2021-06-16 21:55:27.712 24844-25135/ I/ACodec: [OMX.google.h264.decoder] FlushingState onOMXEvent(0,1,0)
2021-06-16 21:55:27.712 24844-25135/ I/ACodec: [OMX.google.h264.decoder] FlushingState onOMXEvent(0,1,1)
2021-06-16 21:55:27.712 24844-25135/ I/ACodec: [OMX.google.h264.decoder] Now Executing
2021-06-16 21:55:28.574 24844-24852/ I/zygote: Do full code cache collection, code=252KB, data=204KB
2021-06-16 21:55:28.576 24844-24852/ I/zygote: After code cache collection, code=218KB, data=150KB
Original Video https://user-images.githubusercontent.com/962484/122172107-a43aa100-ceaa-11eb-81db-318df18b2b42.mp4
Exoplayer Video:
https://user-images.githubusercontent.com/962484/122175301-bf5ae000-cead-11eb-9568-712f0feb0e49.mp4
@ojw28 do we have any plan to fix this?
Any update on progress?
I see this also, on all videos, compared to MediaPlayer.
Could you confirm whether this is device specific? We do receive occasional reports indicating that MediaPlayer performance is better, but not in large volume and not where there's such a large claimed difference.
@ojw28 no, this is not a device-specific issue. I tested the issue on 5 devices. 3 of them which were low-end devices ($150 or $250 / device) got huge frame-drop.
The log snippet above indicates a software decoder was used (OMX.google.h264.decoder), which would explain the performance issues.
There are three possible explanations for this:
- There is no hardware decoder available to play these streams. This is unlikely if MediaCodec is playing the same streams fine (which indicates it was using the hardware decoder). You could confirm by looking at logs during the MediaPlayer playback.
- The hardware codec claims it doesn't support the format. You could check by adding an
EventLoggerto ExoPlayer and checking the format support in thetrackslogs. - ExoPlayer falsely selected the software decoder. We fixed some related issues in 2.17.0 (#9565 and #4835), so it's worth trying with this version (or the latest version).
Hey @kingfisherphuoc. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@kingfisherphuoc if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.