1

I'm trying to live stream video from a Raspberry Pi to webpages of the connected clients, for example: the server will be hosted in one location "A" and the Raspberry Pi is connected to this server. If a user accesses the web application from location "B" using the URL, and wants to view the live video, how can I achieve this?

As per my understanding I have to stream content from Raspberry Pi webcam to a Tomcat server. Please suggest to me how can I achieve this. Please do suggest me some examples as well.

2 Answers 2

1

uv4l is pretty good for streaming with very little lag

http://www.linux-projects.org/uv4l/

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

then add the source to your source list sudo vim /etc/apt/sources.list

$ source="deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ jessie main" 
$ echo $source | sudo tee -a /etc/apt/sources.list

then update, and get the packages you need

$ sudo apt-get update
$ sudo apt-get install uv4l uv4l-raspicam uv4l-raspicam-extras uv4l-server uv4l-webrtc

update your firmware

$ sudo rpi-update

the run the server

$ uv4l --driver raspicam --auto-video_nr --width 640 --height 480 --encoding h264

go to http://raspberrypi:8080/stream in a browser on the network to view the stream (where raspberrypi is your pi's ip or hostname)

$ sudo pkill uv4l

to stop it

0

I would start with this stream m you can set it up on your server. Then on raspberry pi you could use ffmpeg to stream h264 or webm video from your raspberry camera.

Your Answer

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

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