Raspberry bullseye (Debian 11) 安装 omxplayer

由于项目持续迭代的原因,新买的树莓派3B+的板子目前无法支持2022年以前的 raspberry os(烧录系统通电之后无反应,多家淘宝店家客服说不支持2022年以前的系统),旧板也无法持续采购,所以还得在2022年之后的系统上适配应用程序.

2022年之后的系统都是基于Debian 11的Raspberry Pi OS(bullseye),系统上没有 omxplayer 软件,VLC 现在是推荐的替代方案。项目中使用的是omxplayer,个人原因不想使用 vlc 方案,所以还是的想办法安装 omxplayer。

通过 apt-get install -y omxplayer 是无法安装的,因为软件包中是没有的,即使换源也不行。

omxplayer作者的说法是:omxplayer使用的接口(例如openmax),在最新的RPiOS上默认不可用

"

feel free to fork this repo and provide updates.

But the main issue is the interfaces that omxplayer uses (e.g. openmax) and not available by default on the latest RPiOS
(where we have switched to the arm side kms driver for display), so omxplayer won't run by default.

Currently it is possible to run omxplayer on bullseye after disabling the kms driver and installing the openmax libraries, but that may stop applications that target kms from running, so is not something that most users would want to do.

"

同时作者也给出的解决方案

omxplayer binary is still available in bullseye repo, but the openmax libs are not.
You can get the libs needed from https://github.com/raspberrypi/firmware/tree/master/opt/vc
You also need to not use the kms driver (either comment out or replace with fkms the line dtoverlay=vc4-kms-v3d).

根据相关的文档,我在多次尝试之后还是无法编译成功,要么是部分依赖库无法安装,要么就是在 make -j$(nproc) 这一步编译报错,提示以下错误

linux/OMXAlsa.cpp:22:10: fatal error: IL/OMX_Core.h: No such file or directory

有耐心的小伙伴可以根据错误提示来解决编译问题。

我是直接根据下面的步骤来完成 omxplayer 的安装,参见 参考文档3

1、下载 omxplayer 所需要的依赖库 

2、注释 dtoverlay=vc4-kms-v3d

  • 修改/boot/config.txt 文件,注释 dtoverlay=vc4-kms-v3d 这一行
#dtoverlay=vc4-kms-v3d

3、下载 omxplayer 的安装包:

4、安装

# sudo dpkg --install omxplayer_20190723+gitf543a0d-1+bullseye_armhf.deb

5、测试

omxplayer  test.mp4

 

参考文档:

1、raspberry pi bullseye OS updates · Issue #18 · dasl-/piwall2 (github.com)

2、OMXPlayer and Raspbian Bullseye - running and compiling · Issue #810 · popcornmix/omxplayer (github.com)

3、omxplayer not working: error while loading shared libraries: libbrcmEGL.so - Raspberry Pi Forums

posted @ 2023-08-16 17:10  贱书生  阅读(723)  评论(2编辑  收藏  举报