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

Cannot stream rpi cam with up-to-date Raspberry Pi OS lite 32-bit #1644

Closed
1 of 13 tasks
meteyou opened this issue Apr 2, 2023 · 3 comments · Fixed by #1700
Closed
1 of 13 tasks

Cannot stream rpi cam with up-to-date Raspberry Pi OS lite 32-bit #1644

meteyou opened this issue Apr 2, 2023 · 3 comments · Fixed by #1700
Labels
bug Something isn't working rpi-camera

Comments

@meteyou
Copy link

meteyou commented Apr 2, 2023

Which version are you using?

v0.22.0

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe)

Describe the issue

There is an issue with the new Raspberry Pi kernel to read the exact version (32 or 64-bit). I cannot use MediaMTX to stream a raspberry cam with the 32-bit version with an up-to-date raspberry pi os lite 32-bit. I also tested it with the 64-bit version, and it works fine.

These packages are updated with apt upgrade. After that, it no longer works:

pi@streamer32:~ $ sudo apt list --upgradable
Listing... Done
curl/stable 7.74.0-1.3+deb11u7 armhf [upgradable from: 7.74.0-1.3+deb11u5]
libcamera-apps-lite/stable 0~git20230301+54a781d-1 armhf [upgradable from: 0~git20230125+9f08463-1]
libcamera0/stable 0~git20230302+923f5d70-1 armhf [upgradable from: 0~git20230124+9b860a66-1]
libcurl3-gnutls/stable 7.74.0-1.3+deb11u7 armhf [upgradable from: 7.74.0-1.3+deb11u5]
libcurl4/stable 7.74.0-1.3+deb11u7 armhf [upgradable from: 7.74.0-1.3+deb11u5]
libtiff5/stable 4.2.0-1+deb11u4 armhf [upgradable from: 4.2.0-1+deb11u3]
libwbclient0/stable 2:4.13.13+dfsg-1~deb11u5 armhf [upgradable from: 2:4.13.13+dfsg-1~deb11u4]
linux-libc-dev/stable 1:1.20230317-1 armhf [upgradable from: 1:1.20230106-1]
python3-libcamera/stable 0~git20230302+923f5d70-1 armhf [upgradable from: 0~git20230124+9b860a66-1]
python3-picamera2/stable 0.3.9-1 all [upgradable from: 0.3.8-1]
python3-v4l2/stable 0.3.2-1 all [upgradable from: 0.3.1-1]
raspberrypi-bootloader/stable 1:1.20230317-1 armhf [upgradable from: 1:1.20230106-1]
raspberrypi-kernel/stable 1:1.20230317-1 armhf [upgradable from: 1:1.20230106-1]
vcdbg/stable 1:1.20230317-1 armhf [upgradable from: 1:1.20230106-1]

Describe how to replicate the issue

  1. flash pi with Raspberry Pi OS lite 32-bit (2023-02-21)
  2. download the package mediamtx_v0.22.0_linux_armv7.tar.gz
  3. extract (tar -xzvf mediamtx_v0.22.0_linux_armv7.tar.gz)
  4. add following lines in the paths section of your mediamtx.yml
  cam:
    source: rpiCamera
  1. start streamer with:
./mediamtx mediamtx.yml

Now it should work fine!
6. stop server with CTRL+C
7. Update rpi (sudo apt update && sudo apt upgrade)
8. Reboot
9. Start server again and it will fail

Did you attach the server logs?

yes

pi@streamer32:~ $ ./mediamtx mediamtx.yml
2023/04/02 09:21:31 INF MediaMTX / rtsp-simple-server v0.22.0
2023/04/02 09:21:31 DEB [path cam] created
2023/04/02 09:21:31 DEB path manager created
2023/04/02 09:21:31 INF [path cam] [rpicamera source] started
2023/04/02 09:21:31 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2023/04/02 09:21:31 INF [RTMP] listener opened on :1935
2023/04/02 09:21:31 INF [HLS] listener opened on :8888
2023/04/02 09:21:31 INF [WebRTC] listener opened on :8889 (HTTP)
2023/04/02 09:21:31 INF [path cam] [rpicamera source] ERR: OS is 64-bit, you need the arm64 server version

Did you attach a network dump?

no

@aler9 aler9 added bug Something isn't working rpi-camera labels Apr 9, 2023
@aler9
Copy link
Member

aler9 commented Apr 9, 2023

Hello, this is caused by the fact that Raspberry Pi maintainers decided to forcefully upgrade kernel from 32-bit to 64-bit even on 32-bit images:
https://forums.raspberrypi.com/viewtopic.php?p=2088935#p2088935

The result is an inconsistent system with 32-bit libraries and a 64-bit kernel.

While i strongly disagree with this choice, compatibility between the server and this "hybrid" OS must be restored. The server currently checks the architecture of the OS. This behavior will be changed in order to check the architecture of libcamera instead.

@aler9
Copy link
Member

aler9 commented Apr 13, 2023

added in MediaMTX v0.22.1

@aler9 aler9 mentioned this issue Jun 27, 2023
13 tasks
@github-actions
Copy link
Contributor

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working rpi-camera
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants