Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMXPlayer and Raspbian Bullseye - running and compiling #810

Open
msedv opened this issue Nov 28, 2021 · 8 comments
Open

OMXPlayer and Raspbian Bullseye - running and compiling #810

msedv opened this issue Nov 28, 2021 · 8 comments

Comments

@msedv
Copy link

msedv commented Nov 28, 2021

We have several Pi4 displaying 6-12 RTSP streams from Dahua surveillance cameras. Switching to VLC isn't really a practical solution. Regarding Raspbian Bullseye I made the following observations:

Running:

  1. fresh install of bullseye: no install candidate
  2. fresh install of buster, install omxplayer, dist-upgrade to bullseye: runs like a charm

Compiling: no matter if using method 1 or 2 I'm not able to make omxplayer as soon as on bullseye (make ffmpeg runs fine); I always get a lot of linking errors:

/usr/bin/ld: linux/OMXAlsa.o: in function omxalsasink_worker(void*)': omxplayer/linux/OMXAlsa.cpp:1043: undefined reference to snd_pcm_open'
/usr/bin/ld: omxplayer/linux/OMXAlsa.cpp:1052: undefined reference to `snd_pcm_hw_params_sizeof'
...

/usr/bin/ld: linux/RBP.o: in function DllBcmHost::bcm_host_init()': /webs/omxplayer/./DllBCM.h:84: undefined reference to bcm_host_init'
...

and so on; full output attached. /opt/vc ist still here. Which libraries are missing? I don't have a clue. :-(

Even if omxplayer isn't maintained and not included in raspbian from bullseye on it would be very helpful if it would be possible to compile a running version by ourself.

omxplayer_compile_output.txt

@popcornmix
Copy link
Owner

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).

But, be aware this is unsupported and no promises it will continue to work in the future.

@nagualcode
Copy link

nagualcode commented Jul 25, 2022

I believe the community should keep omxplayer alive, VLC will never be a replacement. Specially for the millions of raspberry pi 1, 2 and 3 users out there.

According to vlc contribuitor:
The next version of VLC (real soon now) should get you h/w accel where it is supported in most circumstances on 64 and 32 bit. The pathways are always going to be less efficient than those set up by OMXplayer and there are limitations imposed by Linux that mean that some functionality is, at best, hard to achieve so it isn't going to be able to do exactly what OMXplayer did.

@popcornmix
Copy link
Owner

popcornmix commented Jul 25, 2022

@nagualcode 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.

@Plainbroke
Copy link

@popcornmix
Ok I understand what you are saying, but is there a way for those of us that still want and need omxplayer to install and all its dependencies without breaking bullseye, or without going back to buster and reloading everything???
In my case MagicMirror and approximately 35 modules that rotate using mmm-carousel. 5 of them are differant cameras that use rstp and VLC does not display them correctly at all. Also very bad lag on a pi4 with 8gb ram. using a ssd drive, speed should not be the issue, for the lag.

Jeff

@popcornmix
Copy link
Owner

Yes, you can run omxplayer under bullseye using fkms driver.
You just need to be aware that there be features that are only supported with kms (e.g HDR or HD audio passthrough).
And fkms is deprecated so is unlikely to get bug fixes or new features.

@Plainbroke
Copy link

Plainbroke commented Jul 31, 2022 via email

@popcornmix
Copy link
Owner

I do not understand the depreciated statement. Why are the OS updates not backwards compatible?

kms means all of the code to drive the display is handled on the arm in the kernel
fkms means all of the code to drive the display is handled on the gpu in the firmware

The switch to arm side means all the code is open source, and we are using standard linux apis for displays (so you can write code that decodes video and displays it efficiently and the same source code will run on RPiOS on a Pi or Ubuntu on an x86 PC.

This change has many benefits (e.g. new features like HDR and HD audio passthrough are now supported).
But it means omxplayer which is explicitly coded to use firmware driver for decode and display cannot possibly work using kms.
You can't have both the arm and gpu writing to display hardware registers.

@Plainbroke
Copy link

Plainbroke commented Aug 1, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants