Closed VenryZhong closed 4 years ago
I wonder if this is a change in video decoder capability detection between the two releases given the logging D/MediaCodecInfo: NoSupport [sizeAndRate.support, 1920x1080x29.742565155029297] [OMX.IMG.MSVDX.Decoder.HEVC, video/hevc] [HWEVA, EVA-AL00, HUAWEI, 26]
and subsequent use of OMX.google.hevc.decoder. Maybe the software decoder is not handling rotation properly.
@VenryZhong Please could you provide logging like the snippet above (or even better a bug report captured via adb bugreport
) after playing the video on the older version so we can see what decoder is being used?
Aside: OMX.google.hevc.decoder does show the video correctly on Pixel 2 XL running Q.
@andrewlewis I tested a lot of mobile phones, but this problem happened on this P9, other mobile phones have no problem.
this is log fo exoplayer 2.10.8
2020-04-07 17:30:28.200 19034-19034/com.example.exoplayerdemo D/HwGalleryCacheManagerImpl: mIsEffect:false
2020-04-07 17:30:28.206 19034-19034/com.example.exoplayerdemo D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f0d0005, context : com.example.exoplayerdemo.TestActivity@b70a58, Nhwext : 0, get Blur : disable with , null
2020-04-07 17:30:28.207 19034-19034/com.example.exoplayerdemo D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f0d0005, context : com.example.exoplayerdemo.TestActivity@b70a58, Nhwext : 0, get Blur : disable with , null
2020-04-07 17:30:28.241 19034-19034/com.example.exoplayerdemo W/Settings: mValues not put! needsGenerationTracker: true currentGeneration: -1 name: accessibility_captioning_enabled value: null
2020-04-07 17:30:28.284 19034-19034/com.example.exoplayerdemo I/HwCust: Constructor found for class android.net.HwCustConnectivityManagerImpl
2020-04-07 17:30:28.284 19034-19034/com.example.exoplayerdemo D/HwCust: Create obj success use class android.net.HwCustConnectivityManagerImpl
2020-04-07 17:30:28.293 19034-19034/com.example.exoplayerdemo I/ExoPlayerImpl: Init ae3ad71 [ExoPlayerLib/2.10.8] [HWEVA, EVA-AL00, HUAWEI, 26]
2020-04-07 17:30:28.303 19034-19042/com.example.exoplayerdemo I/zygote64: Do partial code cache collection, code=60KB, data=44KB
2020-04-07 17:30:28.303 19034-19042/com.example.exoplayerdemo I/zygote64: After code cache collection, code=60KB, data=44KB
2020-04-07 17:30:28.303 19034-19042/com.example.exoplayerdemo I/zygote64: Increasing code cache capacity to 256KB
2020-04-07 17:30:28.309 19034-19034/com.example.exoplayerdemo D/ActivityThread: add activity client record, r= ActivityRecord{21999a9 token=android.os.BinderProxy@96ec41f {com.example.exoplayerdemo/com.example.exoplayerdemo.TestActivity}} token= android.os.BinderProxy@96ec41f
2020-04-07 17:30:28.316 19034-19034/com.example.exoplayerdemo W/VRSystemServiceManager: vr service is not alive
2020-04-07 17:30:28.322 19034-19034/com.example.exoplayerdemo D/OpenGLRenderer: HWUI Binary is enabled
2020-04-07 17:30:28.323 19034-19066/com.example.exoplayerdemo D/OpenGLRenderer: HWUI GL Pipeline
2020-04-07 17:30:28.336 19034-19034/com.example.exoplayerdemo I/PressGestureDetector: onAttached begin
2020-04-07 17:30:28.337 19034-19034/com.example.exoplayerdemo I/PressGestureDetector: onAttached end
2020-04-07 17:30:28.338 19034-19067/com.example.exoplayerdemo I/PressGestureDetector: enabledInPad = false,isPcCastMode = false
2020-04-07 17:30:28.374 19034-19066/com.example.exoplayerdemo I/OpenGLRenderer: Initialized EGL, version 1.4
2020-04-07 17:30:28.374 19034-19066/com.example.exoplayerdemo D/OpenGLRenderer: Swap behavior 2
2020-04-07 17:30:28.381 19034-19066/com.example.exoplayerdemo D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
2020-04-07 17:30:28.385 19034-19064/com.example.exoplayerdemo W/VideoCapabilities: Unrecognized profile/level 1/32 for video/mp4v-es
2020-04-07 17:30:28.385 19034-19064/com.example.exoplayerdemo I/VideoCapabilities: Unsupported profile 16384 for video/mp4v-es
2020-04-07 17:30:28.385 19034-19064/com.example.exoplayerdemo I/VideoCapabilities: Unsupported profile 16384 for video/mp4v-es
2020-04-07 17:30:28.389 19034-19064/com.example.exoplayerdemo W/VideoCapabilities: Unsupported mime video/x-pn-realvideo
2020-04-07 17:30:28.391 19034-19064/com.example.exoplayerdemo W/VideoCapabilities: Unsupported mime video/mpeg
2020-04-07 17:30:28.392 19034-19064/com.example.exoplayerdemo W/VideoCapabilities: Unrecognized profile/level 0/0 for video/mpeg2
2020-04-07 17:30:28.392 19034-19064/com.example.exoplayerdemo W/VideoCapabilities: Unrecognized profile/level 0/2 for video/mpeg2
2020-04-07 17:30:28.392 19034-19064/com.example.exoplayerdemo W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
2020-04-07 17:30:28.395 19034-19064/com.example.exoplayerdemo W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es
2020-04-07 17:30:28.398 19034-19064/com.example.exoplayerdemo W/VideoCapabilities: Unsupported mime video/vc1
2020-04-07 17:30:28.401 19034-19064/com.example.exoplayerdemo W/VideoCapabilities: Unsupported mime video/x-flv
2020-04-07 17:30:28.422 19034-19064/com.example.exoplayerdemo I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
2020-04-07 17:30:28.428 19034-19066/com.example.exoplayerdemo D/OpenGLRenderer: HWUI Binary is enabled
2020-04-07 17:30:28.431 19034-19064/com.example.exoplayerdemo D/MediaCodecInfo: NoSupport [sizeAndRate.support, 1920x1080x29.742565155029297] [OMX.IMG.MSVDX.Decoder.HEVC, video/hevc] [HWEVA, EVA-AL00, HUAWEI, 26]
2020-04-07 17:30:28.432 19034-19064/com.example.exoplayerdemo D/MediaCodecInfo: NoSupport [sizeAndRate.support, 1920x1080x29.742565155029297] [OMX.IMG.MSVDX.Decoder.HEVC, video/hevc] [HWEVA, EVA-AL00, HUAWEI, 26]
2020-04-07 17:30:28.447 19034-19082/com.example.exoplayerdemo I/OMXClient: Treble IOmx obtained
2020-04-07 17:30:28.449 19034-19082/com.example.exoplayerdemo I/ACodec: In onAllocateComponent create compenent, codec name: OMX.IMG.MSVDX.Decoder.HEVC
2020-04-07 17:30:28.451 19034-19034/com.example.exoplayerdemo W/InputMethodManager: startInputReason = 1
2020-04-07 17:30:28.457 19034-19092/com.example.exoplayerdemo E/BufferQueueProducer: [] Can not get hwsched service
2020-04-07 17:30:28.458 19034-19081/com.example.exoplayerdemo D/SurfaceUtils: connecting to surface 0x7e2804e010, reason connectToSurface
2020-04-07 17:30:28.458 19034-19081/com.example.exoplayerdemo I/MediaCodec: [OMX.IMG.MSVDX.Decoder.HEVC] setting surface generation to 19490817
2020-04-07 17:30:28.458 19034-19081/com.example.exoplayerdemo D/SurfaceUtils: disconnecting from surface 0x7e2804e010, reason connectToSurface(reconnect)
2020-04-07 17:30:28.458 19034-19081/com.example.exoplayerdemo D/SurfaceUtils: connecting to surface 0x7e2804e010, reason connectToSurface(reconnect)
2020-04-07 17:30:28.463 19034-19082/com.example.exoplayerdemo W/HwExtendedUtils: hw configLocalPlayBack err = -1010
2020-04-07 17:30:28.463 19034-19082/com.example.exoplayerdemo E/ACodec: [OMX.IMG.MSVDX.Decoder.HEVC] setPortMode on output to DynamicANWBuffer failed w/ err -1010
2020-04-07 17:30:28.463 19034-19082/com.example.exoplayerdemo W/ACodec: [OMX.IMG.MSVDX.Decoder.HEVC] prepareForAdaptivePlayback failed w/ err -1010
2020-04-07 17:30:28.464 19034-19082/com.example.exoplayerdemo I/HwExtendedCodec: mime is [video/hevc] at setVideoFormat
2020-04-07 17:30:28.464 19034-19082/com.example.exoplayerdemo I/ACodec: codec does not support config priority (err -1010)
2020-04-07 17:30:28.466 19034-19082/com.example.exoplayerdemo I/ACodec: onStart
2020-04-07 17:30:28.473 19034-19034/com.example.exoplayerdemo W/InputMethodManager: startInputReason = 5
2020-04-07 17:30:28.491 19034-19082/com.example.exoplayerdemo I/HwExtendedUtils: error setConfig queuesToNativeWindow (err -1010)
2020-04-07 17:30:28.491 19034-19082/com.example.exoplayerdemo D/SurfaceUtils: disconnecting from surface 0x7e2804e010, reason setNativeWindowSizeFormatAndUsage
2020-04-07 17:30:28.491 19034-19082/com.example.exoplayerdemo D/SurfaceUtils: connecting to surface 0x7e2804e010, reason setNativeWindowSizeFormatAndUsage
2020-04-07 17:30:28.491 19034-19082/com.example.exoplayerdemo D/SurfaceUtils: set up nativeWindow 0x7e2804e010 for 1920x1088, color 0x300, rotation 90, usage 0x20002900
2020-04-07 17:30:28.491 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.493 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.494 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.495 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.497 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.499 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.508 19034-19082/com.example.exoplayerdemo I/HwExtendedUtils: error setConfig queuesToNativeWindow (err -1010)
2020-04-07 17:30:28.508 19034-19082/com.example.exoplayerdemo D/SurfaceUtils: disconnecting from surface 0x7e2804e010, reason setNativeWindowSizeFormatAndUsage
2020-04-07 17:30:28.508 19034-19082/com.example.exoplayerdemo D/SurfaceUtils: connecting to surface 0x7e2804e010, reason setNativeWindowSizeFormatAndUsage
2020-04-07 17:30:28.508 19034-19082/com.example.exoplayerdemo D/SurfaceUtils: set up nativeWindow 0x7e2804e010 for 1920x1088, color 0x300, rotation 90, usage 0x20002900
2020-04-07 17:30:28.508 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.510 19034-19099/com.example.exoplayerdemo I/OMXClient: Treble IOmx obtained
2020-04-07 17:30:28.510 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.512 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.513 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.515 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.517 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.519 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.521 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.523 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.524 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.525 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.527 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.528 19034-19082/com.example.exoplayerdemo W/GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
2020-04-07 17:30:28.531 19034-19099/com.example.exoplayerdemo I/ACodec: In onAllocateComponent create compenent, codec name: OMX.google.aac.decoder
2020-04-07 17:30:28.532 19034-19099/com.example.exoplayerdemo W/HwExtendedUtils: hw configLocalPlayBack err = -2147483648
2020-04-07 17:30:28.532 19034-19099/com.example.exoplayerdemo I/ACodec: codec does not support config priority (err -2147483648)
2020-04-07 17:30:28.532 19034-19099/com.example.exoplayerdemo I/ACodec: codec does not support config operating rate (err -2147483648)
2020-04-07 17:30:28.532 19034-19099/com.example.exoplayerdemo I/ACodec: onStart
2020-04-07 17:30:28.539 19034-19081/com.example.exoplayerdemo D/SurfaceUtils: connecting to surface 0x7e2809c010, reason connectToSurface
2020-04-07 17:30:28.539 19034-19081/com.example.exoplayerdemo I/MediaCodec: [OMX.IMG.MSVDX.Decoder.HEVC] setting surface generation to 19490818
2020-04-07 17:30:28.539 19034-19081/com.example.exoplayerdemo D/SurfaceUtils: disconnecting from surface 0x7e2809c010, reason connectToSurface(reconnect)
2020-04-07 17:30:28.539 19034-19081/com.example.exoplayerdemo D/SurfaceUtils: connecting to surface 0x7e2809c010, reason connectToSurface(reconnect)
2020-04-07 17:30:28.540 19034-19082/com.example.exoplayerdemo D/SurfaceUtils: disconnecting from surface 0x7e2809c010, reason setNativeWindowSizeFormatAndUsage
2020-04-07 17:30:28.540 19034-19082/com.example.exoplayerdemo D/SurfaceUtils: connecting to surface 0x7e2809c010, reason setNativeWindowSizeFormatAndUsage
2020-04-07 17:30:28.540 19034-19082/com.example.exoplayerdemo D/SurfaceUtils: set up nativeWindow 0x7e2809c010 for 1920x1088, color 0x300, rotation 90, usage 0x20002900
2020-04-07 17:30:28.542 19034-19081/com.example.exoplayerdemo D/SurfaceUtils: disconnecting from surface 0x7e2804e010, reason disconnectFromSurface
2020-04-07 17:30:28.561 19034-19064/com.example.exoplayerdemo D/AudioTrack: OFFLOAD 0,mNotificationFrames 0,mStreamType =-1,mOriginalSampleRate 48000,mAfSampleRate 48000,mTransfer 3
2020-04-07 17:30:28.561 19034-19064/com.example.exoplayerdemo D/AudioTrack: Client defaulted notificationFrames to 6000 for frameCount 12000
2020-04-07 17:30:28.570 19034-19064/com.example.exoplayerdemo I/AudioTrack: audioTrack send start state to pg
2020-04-07 17:30:28.595 19034-19064/com.example.exoplayerdemo D/android.media.AudioTrack: [HSM] AudioTrace play() uid: 10335, pid: 19034
2020-04-07 17:30:29.889 19034-19042/com.example.exoplayerdemo I/zygote64: Do full code cache collection, code=124KB, data=96KB
2020-04-07 17:30:29.891 19034-19042/com.example.exoplayerdemo I/zygote64: After code cache collection, code=114KB, data=65KB
2020-04-07 17:30:30.977 19034-19042/com.example.exoplayerdemo I/zygote64: Do partial code cache collection, code=116KB, data=79KB
2020-04-07 17:30:30.978 19034-19042/com.example.exoplayerdemo I/zygote64: After code cache collection, code=116KB, data=79KB
2020-04-07 17:30:30.978 19034-19042/com.example.exoplayerdemo I/zygote64: Increasing code cache capacity to 512KB
2020-04-07 17:30:32.503 19034-19064/com.example.exoplayerdemo D/AudioTrack: stop() called with 198656 frames delivered
2020-04-07 17:30:32.504 19034-19064/com.example.exoplayerdemo D/android.media.AudioTrack: [HSM] AudioTrace stop() uid: 10335, pid: 19034
On 2.10.8 it looks like we use OMX.IMG.MSVDX.Decoder.HEVC
even though the stream exceeds the decoder capabilities (NoSupport [sizeAndRate.support, 1920x1080x29.742565155029297] [OMX.IMG.MSVDX.Decoder.HEVC, video/hevc] [HWEVA, EVA-AL00, HUAWEI, 26]
). In the log from 2.11.3 we are using OMX.google.hevc.decoder
. So I think this is indeed a case of falling back to software decoding.
If the decoder is underreporting capabilities, the OEM should fix that. However, it's quite possible that the decoder does not support the format in the general case. I don't think we should prevent all usage of OMX.google.hevc.decoder
on this device because it will probably work well for other use cases that don't have rotation (and also works with rotation on recent Android versions).
For a quick fix in your app, you could pass a custom MediaCodecSelector
that delegates to the default one but removes the problematic decoder based on its name.
Side note: it might be interesting to know whether OMX.IMG.MSVDX.Decoder.HEVC
gets selected if you modify the frame rate to 30 fps (or 25 fps).
ok,thanks, i kown how to fix it. in huawei P9 , OMX.IMG.MSVDX.Decoder.HEVC , getSupportedWidths is [96, 536] , in android.media.MediaCodecInfo.VideoCapabilities#areSizeAndRateSupported will return false , this makes the OMX.IMG.MSVDX.Decoder.HEVC decoder unable to select him normally.
Thanks for the information. If the capabilities are being under-reported please report this to the OEM. Alternatively, the capabilities may also be correct in the general case even if you can find a particular higher resolution stream that plays (they are a safe underestimate), in which case this is working as intended.
Issue description
Hello, I have a problem. On Huawei P9, using exoplayer to simply play a h265 video will encounter problems. Using the old version 2.10.8 can play normally, while using the new version 2.11.3 will cause the screen to rotate. what should i do. As shown: version: 2.10.8:
version: 2.11.3:
Reproduction steps
Link to test content
video: ttt.mp4.zip
[REQUIRED] A full bug report captured from the device
Version of ExoPlayer being used
2.10.3 and 2.11.3
Device(s) and version(s) of Android being used
Vendor: 8.0.0 Model: HUAWEI system-version: EVA-AL00