Raspberry PI上的FFmpeg硬件加速 [英] FFmpeg hardware acceleration on Raspberry PI

查看:846
本文介绍了Raspberry PI上的FFmpeg硬件加速的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个使用ffmpeg通过互联网流式传输网络摄像头内容的程序.我想知道是否可以在树莓派pi模型3的流部分使用GPU.如果是,我如何在ffmpeg上实现它?

I am building a program that use ffmpeg to stream webcam content over internet. I would like to know if it is possible to use the GPU for the streaming part on the raspberry pi model 3. If yes, how could I implement this on ffmpeg?

推荐答案

您将需要一些其他配置选项:

You'll need some additional configure options:

  • --enable-mmal –通过MMAL启用Broadcom多媒体抽象层(Raspberry Pi).用于H.264,VC-1,MPEG-2,MPEG-4的硬件解码.作为依赖项,您需要 linux-raspberrypi-headers (Arch Linux)或 linux-headers-*-raspi2 (Ubuntu)软件包,该软件包提供所需的头文件mmal.h.

  • --enable-mmal – Enable Broadcom Multi-Media Abstraction Layer (Raspberry Pi) via MMAL. For hardware decoding of H.264, VC-1, MPEG-2, MPEG-4. As a dependency you'll need the linux-raspberrypi-headers (Arch Linux) or linux-headers-*-raspi2 (Ubuntu) package which provides the required header file mmal.h.

--enable-omx-rpi –为Raspberry Pi启用OpenMAX IL代码.对于H.264(编码器称为h264_omx)和MPEG-4(mpeg4_omx)的硬件编码.作为依赖项,您需要 libomxil-bellagio (Arch Linux)或 libomxil-bellagio-dev (Ubuntu)软件包,该软件包提供所需的头文件OMX_Core.h. /p>

--enable-omx-rpi – Enable OpenMAX IL code for Raspberry Pi. For hardware encoding of H.264 (encoder is named h264_omx) and MPEG-4 (mpeg4_omx). As a dependency you'll need the libomxil-bellagio (Arch Linux) or libomxil-bellagio-dev (Ubuntu) package which provides the required header file OMX_Core.h.

对于Arch Linux用户:

For Arch Linux users:

ffmpeg 包复制 PKGBUILD 文件(如果愿意,可以通过 ABS ).添加上面显示的两个新的configure选项,并将提到的两个包添加到depends行.使用makepkg命令编译/安装.

Copy the PKGBUILD file for the ffmpeg package (perhaps via the ABS if you prefer). Add the two new configure options shown above, and add the two mentioned packages to the depends line. Compile/install with the makepkg command.

免责声明::我没有这些设备之一可以测试其中任何一项.这些信息大部分是从FFmpeg configure文件获取的.

Disclaimer: I don't have one of these devices to test any of this. Most of this info was acquired from the FFmpeg configure file.

这篇关于Raspberry PI上的FFmpeg硬件加速的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆