top of page
  • Writer's pictureIGEL Community

RTSP Camera Streaming Natively in IGEL OS: A Step-by-Step Guide

Written by Jeff Long, IGEL COMMUNITY MEMBER & Insider


Welcome to the Future of Custom Camera Monitoring Stations with IGEL OS!

Have you ever wanted to create a custom camera monitoring station right from your IGEL OS? Well, today is your lucky day! Thanks to our ingenious community members, you can now natively launch and manage RTSP streams using gst-launch-1.0.


Let's dive into how this incredible feature works and how you can set it up yourself.


Getting Started with RTSP Streaming

Why RTSP? Real-Time Streaming Protocol (RTSP) is a network control protocol designed for use in entertainment and communication systems to control streaming media servers. It's perfect for live streaming from your IP cameras.


Native Launching of RTSP Streams

Using gst-launch-1.0, we can natively launch RTSP streams on IGEL OS. By combining gst-launch-1.0 with "faux full screen," template keys, and wmctrl/xdotool commands, you can create a fully customized camera monitoring station.

Here's a sneak peek at how it works:

gsts=$(wmctrl -l | grep -i "${RTSP-Beta-ID}" | awk '{print $1}'); for gst in $gsts; do wmctrl -i -c $gst; done; wmctrl -c '${RTSP-Beta-ID}'; gst-launch-1.0 uridecodebin uri="${RTSP-Beta-URI}" ! videoconvert ! autovideosink & sleep 8; xdotool search --name 'gst-launch-1.0' set_window --name '${RTSP-Beta-ID}' %1; wmctrl -r "${RTSP-Beta-ID}" -b remove,maximized_vert,maximized_horz;

What Does This Script Do?

  1. Checks for Existing Instances: Searches for matching existing instances of the RTSP stream based on the Template Key name.

  2. Closes Existing Instances: If found, it closes these instances to avoid conflicts.

  3. Launches RTSP Stream: Initiates the RTSP stream via gst-launch using the Template Key.

  4. Renames the Window: Renames the window for easier manipulation later on.

  5. Unmaximizes the Window: Prepares the window for further adjustments.


Example: Manipulating Multiple RTSP Streams

Now, let's see how to manage multiple streams. Here's an example of manipulating three RTSP streams running with gst-launch:

gsts=$(wmctrl -l | grep -i "${RTSP-Beta-ID}" | awk '{print $1}'); for gst in $gsts; do wmctrl -i -c $gst; done; wmctrl -c '${RTSP-Beta-ID}'; gst-launch-1.0 uridecodebin uri="${RTSP-Beta-URI}" ! videoconvert ! autovideosink & sleep 8; xdotool search --name 'gst-launch-1.0' set_window --name '${RTSP-Beta-ID}' %1; wmctrl -r "${RTSP-Beta-ID}" -b remove,maximized_vert,maximized_horz;

What Do These Commands Achieve?

  1. Finds Open Instances: Searches for all open instances of RTSP streams running using gst-launch.

  2. Unmaximizes Windows: Unmaximizes the windows to allow for easier manipulation.

  3. Positions and Sizes Windows: Adjusts the position and size of the first three open instances found.


Bringing It All Together

With these commands and configurations, you can set up a dynamic and efficient camera monitoring station on IGEL OS. This setup not only simplifies the process but also enhances your ability to manage multiple streams seamlessly.


A Word from Our Community

Our community member shared a fantastic video demonstration and profile snippets showcasing this setup in action. It's a testament to the power and flexibility of IGEL OS combined with community innovation.




Final Thoughts

Happy RTSP'ing, everyone! We hope this guide helps you harness the full potential of IGEL OS for your streaming needs. Don't forget to share your custom setups and experiences with us. Together, we continue to push the boundaries of what's possible with IGEL OS.

Stay tuned for more exciting updates and community-driven innovations!



GST-RTSP-DEMO
.zip
Download ZIP • 4KB


Disclaimer


The content of this post is provided without any warranty or support by IGEL Technology. This information is derived from the IGEL Community, and not IGEL Technology. IGEL Technology will not provide any packages, instructions, or support for processes, scripts, or other content contained in this post. Use at your own risk!



Hope it works well, please let me know if you have some questions or comments!





Comments


bottom of page