bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.74k stars 1.4k forks source link

Rpi Zero Camera fails after several minutes #3244

Closed PeterBenicky closed 1 month ago

PeterBenicky commented 2 months ago

Which version are you using?

v1.7.0

Which operating system are you using?

Describe the issue

Rpi Zero Camera fails after several minutes ussage (used rtsp and webrtc), returning below error on console: Message from syslogd@cam002 at Apr 15 10:11:55 ... kernel:[ 3580.685350] Internal error: Oops: 80000005 [#1] ARM

Describe how to replicate the issue

Using Rpi Zero (2015), 8GB SD card, image Rasberry pi Zero, Legacy 32 bit, follow steps below:

  1. sudo raspi-config, then go to Interfacing options, enable/disable legacy camera support
  2. sudo reboot
  3. sudo apt intstall libcamera0
  4. sudo apt install libfreetype6
  5. wget https://github.com/bluenviron/mediamtx/releases/download/v1.7.0/mediamtx_v1.7.0_linux_armv6.tar.gz
  6. tar -xzf mediamtx_v1.7.0_linux_armv6.tar.gz
  7. edit yml (the yml file is attached as well mediamtx_yml.txt): paths: cam: source: rpiCamera
  8. nohup ./mediamtx &
  9. connect to the camera using rtsp and webrtc as below: http://cam001.local:8889/cam/ rtsp://cam001.local:8554/cam

Did you attach the server logs?

yes mediamtx.log

Did you attach a network dump?

no

Ataman commented 2 months ago

That looks suspiciously similar to this issue: https://github.com/raspberrypi/rpicam-apps/issues/246

The RPi Zero is prone to bugs when doing heavy workloads (The issue is exacerbated with insufficient power supplies). Try the workaround from this comment: https://github.com/raspberrypi/rpicam-apps/issues/246#issuecomment-1170999714

Alternatively, switch to a better power supply.

aler9 commented 1 month ago

Hello, as anticipated by @Ataman this is a hardware-related issue that happens when power is not enough for the current workload. Switch to a better power supply or alternatively decrease consumption by disabling WiFi, Bluetooth, LEDs, HDMI or perform underclocking. There are lots of guides on the topic, like this one: https://blues.com/blog/tips-tricks-optimizing-raspberry-pi-power/