Mac M1 处理器的FFMPEG转码性能

与 M1 Pro 2021 MacBook 14″ 相比,较旧且速度较慢的 M1 MacMini 目前在使用最新和相同版本的 HandBrake 或 FFmpeg(为 VideoToolBox 带有 M1 补丁)的相同任务上快 2 到 2.5 倍

这是使用时的结果用于硬件加速的 VideoToolBox 编码器(H264 和 HEVC)

MacMini – M1 配备 8GB RAM / 256GB SSD
MacBook Pro 14″ – 16GB RAM / 512GB SSD

似乎需要为 M1 Pro 完成一些优化或指令补丁(和 M1 Max)与 M1 相比。刚刚发现有趣的是,该处理管道中的某些内容有所不同,并且需要显式更改代码,这似乎与正常工作相比。

(是的,我知道 VideoToolBox 编码的质量/大小效率与 x264 / x265 软件非硬件加速库不同 – 但出于我的目的,我更喜欢使用 VideoToolBox 节省时间)。

/usr/bin/time ffmpeg -y -loglevel error -stats \​-ss 0:00:03 -to 0:00:33 \​-i 2_test.mov \​-map 0:0 \​-filter:v eq=saturation=1.1:gamma=1.6,yadif,scale=w=-2:h=720 \​-c:v h264_videotoolbox -b:v 5000k \​-color_primaries:v bt709 -color_trc:v bt709 -colorspace:v bt709 \​-aspect 4:3 \​-map 0:1 -c:a:0 aac_at -aac_at_mode:a:0 cvbr -ar:a:0 48000 \​-sn \​-movflags disable_chpl \​-movflags +faststart \​2_test.mp4​
Result from 2021 14″ MacBook Pro w/ M1 Pro 16GB RAM / 512GB SSD
frame= 900 fps=150 q=-0.0 Lsize= 18829kB time=00:00:30.03 bitrate=5135.3kbits/s speed=5.01x
6.04 real

Result from 2020 Mac Mini M1 8GB RAM / 256GB SSD
frame= 900 fps=395 q=-0.0 Lsize= 18819kB time=00:00:30.03 bitrate=5132.7kbits/s speed=13.2x
2.33 real

Above holds up to same numbers even without the -ss -to options and letting it encode the full .MOV (DV) file.

Command issued on both against a MOV file with Mediainfo of the following:
Video​ID : 1​Format : DV​Commercial name : DVCPRO​Codec ID : dvc​Duration : 7 min 38 s​Bit rate mode : Constant​Bit rate : 24.4 Mb/s​Width : 720 pixels​Height : 480 pixels​Display aspect ratio : 4:3​Frame rate mode : Constant​Frame rate : 29.970 (30000/1001) FPS​Original frame rate : 29.970 (29970/1000) FPS​Standard : NTSC​Color space : YUV​Chroma subsampling : 4:1:1​Bit depth : 8 bits​Scan type : Interlaced​Scan order : Bottom Field First​

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注