找到71个回复 (用户: tasy5kg)
  • 附上一张好评墙,衷心感谢大家对 小萌GIF 的夸赞~
    img11.webp(145.11 KB)
  • 2024年,将相册里的视频压缩为AV1编码
    12058点击 / 02-07 12:14发布 / 02-16 21:48回复 / /

    @你又来了呀,使用 -c:v copy 时,无法精确地控制剪辑时间点

  • 2024年,将相册里的视频压缩为AV1编码
    12058点击 / 02-07 12:14发布 / 02-16 19:50回复 / /
    @小候鸟,你在使用什么网盘储存自己拍摄的照片和视频
  • 2024年,将相册里的视频压缩为AV1编码
    12058点击 / 02-07 12:14发布 / 02-09 05:25回复 / /
    @无名啊,回复8楼,我研究了下,目前动态照片各个厂商的具体实现细节略有差异,但没有用 Motion JPEG做的,都是单帧jpg+mp4文件拼接(h264或h265均有)。

    小米和谷歌的动态照片的文件结构是,前面的字节流是正常的一帧的jpg高清照片,尾部直接拼接一个mp4文件,mp4文件的偏移地址在jpg文件的元数据里保存;

    三星的动态照片的文件结构是,一个正常的一帧jpg高清照片,在照片的元数据内,嵌入了一个mp4视频二进制。

    这里有一个bash脚本,它直接查找文件中mp4格式头标识"ftypmp42",提取动态照片中的mp4视频:https://github.com/keith-turner/motion-photos/blob/master/mvimg_jpg_extract.sh
  • 2024年,将相册里的视频压缩为AV1编码
    12058点击 / 02-07 12:14发布 / 02-08 17:11回复 / /
    @无名啊,HEIF不能与动态照片同时开启。libsvtav1只支持yuv420p和yuv420p10le像素格式
  • 2024年,将相册里的视频压缩为AV1编码
    12058点击 / 02-07 12:14发布 / 02-07 16:28回复 / /
    @无名啊,你可以用K40开启动态照片拍照试试,拍出来是一个大分辨率的图像+较低分辨率的视频
  • 2024年,将相册里的视频压缩为AV1编码
    12058点击 / 02-07 12:14发布 / 02-07 14:49回复 / /
    @无名啊,我手机拍了很多动态照片(jpg格式但包含一小段视频),如果当做正常图片压缩,视频会丢失,所以暂时舍不得压缩
  • 【楼主删除了该帖】
    78点击 / 02-07 03:26发布 / 02-07 11:09回复 / /
    帖子暂时删除,待补充内容后重发
  • 我用hu60实现了简单的积分功能
    1983点击 / 01-21 09:14发布 / 01-21 15:18回复 / /
    虎绿林没有积分、没有等级、没有回复可见、没有未登录不能下载……用户可以自行删帖、沉贴、结贴、移版,用户可以随时更改用户名——和虎绿林的程序一样,虎绿林的用户也是自由的。
    ——老虎会游泳,2013年7月12日
  • 【楼主删除了该帖】
    1998点击 / 2023-12-02发布 / 2023-12-03回复 / /
    http://https//nft.storage/faq/ 这个链接502啊
  • @老虎会游泳,我们之前在这里讨论过WSL2。

    我已经用了很长一段时间WSL2了,但是经常发现电脑风扇有时会突然猛转,一查才发现WSL2莫名其妙自己启动了;以及有段时间很多天我根本没有使用过WSL2,Windows11的开始菜单的新添加的项目列表里会突然出现WSL2里的某个软件,似乎是WSL2内的软件自动更新了。

    不知道你有没有遇到这些情况。我感觉这样的情况给我带来一种很不可控的感受,就完全卸载关闭了WSL2功能,改用VMWare内安装虚拟机完成Linux相关的任务
  • @童真再见,最新的12.5.7
  • 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休眠之后,仍然在持续消耗电量
    44238点击 / 2022-11-26发布 / 2023-07-16回复 / /
    @无名啊,回复14楼,今天发现可能是集成显卡把内存挤爆了,而集成显卡消耗的内存在进程页面不会显示,所以导致了进程页面总共只有很少的内存使用,总内存却被耗尽的情况,并导致 System 进程不断往硬盘写入虚拟内存
    屏幕截图 2023-07-16 033608.png(90.58 KB)