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

Unable to view camera through WebRTC stream. #131

Open
cray12399 opened this issue Jan 19, 2024 · 5 comments
Open

Unable to view camera through WebRTC stream. #131

cray12399 opened this issue Jan 19, 2024 · 5 comments

Comments

@cray12399
Copy link

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?

@AlexanderS
Copy link

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

@cray12399
Copy link
Author

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?

@KennyVB
Copy link

KennyVB commented Jan 28, 2024

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

@AlexanderS
Copy link

AlexanderS commented Feb 2, 2024

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:

@cray12399
Copy link
Author

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?

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