banner



Raspberry Pi Zero W Streaming Video

Diode's second livestream meetup event went live on Tuesday (June thirty). The thirty-minute online issue drew some 20 engineers, developers, makers, Raspberry Pi enthusiasts from countries beyond the globe. CTO Dominic Letz and blockchain engineer Peter Lai were the featured speakers.

The meetup topic was most how to perform video streaming using Raspberry Pi Cypher Westward via Diode network. Check out the Diode meetup presentation slides on Github. Watch the livestream-ed meetup on YouTube.

Peter started his presentation past giving a quick demo. We've got a Raspberry Pi set at our office in Berlin, Germany (where Dominic is currently based), and another Raspberry Pi set up at our role in Taipei, Taiwan.

alt_text

The demo we showed was virtually how you can get to see the pi-taipei real-time camera video streams served via Diode network anywhere in the world. With Diode, y'all are able to broadcast information technology to multiple clients. The real-time information streaming and buffering are washed over the Diode network.

alt_text

To go the Raspberry Pi video streaming started, you will need to attach the camera module to the Raspberry Pi board. The picture on the left is the camera module; the picture on the correct is the Raspberry Pi Null that we have set upward in our office in Taipei.

The adjacent step is to enable the camera. Make sure the camera is enabled. Go to your Terminal and type in command sudo rapspi-config, choose Interface Options to enable the camera module on your Pi.

alt_text

One time you've enabled the camera support, what you tin do is y'all can do the video streaming using Raspberry Pi. So open last and type raspivid -t 0 -fps 12 -n -l -o tcp://127.0.0.1:3030. I'1000 using 0.0.0.0 instead of localhost for demo purposes. Because the data is non encrypted, there may be some security risks for users, and then we don't recommend it.

So you tin can open vlc or mplayer to play the video stream. Nosotros're using mplayer in this demo: nc [pi's]ip 3030 | mplayer -fps 12 -demuxer h264es -enshroud 1024 -. This is the screenshot that we took with the Taipei Raspberry Pi. Note that raspivid but allows one client to connect.

alt_text

Then nosotros've got the streaming setup on our Pi. Here's an important step to follow. We tin can now publish the video streaming through Diode Network. Why would you desire to do that? Because we utilise TLS encryption. It's more than secure for users. And we have broadcast functionality, and so that you lot can provide video streaming to multiple clients at the same fourth dimension.

You tin can go to our website's download folio, and download Diode customer'due south the latest binary file for your Raspberry Pi. Y'all can also download the Diode client by using the curl command on Pi. If you are more of a pro, Diode is an open up source software, you tin clone and build it from our source code.

Once Diode is fix upward on Pi, you tin open Concluding and blazon diode publish -public 3030:3030 to publish video streaming to Diode Network. You can use our diode_poc_website to play with the video streaming in a web browser (which is what we showed in the demo.).

We have arranged and released the files of diode_poc_website. Go to our github release page and download information technology. Note that you lot have to host the website first. Choose your favorite web host service, for example, Apache, lighttpd, Nginx. You can apply rsync or scp command to upload the diode_poc_website to Pi.

We've collected several questions prior to the event and provided answers during the discussion session.

Q: How to compile binary files on a Raspberry Pi in a more than efficient way?

Cantankerous-Compiling is a common fashion to compile binaries on your machine and copy them to the Pi. In that location are tutorials for different languages. For instance, for C/C++ bank check out this article. For Go, check out this mail service. For Rust, check out this article

Q: Is the video streaming content stored on Diode'southward blockchain network?

No, the Diode network is a peer-to-peer relay network which transmits the streaming content. In the Pi video example, we were using a shared port to broadcast the video data live to all participants. The blockchain miners help duplicating the content and sending it to equally many receivers as needed. And then the Raspberry Pi only needs to stream to ane client, but the video can exist sent to thousands of viewers at the same time.

Q: One common way to exercise Raspberry Pi's video streaming via TCP is to utilise the "raspivid" command. How is Diode different from this unremarkably used command?

Diode adds to the "raspivid" control three superpowers:
i) Global reachability nether whatsoever http://<name>.diode.link domain
2) Broadcast to hundreds or thousands of video watchers
three) Access control using Ethereum ids (public, protected or individual stream)

Q: I'grand a podcast host. Is information technology possible to publish my podcast to Diode?

Yes, you lot can certainly publish your podcast with Diode. A major difference between Spotify and Diode is that when uploading content to Spotify, the Spotify company owns your content; therefore, they can easily sell ads, and get profits out of your content. Only if yous exercise it with Diode, you notwithstanding accept the ownership of your content. Diode doesn't own your content, hence tin't brand coin from your content. Nonetheless, in order to publish your podcast with Diode, you have to first put the podcast on a Diode-enabled host (see our post on Ghost). In order to make that easier in the time to come, we would similar to invite application developers to create applications like this that leverage Diode'due south decentralized publisher-first network!

What is more interesting is if y'all practise a live program, for case, a live circulate episode with Diode, I would recommend: 1) Live circulate your podcast via Diode; ii) Afterwards broadcast, upload information technology to Spotify / etc. for people to listen to information technology afterwards

Q: For Raspberry Pi users, why would you want to apply Diode network when you can hands use "ssh" over a local network?

With Diode, the user can "ssh" to the Raspberry Pi from anywhere in the globe. We're actually doing this regularly to debug our Raspberry Pis in Taipei, Berlin and at habitation. We tin can hands login to any of our Pis from anywhere on the planet using Diode.

Diode's vision is to run into a world wide network operating on fully decentralized infrastructure. We'd similar to invite you to join the Web3 motion and build slap-up decentralized infrastructure with us! Check out CTO Dominic Letz's contempo write-up on the development updates.

Raspberry Pi Zero W Streaming Video,

Source: https://diode.io/diode/Diode-Network-and-Video-Streaming-Using-Raspberry-Pi-Zero-W-20189/

Posted by: steinvoiled.blogspot.com

0 Response to "Raspberry Pi Zero W Streaming Video"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel