[FFmpeg-user] FFmpeg on Apple Silicon (Preliminary Results)
Steven Kan
steven at kan.org
Fri Oct 29 22:52:41 EEST 2021
Hmmm. Perhaps no one cares about ffmpeg on Apple Silicon but me! But I care, so I bought myself a used M1 mini, and here are some not-very-scientific results. I “installed” ffmpeg 4.4 on my M1 by downloading a precompiled build from OSXExperts:
https://www.osxexperts.net
Running a slightly older build on my Intel box (N-102535-g6ff2aba088-tessus)
I took a 06:15 length, 2560 x 1440, ~300 MB MP4 from one of my security cameras:
https://www.kan.org/download/StairClimb20x.mp4
and sped it up 20x with:
-filter:v "setpts=0.5*PTS" -an
on both my 2014 MacBook Pro (2.8 GHz Intel Core i7/Intel Iris Pro 1536 MB and NVIDIA GeForce GT 750M 2 GB) and on my new 2020 Mac Mini (4 performance cores, 4 efficiency cores, 8 M1 GPU cores), both with and without invoking -vcodec h264_videotoolbox or hevc_videotoolbox:
https://www.youtube.com/watch?v=Ul5foCMrvR4
(uploaded from an Intel/no toolbox run)
Executive Summary:
Intel, no toolbox: 0.736x
Intel, h264_videotoolbox, 4.23x
Intel, hevc_videotoolbox, failed with "The hardware encoder may be busy, or not supported"
M1, no toolbox, 2.61x
M1, h264_videotoolbox: 6.74x
M1, hevc_videotoolbox, 7.42x
On my Intel machine, h264_videotoolbox increases the processing speed by 4.23 /0.736 = 5.7x.
On my M1 machine, h264_videotoolbox increases the processing speed by 6.74 / 2.61 = 2.58x.
On M1, hevc vs h264 is 7.42 / 6.74 = 1.1x faster
M1 hevc vs. Intel sw only is > 10x faster.
M1 vs Intel, software only, is 2.61 / 0.736 = 3.55x faster.
Fastest option available on each, e.g. M1 w/hevc_videotoolbox vs. Intel w/h264_videotoolbox = 7.42 / 4.23 = 1.75x, which is a bit disappointing based on all the hoopla I’d read about the M1.
“top” suggests that neither machine is CPU-bound when the hardware encoders are invoked.See screenshots, linked below.
Or maybe ffmpeg isn’t fully optimized for M1 yet. Or I’m comparing an embedded GPU to a discrete GPU. Any ideas or opinions on this? Anyone have an M1 Pro or M1 Max machine to compare?
Next step is to try assembling 2Up video in real-time and see how the CPU does.
Detailed results:
Intel, no toolbox:
https://www.kan.org/pictures/ffmpegIntel.png
ffmpeg -i /Users/steven/Downloads/StairClimb20x.mp4 -filter:v "setpts=0.5*PTS" -an /Users/steven/Downloads/StairClimb20x20x.mp4
ffmpeg version N-102535-g6ff2aba088-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 1.100 / 59. 1.100
libavformat 59. 2.100 / 59. 2.100
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.101 / 8. 0.101
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100
[h264 @ 0x7fa50ff00300] error while decoding MB 159 89, bytestream -5
[h264 @ 0x7fa50ff00300] concealing 50 DC, 50 AC, 50 MV errors in I frame
[h264 @ 0x7fa50ff00300] error while decoding MB 159 89, bytestream -7
[h264 @ 0x7fa50ff00300] concealing 50 DC, 50 AC, 50 MV errors in P frame
<those errors repeated a few thousand times>
frame= 2734 fps= 11 q=-1.0 Lsize= 174691kB time=00:03:07.26 bitrate=7641.8kbits/s dup=0 drop=2879 speed=0.736x
video:174669kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.013107%
[libx264 @ 0x7fae53d05700] frame I:11 Avg QP:17.36 size:813954
[libx264 @ 0x7fae53d05700] frame P:2043 Avg QP:20.41 size: 78970
[libx264 @ 0x7fae53d05700] frame B:680 Avg QP:25.59 size: 12605
[libx264 @ 0x7fae53d05700] consecutive B-frames: 66.2% 1.2% 1.9% 30.7%
[libx264 @ 0x7fae53d05700] mb I I16..4: 3.2% 85.2% 11.6%
[libx264 @ 0x7fae53d05700] mb P I16..4: 0.2% 1.0% 0.2% P16..4: 38.6% 11.1% 8.8% 0.0% 0.0% skip:40.1%
[libx264 @ 0x7fae53d05700] mb B I16..4: 0.0% 0.4% 0.1% B16..8: 21.9% 1.6% 0.4% direct: 1.5% skip:74.0% L0:49.8% L1:43.6% BI: 6.7%
[libx264 @ 0x7fae53d05700] 8x8 transform intra:74.3% inter:67.8%
[libx264 @ 0x7fae53d05700] coded y,uvDC,uvAC intra: 75.2% 79.7% 38.0% inter: 19.7% 28.9% 5.0%
[libx264 @ 0x7fae53d05700] i16 v,h,dc,p: 35% 20% 28% 18%
[libx264 @ 0x7fae53d05700] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 12% 25% 5% 7% 7% 8% 7% 8%
[libx264 @ 0x7fae53d05700] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 15% 15% 7% 8% 8% 8% 8% 7%
[libx264 @ 0x7fae53d05700] i8c dc,h,v,p: 53% 17% 21% 9%
[libx264 @ 0x7fae53d05700] Weighted P-Frames: Y:0.8% UV:0.2%
[libx264 @ 0x7fae53d05700] ref P L0: 81.7% 8.5% 7.2% 2.7% 0.0%
[libx264 @ 0x7fae53d05700] ref B L0: 94.9% 3.1% 2.1%
[libx264 @ 0x7fae53d05700] ref B L1: 96.8% 3.2%
[libx264 @ 0x7fae53d05700] kb/s:7632.40
Intel, using toolbox:
https://www.kan.org/pictures/ffmpegIntel_h264_videotoolbox.png
ffmpeg -i /Users/steven/Downloads/StairClimb20x.mp4 -vcodec h264_videotoolbox -filter:v "setpts=0.5*PTS" -an /Users/steven/Downloads/StairClimb20x20x.mp4
ffmpeg version N-102535-g6ff2aba088-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 1.100 / 59. 1.100
libavformat 59. 2.100 / 59. 2.100
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.101 / 8. 0.101
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100
[h264 @ 0x7f8647e04bc0] error while decoding MB 159 89, bytestream -5
[h264 @ 0x7f8647e04bc0] concealing 50 DC, 50 AC, 50 MV errors in I frame
[h264 @ 0x7f8647e04bc0] error while decoding MB 159 89, bytestream -7
[h264 @ 0x7f8647e04bc0] concealing 50 DC, 50 AC, 50 MV errors in P frame
<those errors repeated a few thousand times>
frame= 2734 fps= 62 q=-0.0 Lsize= 14405kB time=00:03:07.33 bitrate= 629.9kbits/s dup=0 drop=2879 speed=4.23x
video:14373kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.223935%
M1, no toolbox:
https://www.kan.org/pictures/ffmpegM1.png
ffmpeg -i /Users/steven/Desktop/StairClimb20x.mp4 -filter:v "setpts=0.5*PTS" -an /Users/steven/Desktop/StairClimb20x20x.mp4
ffmpeg -i /Users/steven/Desktop/StairClimb20x.mp4 -filter:v "setpts=0.5*PTS" -an /Users/steven/Desktop/StairClimb20x20x.mp4
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.27)
configuration: --prefix=/Volumes/tempdisk/sw --extra-cflags=-fno-stack-check --arch=arm64 --cc=/usr/bin/clang --enable-gpl --enable-videotoolbox --enable-libopenjpeg --enable-libopus --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libwebp --enable-libass --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libsnappy --enable-libaom --enable-libvidstab --enable-libzimg --enable-libsvtav1 --enable-version3 --pkg-config-flags=--static --disable-ffplay --enable-postproc --enable-nonfree --enable-neon --enable-runtime-cpudetect --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[h264 @ 0x156809200] cabac decode of qscale diff failed at 159 89
[h264 @ 0x156809200] error while decoding MB 159 89, bytestream -2
[h264 @ 0x156809200] concealing 50 DC, 50 AC, 50 MV errors in P frame
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/steven/Desktop/StairClimb20x.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Duration: 00:06:14.72, start: 0.000000, bitrate: 6378 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2560x1440, 6294 kb/s, 14.98 fps, 14.58 tbr, 90k tbn, 180k tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 81 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[h264 @ 0x157012600] cabac decode of qscale diff failed at 159 89
[h264 @ 0x157012600] error while decoding MB 159 89, bytestream -2
[h264 @ 0x157012600] concealing 50 DC, 50 AC, 50 MV errors in P frame
[libx264 @ 0x15700e600] using cpu capabilities: ARMv8 NEON
[libx264 @ 0x15700e600] profile High, level 5.0, 4:2:0, 8-bit
[libx264 @ 0x15700e600] 264 - core 161 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=14 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/Users/steven/Desktop/StairClimb20x20x.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.76.100
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 2560x1440, q=2-31, 14.58 fps, 11200 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc58.134.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
/Users/steven/Desktop/StairClimb20x.mp4: corrupt decoded frame in stream 0ed= 0x
[h264 @ 0x157012000] cabac decode of qscale diff failed at 155 89
[h264 @ 0x157012000] error while decoding MB 155 89, bytestream -1
[h264 @ 0x157012000] concealing 54 DC, 54 AC, 54 MV errors in P frame
/Users/steven/Desktop/StairClimb20x.mp4: corrupt decoded frame in stream 0
[h264 @ 0x157012000] error while decoding MB 156 89, bytestream -6
[h264 @ 0x157012000] concealing 53 DC, 53 AC, 53 MV errors in P frame
[h264 @ 0x157012600] error while decoding MB 159 89, bytestream -5
<those errors repeated a few thousand times>
frame= 2734 fps= 38 q=-1.0 Lsize= 174700kB time=00:03:07.26 bitrate=7642.2kbits/s dup=0 drop=2879 speed=2.61x
video:174677kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.013116%
[libx264 @ 0x15700e600] frame I:11 Avg QP:17.36 size:813550
[libx264 @ 0x15700e600] frame P:2040 Avg QP:20.41 size: 79071
[libx264 @ 0x15700e600] frame B:683 Avg QP:25.58 size: 12614
[libx264 @ 0x15700e600] consecutive B-frames: 66.1% 1.2% 1.9% 30.9%
[libx264 @ 0x15700e600] mb I I16..4: 3.2% 85.3% 11.4%
[libx264 @ 0x15700e600] mb P I16..4: 0.2% 0.9% 0.2% P16..4: 38.7% 11.1% 8.8% 0.0% 0.0% skip:40.1%
[libx264 @ 0x15700e600] mb B I16..4: 0.0% 0.4% 0.1% B16..8: 21.9% 1.6% 0.4% direct: 1.5% skip:74.0% L0:49.7% L1:43.6% BI: 6.7%
[libx264 @ 0x15700e600] 8x8 transform intra:74.2% inter:67.7%
[libx264 @ 0x15700e600] coded y,uvDC,uvAC intra: 75.0% 79.5% 38.0% inter: 19.7% 29.0% 5.0%
[libx264 @ 0x15700e600] i16 v,h,dc,p: 34% 20% 27% 18%
[libx264 @ 0x15700e600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 12% 27% 5% 7% 7% 8% 7% 8%
[libx264 @ 0x15700e600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 14% 16% 7% 8% 8% 8% 7% 7%
[libx264 @ 0x15700e600] i8c dc,h,v,p: 53% 17% 21% 9%
[libx264 @ 0x15700e600] Weighted P-Frames: Y:0.8% UV:0.2%
[libx264 @ 0x15700e600] ref P L0: 81.6% 8.5% 7.2% 2.7% 0.0%
[libx264 @ 0x15700e600] ref B L0: 94.9% 3.1% 2.1%
[libx264 @ 0x15700e600] ref B L1: 96.8% 3.2%
[libx264 @ 0x15700e600] kb/s:7632.77
M1, using h264_videotoolbox:
https://www.kan.org/pictures/ffmpegM1_h264_videotoolbox.png
ffmpeg -i /Users/steven/Desktop/StairClimb20x.mp4 -vcodec h264_videotoolbox -filter:v "setpts=0.5*PTS" -an /Users/steven/Desktop/StairClimb20x20x.mp4
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.27)
configuration: --prefix=/Volumes/tempdisk/sw --extra-cflags=-fno-stack-check --arch=arm64 --cc=/usr/bin/clang --enable-gpl --enable-videotoolbox --enable-libopenjpeg --enable-libopus --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libwebp --enable-libass --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libsnappy --enable-libaom --enable-libvidstab --enable-libzimg --enable-libsvtav1 --enable-version3 --pkg-config-flags=--static --disable-ffplay --enable-postproc --enable-nonfree --enable-neon --enable-runtime-cpudetect --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[h264 @ 0x13d80b600] cabac decode of qscale diff failed at 159 89
[h264 @ 0x13d80b600] error while decoding MB 159 89, bytestream -2
[h264 @ 0x13d80b600] concealing 50 DC, 50 AC, 50 MV errors in P frame
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/steven/Desktop/StairClimb20x.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Duration: 00:06:14.72, start: 0.000000, bitrate: 6378 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2560x1440, 6294 kb/s, 14.98 fps, 14.58 tbr, 90k tbn, 180k tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 81 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
File '/Users/steven/Desktop/StairClimb20x20x.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_videotoolbox))
Press [q] to stop, [?] for help
[h264 @ 0x12d00b600] cabac decode of qscale diff failed at 159 89
[h264 @ 0x12d00b600] error while decoding MB 159 89, bytestream -2
[h264 @ 0x12d00b600] concealing 50 DC, 50 AC, 50 MV errors in P frame
Output #0, mp4, to '/Users/steven/Desktop/StairClimb20x20x.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.76.100
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 2560x1440, q=2-31, 200 kb/s, 14.58 fps, 11200 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc58.134.100 h264_videotoolbox
[h264_videotoolbox @ 0x13d81d400] Color range not set for yuv420p. Using MPEG range.
/Users/steven/Desktop/StairClimb20x.mp4: corrupt decoded frame in stream 0ed= 0x
[h264 @ 0x12d00b000] cabac decode of qscale diff failed at 155 89
[h264 @ 0x12d00b000] error while decoding MB 155 89, bytestream -1
[h264 @ 0x12d00b000] concealing 54 DC, 54 AC, 54 MV errors in P frame
/Users/steven/Desktop/StairClimb20x.mp4: corrupt decoded frame in stream 0
[h264 @ 0x12d00b000] error while decoding MB 156 89, bytestream -6
[h264 @ 0x12d00b000] concealing 53 DC, 53 AC, 53 MV errors in P frame
[h264 @ 0x12d00b600] error while decoding MB 159 89, bytestream -5
[h264 @ 0x12d00b600] concealing 50 DC, 50 AC, 50 MV errors in P frame
<errors repeated>
frame= 2734 fps= 98 q=-0.0 Lsize= 15274kB time=00:03:07.33 bitrate= 667.9kbits/s dup=0 drop=2879 speed=6.74x
video:15240kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.222530%
M1, using hevc_videotoolbox:
https://www.kan.org/pictures/ffmpegM1_hevc_videotoolbox.png
ffmpeg -i /Users/steven/Desktop/StairClimb20x.mp4 -vcodec hevc_videotoolbox -filter:v "setpts=0.5*PTS" -an /Users/steven/Desktop/StairClimb20x20x.mp4
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.27)
configuration: --prefix=/Volumes/tempdisk/sw --extra-cflags=-fno-stack-check --arch=arm64 --cc=/usr/bin/clang --enable-gpl --enable-videotoolbox --enable-libopenjpeg --enable-libopus --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libwebp --enable-libass --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libsnappy --enable-libaom --enable-libvidstab --enable-libzimg --enable-libsvtav1 --enable-version3 --pkg-config-flags=--static --disable-ffplay --enable-postproc --enable-nonfree --enable-neon --enable-runtime-cpudetect --disable-indev=qtkit --disable-indev=x11grab_xcb
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[h264 @ 0x12d80b600] cabac decode of qscale diff failed at 159 89
[h264 @ 0x12d80b600] error while decoding MB 159 89, bytestream -2
[h264 @ 0x12d80b600] concealing 50 DC, 50 AC, 50 MV errors in P frame
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/steven/Desktop/StairClimb20x.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Duration: 00:06:14.72, start: 0.000000, bitrate: 6378 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2560x1440, 6294 kb/s, 14.98 fps, 14.58 tbr, 90k tbn, 180k tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 81 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
File '/Users/steven/Desktop/StairClimb20x20x.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_videotoolbox))
Press [q] to stop, [?] for help
[h264 @ 0x11d008800] cabac decode of qscale diff failed at 159 89
[h264 @ 0x11d008800] error while decoding MB 159 89, bytestream -2
[h264 @ 0x11d008800] concealing 50 DC, 50 AC, 50 MV errors in P frame
Output #0, mp4, to '/Users/steven/Desktop/StairClimb20x20x.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.76.100
Stream #0:0(und): Video: hevc (hev1 / 0x31766568), yuv420p(progressive), 2560x1440, q=2-31, 200 kb/s, 14.58 fps, 11200 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc58.134.100 hevc_videotoolbox
[hevc_videotoolbox @ 0x12d81d400] Color range not set for yuv420p. Using MPEG range.
/Users/steven/Desktop/StairClimb20x.mp4: corrupt decoded frame in stream 0ed= 0x
[h264 @ 0x11d008200] cabac decode of qscale diff failed at 155 89
[h264 @ 0x11d008200] error while decoding MB 155 89, bytestream -1
[h264 @ 0x11d008200] concealing 54 DC, 54 AC, 54 MV errors in P frame
/Users/steven/Desktop/StairClimb20x.mp4: corrupt decoded frame in stream 0
[h264 @ 0x11d008200] error while decoding MB 156 89, bytestream -6
[h264 @ 0x11d008200] concealing 53 DC, 53 AC, 53 MV errors in P frame
[h264 @ 0x11d008800] error while decoding MB 159 89, bytestream -5
/Users/steven/Desktop/StairClimb20x.mp4: corrupt decoded frame in stream 0
<errors repeated>
frame= 2734 fps=108 q=-0.0 Lsize= 46337kB time=00:03:07.26 bitrate=2027.0kbits/s dup=0 drop=2879 speed=7.42x
video:46303kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.073762%
> On Oct 25, 2021, at 9:14 PM, Steven Kan <steven at kan.org> wrote:
>
> Hi Aleksid,
>
> Any new news re: ffmpeg on Apple Silicon?
>
> For everyone else, does ffmpeg en/decode performance generally scale with CPU cores, GPU cores, both or neither? Or does it use the “media engine” block(s)?
>
> Is there any way to tell which parts of the chip are being used? Or is this all hidden/obfuscated by the video_toolbox API?
>
> I’m very curious to see how the M1 Max would run certain types of tasks.
>
>> On Aug 7, 2020, at 1:02 PM, Aleksid <beautyofnorth at gmail.com> wrote:
>>
>> Hi,
>>
>> Just for information. Today I successfully compiled FFmpeg 4.3.1 for Apple
>> Silicon (macOS 11 Beta Big Sur) on Apple Developer Transition Kit.
>>
>> Also I was able to include FFmpeg shared libraries for my test app.
>>
>> I used basic configure options to make sure that FFmpeg works on arm64:
>>
>> ./configure --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared
>> --extra-cflags="-fno-stack-check" --enable-gpl --enable-version3
>> --enable-hardcoded-tables --enable-pthreads --enable-nonfree
>>
>> I discovered only one issue (probably my mistake). dylibs work only when I
>> put them to /usr/local/Cellar/ffmpeg/4.3.1/lib folder
>> If I put dylibs into my APP bundle /Contents/Frameworks these dylibs fail
>> to load, despite the fact that I load dylib using absolute file path from
>> my folder.
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list