是的,楼上说得对,你需要选一个硬件编码器
比如我的电脑上
```
➜ projects ffmpeg -codecs|grep videotoo
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
configuration: ****
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (encoders: libx264 libx264rgb h264_videotoolbox )
DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (encoders: libx265 hevc_videotoolbox )
DEVIL. prores Apple ProRes (iCodec Pro) (encoders: prores prores_aw prores_ks prores_videotoolbox )
➜ projects jenv
➜ projects ffmpeg -i sss.wmv -c:v hevc_videotoolbox -b:v 5000k -c:a aac sss.mp4
```
可用的 videotoolbox ( 这应该是 apple 视频编码的 api ) encoder 有 这三个
选 一个就行
也可以按目标编码看
```
➜ projects ffmpeg -codecs|grep hevc
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
configuration: ****
.......
DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (encoders: libx265 hevc_videotoolbox )
```
一般
*_videotoolbox 是 mac 平台的编码器, *_qsv 是 intel 核显的编码器, *_nvenc, *_cuda 是 nv 的硬件编码器,libx265 是软件编码器