I want to use WebRTC over my Raspberry Pi zero 2 w with an external webcam, so that I can communicate to other raspberrys, computers or smartphones. Problem is, that I'm very new to this topic. I tried to follow the links I posted on the bottom of this question.

Till now, I should have installed everything recommended in these links. When I reach the raspberry over 192.168.XXX.XXX:8080 I can enter the start page. The "MJPEG Stream" works, but when I try to call over the WebRTC, with checkboxes enables in HW support and camera, nothing happens.

First I tried:

uv4l --driver raspicam --auto-video_nr
sudo service uv4l_raspicam restart

Then I tried it with lsusb to get the device id of my webcam and then

uv4l --driver uvc --device-id 328f:2013 --config-file=/etc/uv4l/uv4l-uvc.conf --driver-config-file=/etc/uv4l/uv4l-uvc.conf

but, when I then try to restart the service with sudo service uv4l_uvc restart: "Job for uv4l_uvc.service failed because the control process exited with error code. See "systemctl status uv4l_uvc.service" and "journalctl -xe" for details."

enter image description here

enter image description here

I'm stuck now and have no idea if this is at least the right direction. Can someone please help me get the WebRTC to work? I'm also thankful for every input on the topic in general.

Thank you in advance! Ferrys

enter image description here

Links I followed, but did not bring me to the wished functionality

(1) https://www.youtube.com/watch?v=5QAHlZoPlgI

-> https://www.dropbox.com/s/42cfyfgrjccl7jn/Reef%20Nerd%20Tutorial%20-%20Setting%20up%20a%20Raspberry%20Pi%20Reef%20Cam%20and%20Website.pdf?dl=0

(2) https://www.linux-projects.org/uv4l/installation/

(3) https://www.highvoltagecode.com/post/webrtc-on-raspberry-pi-live-hd-video-and-audio-streaming

(4) Configuring uv4L for webRTC using USB camera on RPI2 raspbian

(5) Using the UV4L driver to stream video from the raspberry pi camera to android phone

2 Answers 2


In case of problems, there is also a "--external-driver" option in uv4l which makes uv4l use the uvc kernel driver (if loaded) instead of its own userspace version (see the uv4l core manual).


Setting up WebRTC on a Raspberry Pi with an external webcam can be a bit tricky, but I'll do my best to guide you through the process. From the information you provided, it seems that you have installed the UV4L driver and are trying to use it with your webcam. However, you are encountering an error when trying to restart the service.

Here are some steps you can follow to troubleshoot the issue:

Check the UV4L logs to see if there are any error messages that might indicate what went wrong. You can find the logs in the /var/log/uv4l/ directory. Look for the log file that corresponds to the driver you are using (raspicam or uvc) and see if there are any error messages in the log.

Check the configuration files for the driver you are using (/etc/uv4l/uv4l-raspicam.conf or /etc/uv4l/uv4l-uvc.conf). Make sure that the configuration options are correct for your setup. For example, if you are using the UVC driver with a specific device ID, make sure that the device ID is correct in the configuration file.

Make sure that the UV4L service is running. You can check the status of the service by running the following command:

sudo service uv4l_raspicam status


sudo service uv4l_uvc status

If the service is not running, try starting it manually with the following command:

sudo service uv4l_raspicam start


sudo service uv4l_uvc start

Make sure that the ports required for WebRTC are open on your Raspberry Pi. WebRTC uses ports 3478-3481 (UDP) and 443 (TCP). You can check if the ports are open by running the following command:

sudo netstat -tulpn | grep LISTEN

Look for the UV4L process and see if it is listening on the required ports.

Try a different browser or device to see if the issue is specific to your setup. WebRTC can be finicky with certain browsers or devices, so it's worth testing with a few different options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.