找到120个回复 (用户: tasy5kg)
  • 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>
  • 又在旧手机 Redmi Note 7 上尝试了,上方的 cq 模式同样报错,vbr 模式的命令行去掉-pix_fmt yuv420p后可正常执行,速度在 0.38x 左右。低码率时一些帧会出现绿色马赛克。

  • @无名啊@老虎会游泳,在红米 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 左右。

    转码效果:
    1.jpg(1.07 MB)
    2.jpg(1.03 MB)
    3.jpg(1.01 MB)
    4.jpg(1.01 MB)
    5.jpg(1 MB)
    6.jpg(1 MB)

    总结,性能快,但是 cq 模式不可用,没有类似 crf 和 preset 的选项。

  • @无名啊,dwing 是什么意思
  • @无名啊,可能那个视频已经被妥善压缩过了。我用默认参数压缩的手机拍摄的 4K60FPS 视频,体积从 104MB 压缩至 5MB,但画质大幅降低了。

    我也没找到比较完整的帮助文档,只找到了这个:

    ~ $ ffmpeg -hide_banner -h encoder=hevc_mediacodec Encoder hevc_mediacodec [H.265 Android MediaCodec encoder]: General capabilities: dr1 delay hardware Threading capabilities: none Supported hardware devices: mediacodec Supported pixel formats: mediacodec yuv420p nv12 hevc_mediacodec AVOptions: -ndk_codec <boolean> E..V....... Use MediaCodec from NDK (default auto) -codec_name <string> E..V....... Select codec by name -bitrate_mode <int> E..V....... Bitrate control method (from -1 to INT_MAX) (default -1) cq 0 E..V....... Constant quality mode vbr 1 E..V....... Variable bitrate mode cbr 2 E..V....... Constant bitrate mode cbr_fd 3 E..V....... Constant bitrate mode with frame drops -pts_as_dts <boolean> E..V....... Use PTS as DTS. It is enabled automatically if avctx max_b_frames <= 0, since most of Android devices don't output B frames by default. (default auto) -level <int> E..V....... Specify tier and level (from 0 to INT_MAX) (default 0) m1 1 E..V....... Main tier level 1 h1 2 E..V....... High tier level 1 m2 4 E..V....... Main tier level 2 h2 8 E..V....... High tier level 2 m2.1 16 E..V....... Main tier level 2.1 h2.1 32 E..V....... High tier level 2.1 m3 64 E..V....... Main tier level 3 h3 128 E..V....... High tier level 3 m3.1 256 E..V....... Main tier level 3.1 h3.1 512 E..V....... High tier level 3.1 m4 1024 E..V....... Main tier level 4 h4 2048 E..V....... High tier level 4 m4.1 4096 E..V....... Main tier level 4.1 h4.1 8192 E..V....... High tier level 4.1 m5 16384 E..V....... Main tier level 5 h5 32768 E..V....... High tier level 5 m5.1 65536 E..V....... Main tier level 5.1 h5.1 131072 E..V....... High tier level 5.1 m5.2 262144 E..V....... Main tier level 5.2 h5.2 524288 E..V....... High tier level 5.2 m6 1048576 E..V....... Main tier level 6 h6 2097152 E..V....... High tier level 6 m6.1 4194304 E..V....... Main tier level 6.1 h6.1 8388608 E..V....... High tier level 6.1 m6.2 16777216 E..V....... Main tier level 6.2 h6.2 33554432 E..V....... High tier level 6.2
  • @无名啊@老虎会游泳,今天在 Termux 里更新了 FFmpeg 6.0 后,发现 Android 硬件加速的 H.264 和 HEVC 编码器已经可用:

    1000014096.jpg(155.63 KB)

    实测用 hevc_mediacodec 转码一段手机拍摄好的 4K60帧视频成功:

    $ ffmpeg -hwaccel mediacodec -an -i /storage/emulated/0/DCIM/Camera/VID_20230725_194612.mp4 -c:v hevc_mediacodec /storage/emulated/0/DCIM/Camera/VID_20230725_194612_test.mp4
    
    ......
    
    frame= 1001 fps=106 q=-0.0 Lsize=    4558kB time=00:00:16.66 bitrate=2240.6kbits/s speed=1.76x
    video:4553kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.109314%
    

    但可能是因为我转码时没有调节参数,视频画质比较模糊。

  • 【楼主删除了该帖】
    263点击 / 2023-07-28发布 / 2023-07-29回复 / /
    @森森,软件看起来功能很不错,但如果能附带一些使用截图或录屏会更有吸引力
  • Windows11休眠之后,仍然在持续消耗电量
    187227点击 / 2022-11-26发布 / 2023-07-16回复 / /
    @无名啊,回复14楼,今天发现可能是集成显卡把内存挤爆了,而集成显卡消耗的内存在进程页面不会显示,所以导致了进程页面总共只有很少的内存使用,总内存却被耗尽的情况,并导致 System 进程不断往硬盘写入虚拟内存
    屏幕截图 2023-07-16 033608.png(90.58 KB)
  • FFmpeg 的 -shortest 为啥不生效?
    136365点击 / 2023-04-01发布 / 2023-04-01回复 / /
    @无名啊,没有遇到过
  • 批量加密文件的软件有哪些,,,
    133490点击 / 2023-02-08发布 / 2023-02-11回复 / /
    @乄杺,压缩软件有压缩每个文件为单独的压缩包的选项
  • 批量加密文件的软件有哪些,,,
    133490点击 / 2023-02-08发布 / 2023-02-11回复 / /
    7zip满足你的所有需求
  • 上下文:
    #无名啊,FFmpeg据说6.0版要官方支持Android硬件编码了,期待一下
    (tasy5kg 02-08 18:08:03)
  • Windows11休眠之后,仍然在持续消耗电量
    187227点击 / 2022-11-26发布 / 2022-11-27回复 / /

    @deed

    此系统上有以下睡眠状态:
        待机 (S0 低电量待机) 连接的网络
        休眠
        快速启动
    
    此系统上没有以下睡眠状态:
        待机 (S1)
            系统固件不支持此待机状态。
            当支持 S0 低电量待机时,禁用此待机状态。
    
        待机 (S2)
            系统固件不支持此待机状态。
            当支持 S0 低电量待机时,禁用此待机状态。
    
        待机 (S3)
            系统固件不支持此待机状态。
            当支持 S0 低电量待机时,禁用此待机状态。
    
        混合睡眠
            待机(S3)不可用。
            虚拟机监控程序不支持此待机状态。
    
  • Windows11休眠之后,仍然在持续消耗电量
    187227点击 / 2022-11-26发布 / 2022-11-26回复 / /

    @无名啊,内存泄漏可以使用 RamMap 这个工具。当出现内存泄漏后,逐一点击 Empty 中的5个选项,即可重获泄漏的内存。

  • Windows11休眠之后,仍然在持续消耗电量
    187227点击 / 2022-11-26发布 / 2022-11-26回复 / /
    @无名啊,Win7有时也有这种现象,我当时也遇到过,但可能当时电脑内存本来就很小,所以不那么明显
  • Windows11休眠之后,仍然在持续消耗电量
    187227点击 / 2022-11-26发布 / 2022-11-26回复 / /
    @无名啊,实际使用时,如果不开任务管理器,没有什么感知。

    但我总是遇到内存泄露的问题。所有进程的内存总量加起来才8G左右,但任务管理器显示内存已使用15G
  • Windows11休眠之后,仍然在持续消耗电量
    187227点击 / 2022-11-26发布 / 2022-11-26回复 / /
    @无名啊,嗯
  • Windows11休眠之后,仍然在持续消耗电量
    187227点击 / 2022-11-26发布 / 2022-11-26回复 / /
    @老虎会游泳,我又查了下电源日志,电源日志显示我今天开机之前,电脑是处于休眠状态的,然后在我按电源键时异常关机。
    image.png(131.65 KB)

    之所以休眠状态的数据会丢失,是因为我按下电源键时,电量过低,导致开机过程中断电,启动失败,所以休眠状态的数据就被丢弃了。

    看来以后用笔记本电脑,也要先插电源再开机;休眠也不再可靠,得先保存数据再休眠。
  • Windows11休眠之后,仍然在持续消耗电量
    187227点击 / 2022-11-26发布 / 2022-11-26回复 / /
    @老虎会游泳,Windows的活动时间最长只能设置18小时,不可以设为全天。

    我已经手动开启了休眠,并且设置了低电量自动休眠,正常情况下,不会耗尽电量且自动关机。
    image.png(182.45 KB)

    我笔记本一直插着无线鼠标的接收器,或许是这个原因。之后我试试把接收器拔掉,看休眠还会不会掉电。虽然之前已经开启了允许关闭电源节能。
    image.png(32.92 KB)
  • Windows11休眠之后,仍然在持续消耗电量
    187227点击 / 2022-11-26发布 / 2022-11-26回复 / /
    @老虎会游泳,嗯,你可以看到截图中睡眠时长一栏是空的。我已经遇到几次这种情况了,导致未保存的文件丢失