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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章