camera-streamer icon indicating copy to clipboard operation
camera-streamer copied to clipboard

Unable to view camera through WebRTC stream.

Open cray12399 opened this issue 1 year ago • 5 comments
trafficstars

My setup is as follows: Distribution: Debian GNU/Linux 12 (bookworm) Kernel: Linux 6.1.0-rpi7-rpi-v8 aarch64 Model: Raspberry Pi 4 Model B Rev 1.5 Browser: Firefox and Chromium

2 Cameras: OV5640 OV2710

I am using this setup with a 3D printer and Crowsnest.

The issue that I am having is that I am trying to stream my cameras via WebRTC, but no matter what I do I cannot view the WebRTC streams. It just gives me a blank screen. I was told by someone on the Mainsail Discord to come here after they were unable to find the issue with my setup. For all intents and purposes, it seems like I have everything set up correctly. I know the cameras work because they run fine with ustreamer mjpeg.

Here is my Crowsnest log: crowsnest (1).log

Here is my crowsnest conf: crowsnest.conf.txt

Any idea on what can be going on here?

cray12399 avatar Jan 19 '24 18:01 cray12399

You may want to try to raise gpu_mem to 128MB. This fixed the issue for me.

AlexanderS avatar Jan 25 '24 18:01 AlexanderS

You may want to try to raise gpu_mem to 128MB. This fixed the issue for me.

Hi Alexander, thank you for your help. Where am I supposed to put that setting?

cray12399 avatar Jan 25 '24 18:01 cray12399

got same issue, exact i got 256mb set. rpi 4b 4gb and tried camera-always-active=1 nothing works

KennyVB avatar Jan 28 '24 21:01 KennyVB

Hi Alexander, thank you for your help. Where am I supposed to put that setting?

This should be added to /boot/config.txt.

And please check if your browser supports WebRTC with H264. You can use for example the following page: https://mozilla.github.io/webrtc-landing/pc_test_no_h264.html

I found the following issues with common browsers:

  • In Firefox you have to enable it via media.webrtc.hw.h264.enabled in about:config (See https://unix.stackexchange.com/a/761511 and https://bugzilla.mozilla.org/show_bug.cgi?id=1717679)
  • Chromium in Debian Bullseye does not support h264 because libopenh264 is only available since bookworm (See f.e. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031352)

AlexanderS avatar Feb 02 '24 23:02 AlexanderS

Hi Alexander, thank you for your help. Where am I supposed to put that setting?

This should be added to /boot/config.txt.

And please check if your browser supports WebRTC with H264. You can use for example the following page: https://mozilla.github.io/webrtc-landing/pc_test_no_h264.html

I found the following issues with common browsers:

* In Firefox you have to enable it via `media.webrtc.hw.h264.enabled` in `about:config` (See https://unix.stackexchange.com/a/761511 and https://bugzilla.mozilla.org/show_bug.cgi?id=1717679)

* Chromium in Debian Bullseye does not support h264 because libopenh264 is only available since bookworm (See f.e. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031352)

I enabled h264 in Firefox and increased my rpi memory to 256mb. I am able to get a picture sometimes showing at this point, but I am getting like 1 frame every 10 seconds or just a blank black screen. Its worse performance than mjpeg with ustreamer. Any suggestions on what I should do next?

cray12399 avatar Feb 03 '24 01:02 cray12399