gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 22:46:26 30 4
gpt4 key购买 nike

我正在尝试在 raspberry pi 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 文件。请让我知道如何解决这个问题?

最佳答案

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

关于ffmpeg - 如何在树莓派 4B 上启用对 H.264 编码的硬件支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60529213/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com