我正在尝试在树莓派 4B 型号上启用对 H264 编码的硬件支持。编译 FFmpeg 源代码启用配置
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree
但是在使用这些配置正确构建和安装 ffmpeg 后执行编码命令时,我收到以下错误
[h264_omx @ 0x156b6e0] Using OMX.broadcom.video_encode
[h264_omx @ 0x156b6e0] OMX error 80001000
[h264_omx @ 0x156b6e0] err 80001018 (-2147479528) on line 561
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
使用的命令:
ffmpeg -i /media/pi/pic_1_org.png -c:v h264_omx -c:a copy -b:v 1500k outputfile.mp4
我只想使用 H.264 编码器将单个 4K 图像编码为 .mp4 文件。请让我知道如何解决此问题?