Mac 上面已经安装了 x264 和 x265,但是用 ffmpeg,选 x264 和 x265 做解码器的时候找不到,怎么解决
电脑上面已经安装了 x264 和 x265
brew install x264 Warning: x264 r3048 is already installed and up-to-date. To reinstall r3048, run: brew reinstall x264 brew install x265 Warning: x265 3.5 is already installed and up-to-date. To reinstall 3.5, run: brew reinstall x265
但是在 ffmpeg 中使用的时候,提示 Unknown decoder ‘x265’(最后一行):
ffmpeg -c:v x265 -i ./A.mp4 -c:v x265 -i ./B.mp4 -filter_complex "[0:v]pad=iw*2:ih[v_wide];[v_wide][1:v]overlay=W/2:0[out_video]" -map "[out_video]" -c:v x265 -crf 18 -map 0:a:0 -c:a copy -y ./C.mp4 ffmpeg version 4.3.2 Copyright (c) 2000-2021 the FFmpeg developers built with Apple clang version 12.0.0 (clang-1200.0.32.21) configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.2-with-options_1 --enable-shared --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-demuxer=dash --disable-libjack --disable-indev=jack --enable-opencl --enable-videotoolbox --disable-htmlpages libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Unknown decoder 'x265'
ffmpeg 的安装方式是homebrew-ffmpeg
我是直接
brew tap homebrew-ffmpeg/ffmpeg brew install homebrew-ffmpeg/ffmpeg/ffmpeg
安装的,github 页面也说了默认已经包括了 x264 和 x265