HBiSoft / HBRecorder

Lightweight screen recording Android library
MIT License
402 stars 137 forks source link

Xiaomi Redmi Note 8 Pro and Redmi Note 9 (M2003J15SS) DefaultVideoEncoder Bug #132

Closed umutaykol closed 1 year ago

umutaykol commented 1 year ago

Hello, I faced an issue with the phones which I wrote on Title. (Xiaomi Redmi Note 8 Pro and Redmi Note 9)

Default Video Encoder selection is not working on these devices. I solve this problem with code down below. For these devices i used H264 encoder instead DEFAULT

    /**
     * Solution for Xiaomi Redmi Note 8 Pro and Redmi Note 9 (M2003J15SS) DefaultVideoEncoder Bug
     */
    if (Build.MODEL.toString().contains("Redmi Note 8 Pro") || Build.MODEL.toString().contains("M2003J15SC")) {
        hbRecorder!!.setVideoEncoder("H264")
    } else {
        hbRecorder!!.setVideoEncoder("DEFAULT")
    }
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed if no further activity occurs within the next 3 days. Thank you for your contributions.

HBiSoft commented 1 year ago

Just a note on this.

It is not an issue with the library, but instead the device/android api. Some devices do not accept setting it to DEFAULT, for some reason.