Robert Cudmore    archive    tags    search    software

uv4l on Raspberry Pi

The uv4l people have update their code and you can now stream real-time high resolution video to a browser. And it works on the Raspberry Pi. The ‘u’ in uv4l is for ‘user’. It is a user-space wrapper around the low-level kernel driver v4l. It is just a matter of time before the people making v4l put the finishing touches on it and it will come standard on linux distributions. On the Raspberry Pi, work is underway on v4l2.

This software has a lot of aspirations beyond video including implementing all sorts of real-time web communication with webRTC.

As of Nov 2017, following this tutorial.

Determine which version of Raspbian you are running.

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION="8 (jessie)"

Add apt key

Wheezy or Jessie

curl | sudo apt-key add -


curl | sudo apt-key add -

Add the following to ‘/etc/apt/sources.list’

Edit the file with sudo pico /etc/apt/sources.list


deb wheezy main


deb jessie main


deb stretch main

Install uv4l

sudo apt-get update #update database
sudo apt-get upgrade #update userspace
sudo apt-get install uv4l uv4l-raspicam uv4l-server

Starting and stopping uv4l streaming

Run driver

uv4l --driver raspicam --auto-video_nr --width 640 --height 480 --encoding jpeg


pkill uv4l

Run a streaming server with real-time video streaming

uv4l --driver raspicam --auto-video_nr --encoding h264 --width 640 --height 480 --enable-server on

This runs a web server on port 8080. Once running, browse to your machines IP. The stream should have almost 0 lag time and be running at about 30 fps. Amazing.


See Also

Tags: raspberry, debian, linux, video

©2019. Robert Cudmore.