81. 
@无名啊,用vbr啊,cbr是那种“就算画面很简单也要保证比特率不下降”的模式,通常用于直播,因为直播比特率上下起伏会卡。
 
		82. 
@老虎会游泳,我一开始用的就是 vbr,但好像 -b:v 没用?
 
		83. 
@无名啊,@老虎会游泳,在红米 K60 Pro 上测试了 hevc_mediacodec 压缩拍摄的 4K60FPS 视频,结果:
CQ 模式应该非常适合视频压缩,但在我设备上,无论转码什么视频,都报错:
$ ffmpeg -hide_banner -hwaccel mediacodec -an -i /storage/emulated/0/DCIM/Camera/VID_20230725_194612.mp4 -c:v hevc_mediacodec -bitrate_mode cq -pix_fmt yuv420p -g 300 /storage/emulated/0/DCIM/Camera/VID_20230725_194612_cq.mp4
......
[amediacodec_ndk @ 0xb40000726c4a0a80] Encoder configure failed, -10000
[hevc_mediacodec @ 0xb40000726c4afc00] MediaCodec configure failed, Generic error in an external library
[vost#0:0/hevc_mediacodec @ 0xb40000726c497300] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
VBR 模式成功:
$ ffmpeg -hide_banner -hwaccel mediacodec -an -i /storage/emulated/0/DCIM/Camera/VID_20230725_194612.mp4 -c:v hevc_mediacodec -bitrate_mode vbr -b:v 8000k -pix_fmt yuv420p -g 300 /storage/emulated/0/DCIM/Camera/VID_20230725_194612_vbr_8000k.mp4
......
Stream #0:0(eng): Video: hevc (hev1 / 0x31766568), yuv420p(tv, bt709/bt709/smpte170m, progressive), 3840x2160, q=2-31, 8000 kb/s, 60 fps, 15360 tbn (default)
    Metadata:
      creation_time   : 2023-07-25T11:46:29.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.3.100 hevc_mediacodec
frame= 1001 fps=102 q=-0.0 Lsize=   20381kB time=00:00:16.66 bitrate=10017.7kbits/s speed=1.69x
video:20376kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.024889%
尝试了多种比特率,速度都在 1.7x 左右。
转码效果:






总结,性能快,但是 cq 模式不可用,没有类似 crf 和 preset 的选项。
 
		84. 
又在旧手机 Redmi Note 7 上尝试了,上方的 cq 模式同样报错,vbr 模式的命令行去掉-pix_fmt yuv420p后可正常执行,速度在 0.38x 左右。低码率时一些帧会出现绿色马赛克。
 
		85. 
Android 设备上 /vendor/etc/media_codecs.xml 的内容:
Redmi K60 Pro
<?xml version="1.0" encoding="utf-8" ?>
<!--
    Copyright (c) 2018-2021 Qualcomm Technologies, Inc.
    All Rights Reserved.
    Confidential and Proprietary - Qualcomm Technologies, Inc.
    Not a Contribution.
    Copyright (C) 2012-2018 The Linux Foundation. All rights reserved.
    Copyright (C) 2012-2013 The Android Open Source Project
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
     http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<!--
"performance-point"
    Vendor-guaranteed performance advertised to the applications
        <Limit name="performance-point-widthxheight" value="fps" />
    -For each of the resolutions, the advertised fps is the max supported,
    with HW-friendly color format and considering video-only.
    -Performance for any intermediate resolution will be that of the
    next-higher-advertised-resolution.
    standard sizes: 480p/576p (SD), 720p (HD), 1080p (FHD), 2160p (UHD)
    standard frame rates: 24, 25, 30, 48+, 50, 60, 100*, 120*, 200*, 240* fps
        * HD+ only
        + SD only
    - All supported standard performance points are listed (unless they are
    covered by another listed standard performance point)
    - Non-standard performance points are listed along with all the standard
    performance points covered by them.
-->
<!--
 Waipio Non-Secure decoder capabilities
 (MB is defined as 16x16)
 _______________________________________________________
 | Codec       |  W      H      fps     Mbps    MB/s   |
 |_____________|_______________________________________|
 | h264        | 3840   2176    60      100    1958400 |
 |             | 4096   2176    48      100            |
 | hevc        | 3840   2176    60      100    1958400 |
 |             | 4096   2176    48      100            |
 | vp9         | 3840   2176    120     100    3916800 |
 |             | 4096   2176    60      100            |
 | mpeg2       | 1920   1088    30       40     244800 |
 |_____________|_______________________________________|
 Waipio Secure decoder capabilities
 (MB is defined as 16x16)
 __________________________________________________
 | Codec    |  W      H      fps    Mbps   MB/s   |
 |__________|_____________________________________|
 | h264     | 3840   2176    60     40    1958400 |
 |          | 4096   2176    48     40            |
 | vp9      | 3840   2176    60     40    1958400 |
 |          | 4096   2176    48     40            |
 | hevc     | 3840   2176    60     40    1958400 |
 |          | 4096   2176    48     40            |
 |__________|_____________________________________|
 Waipio Non-Secure encoder capabilities (Secure not supported)
 (MB is defined as 16x16)
 __________________________________________________
 | Codec    |  W      H      fps   Mbps    MB/s   |
 |__________|_____________________________________|
 | h264     | 3840   2176    60    100    1958400 |
 |          | 4096   2176    48    100            |
 | hevc     | 3840   2176    60    100    1958400 |
 |          | 4096   2176    48    100            |
 |__________|_____________________________________|
-->
<MediaCodecs>
    <Include href="media_codecs_google_audio.xml" />
    <Include href="media_codecs_vendor_audio.xml" />
    <Include href="media_codecs_google_telephony.xml" />
    <Include href="media_codecs_c2_audio.xml" />
    <Settings>
        <Setting name="max-video-encoder-input-buffers" value="11" />
    </Settings>
    <Decoders>
        <!-- C2 decoders -->
        <MediaCodec name="c2.qti.avc.decoder" type="video/avc">
            <Alias name="OMX.qcom.video.decoder.avc"/>
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="36-34816" />
            <Limit name="blocks-per-second" range="36-1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="concurrent-instances" max="16" />
            <Feature name="adaptive-playback" />
            <Limit name="performance-point-4096x2304" value="30" />
            <Limit name="performance-point-3840x2160" value="60" />
            <Limit name="performance-point-1920x1080" value="240" />
            <Limit name="performance-point-1280x720" value="480" />
        </MediaCodec>
        <MediaCodec name="c2.qti.avc.decoder.low_latency" type="video/avc">
            <Alias name="OMX.qcom.video.decoder.avc.low_latency"/>
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="36-34816" />
            <Limit name="blocks-per-second" range="36-1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="concurrent-instances" max="16" />
            <Feature name="adaptive-playback" />
            <Feature name="low-latency" />
            <Limit name="performance-point-4096x2304" value="30" />
            <Limit name="performance-point-3840x2160" value="60" />
            <Limit name="performance-point-1920x1080" value="240" />
            <Limit name="performance-point-1280x720" value="480" />
        </MediaCodec>
        <MediaCodec name="c2.qti.avc.decoder.secure" type="video/avc" >
            <Alias name="OMX.qcom.video.decoder.avc.secure"/>
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="36-34816" />
            <Limit name="blocks-per-second" min="36" max="1958400" />
            <Limit name="bitrate" range="1-40000000" />
            <Limit name="frame-rate" range="1-60" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Feature name="low-latency" />
            <Limit name="concurrent-instances" max="3" />
            <Limit name="performance-point-4096x2304" value="30" />
            <Limit name="performance-point-3840x2160" value="60" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.decoder" type="video/hevc" >
            <Alias name="OMX.qcom.video.decoder.hevc"/>
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="36-34816" />
            <Limit name="blocks-per-second" min="36" max="1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-4096x2304" value="30" />
            <Limit name="performance-point-3840x2160" value="60" />
            <Limit name="performance-point-1920x1080" value="240" />
            <Limit name="performance-point-1280x720" value="480" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.decoder.low_latency" type="video/hevc" >
            <Alias name="OMX.qcom.video.decoder.hevc.low_latency"/>
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="36-34816" />
            <Limit name="blocks-per-second" min="36" max="1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Feature name="adaptive-playback" />
            <Feature name="low-latency" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-4096x2304" value="30" />
            <Limit name="performance-point-3840x2160" value="60" />
            <Limit name="performance-point-1920x1080" value="240" />
            <Limit name="performance-point-1280x720" value="480" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.decoder.secure" type="video/hevc" >
            <Alias name="OMX.qcom.video.decoder.hevc.secure"/>
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="36-34816" />
            <Limit name="blocks-per-second" min="36" max="1958400" />
            <Limit name="bitrate" range="1-40000000" />
            <Limit name="frame-rate" range="1-60" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Feature name="low-latency" />
            <Limit name="concurrent-instances" max="3" />
            <Limit name="performance-point-4096x2304" value="30" />
            <Limit name="performance-point-3840x2160" value="60" />
        </MediaCodec>
        <MediaCodec name="c2.qti.vp9.decoder" type="video/x-vnd.on2.vp9" >
            <Alias name="OMX.qcom.video.decoder.vp9"/>
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="36-34816" />
            <Limit name="blocks-per-second" min="36" max="3888000" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-120" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="6" />
            <Limit name="performance-point-1280x720" value="120" />
            <Limit name="performance-point-1920x1080" value="120" />
            <Limit name="performance-point-4096x2304" value="60" />
            <Limit name="performance-point-3840x2160" value="120" />
        </MediaCodec>
        <MediaCodec name="c2.qti.vp9.decoder.low_latency" type="video/x-vnd.on2.vp9" >
            <Alias name="OMX.qcom.video.decoder.vp9.low_latency"/>
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="36-34816" />
            <Limit name="blocks-per-second" min="36" max="1944000" />
            <Limit name="bitrate" range="1-30000000" />
            <Limit name="frame-rate" range="1-120" />
            <Feature name="adaptive-playback" />
            <Feature name="low-latency" />
            <Limit name="concurrent-instances" max="6" />
            <Limit name="performance-point-1280x720" value="120" />
            <Limit name="performance-point-1920x1080" value="120" />
            <Limit name="performance-point-3840x2160" value="60" />
            <Limit name="performance-point-4096x2304" value="30" />
        </MediaCodec>
        <MediaCodec name="c2.qti.vp9.decoder.secure" type="video/x-vnd.on2.vp9" >
            <Alias name="OMX.qcom.video.decoder.vp9.secure"/>
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="36-34816" />
            <Limit name="blocks-per-second" min="36" max="1944000" />
            <Limit name="bitrate" range="1-40000000" />
            <Limit name="frame-rate" range="1-60" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Feature name="low-latency" />
            <Limit name="concurrent-instances" max="3" />
            <Limit name="performance-point-1280x720" value="60" />
            <Limit name="performance-point-1920x1080" value="60" />
            <Limit name="performance-point-3840x2160" value="60" />
            <Limit name="performance-point-4096x2304" value="30" />
        </MediaCodec>
    </Decoders>
    <Encoders>
        <!-- C2 encoders -->
        <MediaCodec name="c2.qti.avc.encoder" type="video/avc">
            <Alias name="OMX.qcom.video.encoder.avc"/>
            <Limit name="size" min="128x128" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="1958400" />
            <Limit name="block-count" range="64-34816" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="complexity" range="0-100"  default="100" />
            <Limit name="concurrent-instances" max="16" />
            <Feature name="bitrate-modes" value="VBR,CBR" />
            <Feature name="intra-refresh" />
            <Feature name="video-minimum-quality" />
            <Limit name="performance-point-4096x2304" value="30" />
            <Limit name="performance-point-3840x2160" value="60" />
            <Limit name="performance-point-1920x1080" value="240" />
            <Limit name="performance-point-1280x720" value="480" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.encoder" type="video/hevc">
            <Alias name="OMX.qcom.video.encoder.hevc"/>
            <Limit name="size" min="128x128" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="1958400" />
            <Limit name="block-count" range="64-34816" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="complexity" range="0-100"  default="100" />
            <Limit name="concurrent-instances" max="16" />
            <Feature name="bitrate-modes" value="VBR,CBR" />
            <Feature name="intra-refresh" />
            <Feature name="video-minimum-quality" />
            <Limit name="performance-point-4096x2304" value="30" />
            <Limit name="performance-point-3840x2160" value="60" />
            <Limit name="performance-point-1920x1080" value="240" />
            <Limit name="performance-point-1280x720" value="480" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.encoder.cq" type="video/hevc">
            <Alias name="OMX.qcom.video.encoder.hevc.cq"/>
            <Limit name="size" min="128x128" max="512x512" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="20480" />
            <Limit name="bitrate" range="1-160000000" />
            <Limit name="frame-rate" range="1-20" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="quality" range="0-100" default="80" />
            <Feature name="bitrate-modes" value="CQ" />
            <Limit name="performance-point-512x512" value="2025" />
        </MediaCodec>
        <MediaCodec name="c2.qti.heic.encoder" type="image/vnd.android.heic">
            <Alias name="OMX.qcom.video.encoder.heic"/>
            <Limit name="size" min="512x512" max="16384x16384" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="3916800" />
            <Limit name="bitrate" range="1-160000000" />
            <Limit name="frame-rate" range="1-20" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="quality" range="0-100" default="80" />
            <Feature name="bitrate-modes" value="CQ" />
            <Limit name="performance-point-16384x8192" value="3" />
            <Limit name="performance-point-1920x1080" value="6" />
        </MediaCodec>
    </Encoders>
    <Include href="media_codecs_google_c2.xml" />
</MediaCodecs>
Redmi Note 7
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2012-2017, 2019 The Linux Foundation. All rights reserved.
     Not a contribution.
     Copyright (C) 2012-2013 The Android Open Source Project
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
          http://www.apache.org/licenses/LICENSE-2.0
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<!--
<!DOCTYPE MediaCodecs [
<!ELEMENT Include EMPTY>
<!ATTLIST Include href CDATA #REQUIRED>
<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
<!ELEMENT Decoders (MediaCodec|Include)*>
<!ELEMENT Encoders (MediaCodec|Include)*>
<!ELEMENT MediaCodec (Type|Quirk|Include)*>
<!ATTLIST MediaCodec name CDATA #REQUIRED>
<!ATTLIST MediaCodec type CDATA>
<!ELEMENT Type EMPTY>
<!ATTLIST Type name CDATA #REQUIRED>
<!ELEMENT Quirk EMPTY>
<!ATTLIST Quirk name CDATA #REQUIRED>
]>
There's a simple and a complex syntax to declare the availability of a
media codec:
A codec that properly follows the OpenMax spec and therefore doesn't have any
quirks and that only supports a single content type can be declared like so:
    <MediaCodec name="OMX.foo.bar" type="something/interesting" />
If a codec has quirks OR supports multiple content types, the following syntax
can be used:
    <MediaCodec name="OMX.foo.bar" >
        <Type name="something/interesting" />
        <Type name="something/else" />
        ...
        <Quirk name="requires-allocate-on-input-ports" />
        <Quirk name="requires-allocate-on-output-ports" />
        <Quirk name="output-buffers-are-unreadable" />
    </MediaCodec>
Only the three quirks included above are recognized at this point:
"requires-allocate-on-input-ports"
    must be advertised if the component does not properly support specification
    of input buffers using the OMX_UseBuffer(...) API but instead requires
    OMX_AllocateBuffer to be used.
"requires-allocate-on-output-ports"
    must be advertised if the component does not properly support specification
    of output buffers using the OMX_UseBuffer(...) API but instead requires
    OMX_AllocateBuffer to be used.
"output-buffers-are-unreadable"
    must be advertised if the emitted output buffers of a decoder component
    are not readable, i.e. use a custom format even though abusing one of
    the official OMX colorspace constants.
    Clients of such decoders will not be able to access the decoded data,
    naturally making the component much less useful. The only use for
    a component with this quirk is to render the output to the screen.
    Audio decoders MUST NOT advertise this quirk.
    Video decoders that advertise this quirk must be accompanied by a
    corresponding color space converter for thumbnail extraction,
    matching surfaceflinger support that can render the custom format to
    a texture and possibly other code, so just DON'T USE THIS QUIRK.
-->
<!--
  Non secure decoder capabilities for sdm660
   __________ _________________________________________
  | Codec    | W       H       fps     Mbps    MB/s    |
  |__________|_________________________________________|
  | hevc     | 3840    2160    30      100     972000  |
  | h264     | 3840    2160    30      100     972000  |
  | h263     |  864     480    30        2      48600  |
  | mpeg4    | 1920    1088    60       60     489600  |
  | mpeg2    | 1920    1088    30       40     244800  |
  | vc1      | 1920    1088    60       60     489600  |
  | vp8      | 3840    2160    30      100     972000  |
  | vp9      | 3840    2160    30      100     972000  |
  | divx3    |  720     480    30        2      40500  |
  | div4/5/6 | 1920    1088    30       10     244800  |
  |__________|_________________________________________|
  sdm660 secure decoder capabilities
   ______________________________________________________
 | Codec    | W       H       fps     Mbps    MB/s    |
 |__________|_________________________________________|
 | h264     | 3840    2160    30      35      972000 |
 | hevc     | 3840    2160    30      35      972000 |
 | VP9      | 3840    2160    30      35      979200  |
 | vc1      | 1920    1088    30      20      489600  |
 | mpeg2    | 1920    1088    30      20      244800  |
 |__________|_________________________________________|
-->
<!--
  Encoder capabilities for sdm660
   ____________________________________________________
  | Codec    | W       H       fps     Mbps    MB/s    |
  |__________|_________________________________________|
  | hevc     | 3840    2160    30      100     972000  |
  | h264     | 3840    2160    30      100     972000  |
  | h263     |  864     480    30        2      48600  |
  | mpeg4    | 1920    1088    30       40     244800  |
  | vp8      | 1920    1088    30       40     244800  |
  |____________________________________________________|
-->
<MediaCodecs>
    <Include href="media_codecs_google_audio.xml" />
    <Include href="media_codecs_google_telephony.xml" />
    <Settings>
        <Setting name="max-video-encoder-input-buffers" value="11" />
    </Settings>
    <Encoders>
        <!-- Video Hardware  -->
        <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Quirk name="requires-loaded-to-idle-after-allocation" />
            <Limit name="size" min="176x64" max="3840x2160" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="concurrent-instances" max="16" />
            <Feature name="intra-refresh" />
            <Limit name="performance-point-3840x2160" value="24" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Quirk name="requires-loaded-to-idle-after-allocation" />
            <Limit name="size" min="96x96" max="3840x2160" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="concurrent-instances" max="16" />
            <Feature name="intra-refresh" />
            <Feature name="can-swap-width-height" />
            <Limit name="performance-point-3840x2160" value="24" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Quirk name="requires-loaded-to-idle-after-allocation" />
            <Limit name="size" min="96x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="244800" />
            <Limit name="bitrate" range="1-40000000" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-1920x1088" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Quirk name="requires-loaded-to-idle-after-allocation" />
            <Limit name="size" min="96x64" max="864x480" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="48600" />
            <Limit name="bitrate" range="1-2000000" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-720x480" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Quirk name="requires-loaded-to-idle-after-allocation" />
            <Limit name="size" min="96x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="244800" />
            <Limit name="bitrate" range="1-40000000" />
            <Limit name="concurrent-instances" max="16" />
            <Feature name="intra-refresh" />
            <Limit name="performance-point-1920x1088" value="30" />
        </MediaCodec>
    </Encoders>
    <Decoders>
        <!-- Video Hardware  -->
        <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="3840x2160" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-100000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Feature name="can-swap-width-height" />
            <Limit name="performance-point-3840x2160" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="3840x2160" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-35000000" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Limit name="concurrent-instances" max="6" />
            <Limit name="performance-point-3840x2160" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="244800" />
            <Limit name="bitrate" range="1-40000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-1920x1088" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="244800" />
            <Limit name="bitrate" range="1-20000000" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Limit name="concurrent-instances" max="6" />
            <Limit name="performance-point-1920x1088" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="489600" />
            <Limit name="bitrate" range="1-60000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-1920x1088" value="60" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="864x480" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="48600" />
            <Limit name="bitrate" range="1-2000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-720x480" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.vc1" type="video/x-ms-wmv" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="489600" />
            <Limit name="bitrate" range="1-60000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-1920x1088" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.vc1.secure" type="video/x-ms-wmv" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="489600" />
            <Limit name="bitrate" range="1-20000000" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Limit name="concurrent-instances" max="7" />
            <Limit name="performance-point-1920x1088" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.divx" type="video/divx" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="244800" />
            <Limit name="bitrate" range="1-10000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-1920x1088" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.divx311" type="video/divx311" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="720x480" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="40500" />
            <Limit name="bitrate" range="1-2000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-720x480" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.divx4" type="video/divx4" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="244800" />
            <Limit name="bitrate" range="1-10000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-1920x1088" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="3840x2160" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-100000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-3840x2160" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="3840x2160" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-100000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-3840x2160" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="3840x2160" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="979200" />
            <Limit name="bitrate" range="1-35000000" />
            <Limit name="frame-rate" range="1-30" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Limit name="concurrent-instances" max="6" />
            <Limit name="performance-point-3840x2160" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="3840x2160" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-100000000" />
            <Feature name="adaptive-playback" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-3840x2160" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
            <Limit name="size" min="64x64" max="3840x2160" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-35000000" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Limit name="concurrent-instances" max="6" />
            <Limit name="performance-point-3840x2160" value="30" />
        </MediaCodec>
        <MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
    </Decoders>
    <Include href="media_codecs_google_video.xml" />
</MediaCodecs>
 
		86. 
@老虎会游泳,我们之前在这里讨论过WSL2。
我已经用了很长一段时间WSL2了,但是经常发现电脑风扇有时会突然猛转,一查才发现WSL2莫名其妙自己启动了;以及有段时间很多天我根本没有使用过WSL2,Windows11的开始菜单的新添加的项目列表里会突然出现WSL2里的某个软件,似乎是WSL2内的软件自动更新了。
不知道你有没有遇到这些情况。我感觉这样的情况给我带来一种很不可控的感受,就完全卸载关闭了WSL2功能,改用VMWare内安装虚拟机完成Linux相关的任务
 
		87. 
@tasy5kg,我最近只用Windows玩游戏看视频,没有使用WSL2。不过我的WSL2好像没有自启动的征兆。