ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

When playing a HDR10 video, colors are washed out

Open SeungwonLee opened this issue 3 years ago • 2 comments

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

  1. Playing the attached HDR10 video with SurfaceView is 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,

  1. Playing the attached HDR10 video with TextureView isn'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_surfaceview

HDR10 with TextureView hdr10_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 bugreport to [email protected] after filing this issue.

SeungwonLee avatar Jul 26 '22 09:07 SeungwonLee

I wrote the issue also in the android issue tracker https://issuetracker.google.com/issues/240311505.

SeungwonLee avatar Jul 27 '22 06:07 SeungwonLee

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)

tonihei avatar Jul 27 '22 09:07 tonihei

Closing because we can't fix this as it's caused by a platform limitation as explained above.

tonihei avatar Sep 06 '22 09:09 tonihei