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.

curl http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo apt-key add -

Determine which version of Raspbian you are running. We will assume we are running the newer jessie version.

cat /etc/os-release

PRETTY_NAME=”Raspbian GNU/Linux 8 (jessie)” NAME=”Raspbian GNU/Linux” VERSION_ID=”8” VERSION=”8 (jessie)” ID=raspbian ID_LIKE=debian HOME_URL=”http://www.raspbian.org/” SUPPORT_URL=”http://www.raspbian.org/RaspbianForums” BUG_REPORT_URL=”http://www.raspbian.org/RaspbianBugs”


Add the following to `/etc/apt/sources.list`

sudo pico /etc/apt/sources.list

 
	deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ jessie main

Install

	sudo apt-get update #update database
	sudo apt-get upgrade #update userspace, not neccessary but for good measure
	sudo apt-get install uv4l uv4l-raspicam
	sudo apt-get install uv4l-server
	
Run driver

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

    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.

	http://192.168.1.60:8080
	
### Problem

uv4l is now starting at system boot and i can't turn it off?

Can be stopped with

sudo /etc/init.d/uv4l_raspicam stop ```

See Also

Tags: raspberry, debian, linux, video

©2017. Robert Cudmore.