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

The latest release of Raspberry Pi OS comes with KMS as the default video driver #100

Closed
barhun opened this issue Nov 10, 2021 · 2 comments

Comments

@barhun
Copy link
Contributor

barhun commented Nov 10, 2021

Hi,

The latest release of Raspberry Pi OS is based on Debian Bullseye and comes with KMS as the default video driver. With these new images, it seems not possible to build lazycast binaries since the C header files and libraries for Broadcom VideoCore APIs are no longer situated under the path /opt/vc. Is there any plan in progress to update the project to make it compatible with the new releases of the OS? You might want to use something like gstreamer, and AFAIK, this is how RPiPlay supports video and audio decoding on other platforms lacking Raspberry Pi specific video APIs as well as for the 64-bit release of Raspberry Pi OS.

It is also worth mentioning that python2 is deprecated, discontinued and no more supported with Debian Bullseye and forth; however, as far as I've tested, this requires minimal changes to this project as the following:

  • Replace the shebangs with #!/usr/bin/env python or #!/usr/bin/env python3
  • Replace all the print statements in python scripts with print function calls
@phamthanhnam
Copy link

phamthanhnam commented Jan 2, 2022

On Raspberry Pi OS Bullseye, you can get back C headers and libraries in /opt/vc by cloning userland repository and running the script buildme.

For both lazycast and rpiplay, to use GPU players on Bullseye, you may need to disable DRM VC4 V3D driver (otherwise, HDMI output may be turned off right after receiving video stream), by editing /boot/config.txt:

  • Comment out or delete the line dtoverlay=vc4-kms-v3d
  • Add the line dtoverlay=vc4-fkms-v3d after the line [pi4]
  • Reboot
cd /path/to/lazycast
LD_LIBRARY_PATH=/opt/vc/lib ./all.sh

(or put export LD_LIBRARY_PATH=/opt/vc/lib at the end of /home/pi/.bashrc)

If you don't want to use GPU players with deprecated Broadcom APIs, set player_select = 0 in lazycast/d2.py to use vlc. There's also a boolean down in that file to use gstreamer instead (in function launchplayer).

@homeworkc
Copy link
Owner

Okay, thank you very much for finding this solution. I had also thought that Bullseye would be incompatible with lazycast. In that case I will modify the scripts and update the README.

@homeworkc homeworkc pinned this issue Jan 16, 2023
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

3 participants