The Temboo service has moved away from Arduino support. The service access in this older guide will no longer work.
In this last part of the project, we are going to build a completely different application for our hardware: make the camera stream video live on Youtube. We are first going to make the camera stream video locally, then transmit this stream to your computer using a software called Wirecast, which will finally stream the video to a Youtube live event.
Streaming video locally is actually really easy, thanks to the software we installed earlier. Just log to the Yun again via SSH, and type:
Streaming video locally is actually really easy, thanks to the software we installed earlier. Just log to the Yun again via SSH, and type:
mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480 -f 25" -o "output_http.so -p 8080 -w /www/webcam" &
Some explanation about this code: the -r argument sets the resolution (I used a lower resolution here because the HD video streaming was lagging) and the -p argument sets the port on which the stream will be available. To actually see the stream, just go over to (by replacing the name of your Arduino Yun board):
http://myarduinoyun.local:8080/stream.html
You should get a page which is the interface to the stream on your Arduino Yun. On this page, you should see the video from your camera being streamed in live:
Now, we are going to send this stream on Youtube. It starts by going to the Youtube interface, and creating a live event:
Youtube will ask you some information about your stream, and recommend some software so your computer can stream to Youtube. I used Wirecast, but it should work with other streaming software as well.
In Wirecast, you need to add a new "Web stream" with the following parameters: HTTP protocol, Motion JPEG format, and "nameofyourYun.local:8080/?action=stream" as the URI. This picture shows the parameters I used:
In Wirecast, you need to add a new "Web stream" with the following parameters: HTTP protocol, Motion JPEG format, and "nameofyourYun.local:8080/?action=stream" as the URI. This picture shows the parameters I used:
The free version of Wirecast will insert some watermarks on your stream, as the Web stream is a paid feature. But that is not really a problem to monitor your home, as they don't appear all the time. After a moment, the stream from your Yun should appear in the Wirecast interface:
Still on Wirecast, you can now press on "Stream". The software will ask for your Youtube credentials, and should automatically detect your live event. Once this is done, you can go back to the live event on Youtube. On the live event control room, you should see that Youtube is receiving some data:
If you can see the "GOOD" status, you can click on "Preview" so Youtube can prepare your stream:
It will take a while (some minutes in my case), but at some point you will be able to click on "Start streaming". Once this is done, you can access your stream just like you would access any Youtube video:
Congratulations, you can now monitor your home from wherever in the world, just by having the URL to this Youtube live event! You have several options to create your live event, but I set mine as "Unlisted" so I can share the URL with people I trust, so they can also have a look on my home when I am not there.
Text editor powered by tinymce.