如何在树莓派4B上启用对H.264编码的硬件支持

问题描述 投票:1回答:1

我正在尝试在树莓派4B模型上启用对H264编码的硬件支持。编译FFmpeg源以启用配置

sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-omx --enable-omx-rpi --enable-nonfree

跟随链接,https://github.com/legotheboss/YouTube-files/wiki/(RPi)-Compile-FFmpeg-with-the-OpenMAX-H.264-GPU-acceleration

但是在正确构建和安装具有这些配置的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文件。请让我知道如何解决此问题?

ffmpeg h.264 hardware-acceleration raspberry-pi4
1个回答
0
投票

Raspberry Pi 4上的硬件H.264编码器仅支持1920x1080或更低的分辨率。因此,没有硬件支持4k编码。

© www.soinside.com 2019 - 2024. All rights reserved.