DEV Community

El Bruno for Microsoft Azure

Posted on • Originally published at elbruno.com on

#AzureIoT – RTSP Webcam, add rtsp camera πŸ“· capabilities to your Edge Device #JulyOT

Hi !

Today, during my [Let’s setup a Raspberry Pi and a reTerminal as an Azure IoT ☁ device] session, one of the questions was about what cool scenarios we can run once we have a Raspberry Pi as an Azure IoT Edge device.

Besides the use of Cognitive Services (only for x64), a cool and fast idea can be to convert your RPi to a RTSP Cam device. We only need to connect a USB WebCam to the Raspberry Pi.

Once the USB Camera is connected, we need to add the following Edge Module to the device configuration

azure iot edge module RTSPWebcamonIoTEdge

More information: RTSP Webcam

The module runs as a IoT Edge container named RtspWebCam. While running the container image, one must map the USB camera on the host device to the container by using the following module createOptions parameters: PathOnHost=/dev/video0, PathInContainer=/dev/video0.

Once we add the module, we can see the module running in the device:

module added to the device

And, we will have access to a RTSP Camera. And we can run a sample python app to have the view from the camera.

camera view from the RTSP Pi Demo

Sample Code

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.


Top comments (0)