demo player display is too darker

Viewed 51

I build out the hdrvivid-debug.apk and installed on a mobile phone with Android 12. when playing one HDR Vivid test stream, the display is very darker compared to the default video player on the phone. the vivid stream' file name is "hdr_vivid_selftest_dmsync_pq.mp4". it is used to do hdrvivid player test, it simply display a white rectanglular on the middle of screen. I can provide this stream if you want. Thank you! Houxiang

1 Answers

Update:

You can check whether the device has the HDR Vivid video decoding capability according the following method, docs link:

// Check the support for MediaCodec on the device.
MediaCodecList mcList = new MediaCodecList(MediaCodecList.ALL_CODECS);
MediaCodecInfo[] mcInfos = mcList.getCodecInfos();

for (MediaCodecInfo mci : mcInfos)  {
    // Filter out the encoder.
    if (mci.isEncoder()) {
        continue;
    }
    String[] types = mci.getSupportedTypes(); 
    String typesArr = Arrays.toString(types);
    // Filter out the non-HEVC decoder.
    if (!typesArr.contains("hevc")) {
        continue;
    }
    for (String type : types) {
        // Check whether 10-bit HEVC decoding is supported.
        MediaCodecInfo.CodecCapabilities codecCapabilities = mci.getCapabilitiesForType(type);
        for (MediaCodecInfo.CodecProfileLevel codecProfileLevel : codecCapabilities.profileLevels) {
            if (codecProfileLevel.profile == HEVCProfileMain10 || codecProfileLevel.profile == HEVCProfileMain10HDR10 
                || codecProfileLevel.profile == HEVCProfileMain10HDR10Plus) {
                // true means supported.
                return true;
            }
        }
    }
}
// false means unsupported.
return false;

If the device has the HDR Vivid video decoding capability, you can adjust the brightness of the video by adjusting the brightness bar of the device.. If the HDR capability is not supported, you need to call the setBrightness() interface to set the video brightness, and this interface takes effect only on devices that do not support HDR.

It seems that the HarmonyOS 2.0.0.268 system of Honor V30 Pro may not support HDR Vivid. The sample code invokes the setBrightness interface, the set value takes effect. But, the phone's default player may have done other processing, so it looks like the brightness may not be the same.

If HDR is not supported, you can set setBrightness() to a moderate brightness value.


  1. What interface is used when you use the HDR Vivid capability? Native interface or Java interface?
  2. About the display is too dark, Have you adjusted the output brightness? image https://developer.huawei.com/consumer/en/doc/development/Media-Guides/android-hdr-0000001276893212
  3. If it's convenient, please provide a comparison video and HDR Vivid resource file for us to check.
Related