ExoPlayer
ExoPlayer copied to clipboard
When playing a HDR10 video, colors are washed out
ExoPlayer Version
2.18.1
Devices that reproduce the issue
Pixel6 Android 13 S10 Android 11
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
- Playing the attached HDR10 video with
SurfaceViewis ok.
private lateinit var surfaceView: SurfaceView
private lateinit var exoPlayer: ExoPlayer
// onCreate()
textureView = findViewById(R.id.surfaceView)
exoPlayer.setVideoTextureView(surfaceView)
exoPlayer.setMediaItem(MediaItem.fromUri(Uri.parse("Content Uri")))
exoPlayer.prepare()
exoPlayer.play()
But,
- Playing the attached HDR10 video with
TextureViewisn't ok. (Colors are washed out.)
private lateinit var textureView: TextureView
private lateinit var exoPlayer: ExoPlayer
// onCreate()
textureView = findViewById(R.id.textureView)
exoPlayer.setVideoTextureView(textureView)
exoPlayer.setMediaItem(MediaItem.fromUri(Uri.parse("Content Uri")))
exoPlayer.prepare()
exoPlayer.play()
Expected result
Is there a way that plays the HDR10 video with TextureView with original colors?
It can't give up TextureView because of using SurfaceTexture with OpenGL.
Could you recommend a better way or report this issue to google?
Actual result
HDR10 with SurfaceView

HDR10 with TextureView

related issue - https://github.com/google/ExoPlayer/issues/8448
Media
https://drive.google.com/file/d/19TWJJSGebC-ngRe1bMyLUQ70soV8eo54/view?usp=sharing
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4@Main
HDR format : Dolby Vision, Version 1.0, dvhe.08.04, BL+RPU, HLG compatible
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Bug Report
- [ ] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
I wrote the issue also in the android issue tracker https://issuetracker.google.com/issues/240311505.
TextureView doesn't support HDR output due to underlying platform limitations and always needs to apply tone-mapping to SDR. The tone-mapping also only exists on devices running Android 13 and above and isn't as good in quality as using a SurfaceView. So if you can, please use SurfaceView when playing HDR streams.
(This has also been asked before in #8448)
Closing because we can't fix this as it's caused by a platform limitation as explained above.