Install OBS-RTSP plugin on Linux

I’m running Ubuntu Studio 24.04 with OBS 32, with “obs-rtspserver v3.1.0” plugin.

The DEB package of RTSP Server OBS plug-in failed to install for me by just clicking to install. And also selecting system package manager “Discover” to install it did not work. In both cases I received error message about failed dependencies.

So, I did it by hands (with a cigarette in my teeth).

Downloaded and extracted the package content

Luckily “.deb” package file can be extracted like other archive types (.zip, .tar.gz . . etc).

To find out where to copy files I tried to install second OBS plug-in that I need (obs-multi-rtmp). That worked in a way that as I opened OBS, the multi-output plugin it visible (active) and also listed in OBS plugin manager.

A note! I also got an error from “Discover” when installing “completed” for OBS-Multi-Rtmp. And I didn’t test yet it’s performance or does it work at all.

I also extracted multi-rtmp .deb package to see what files it brings and the folder structure (the paths) for plugins in OBS.

Next thing I did a file search looking for “OBS” and sorted the search result by file/folder paths.

Now I was able to find locations of OBS directories by referencing downloaded and extracted files against the results in the local files search query.

Great resource to get this all working is the fact that RTSP Server GitHub page also has instructions how to extract files from “obs-rtspserver-linux.tar.gz” available in list of release packages.

But, as far I can tell looking in my file system the paths are different. While the files are the same.

“Copying” the plugin files into OBS

Using the terminal was required to move the source files and create directories into the OBS target directories. As the GUI file browsing app “Dolphin” is denied of those “drag’n’drop” abilities (protected parent directory, access denied) into /usr/ directory.

But, there is some beneficial use of “Dolphin” since it allows copying paths of directories and pasting them into terminal.

Two locations are of interest to have RTSP Plugin working:

  • Location where to copy/move “obs-rtspserver.so” file
    /usr/lib/x86_64-linux-gnu/obs-plugins/
  • Location where to copy/move localized “*.ini” files (UI translations)
    /usr/share/obs/obs-plugins/obs-rtspserver/locale/

Using extracted files form previously downloaded plugin distribution file “obs-rtspserver-v3.1.0-linux-qt6.deb” and reading the instructions, I got the plug-in in place and working.

As I mentioned before for the instructions on github, the file paths and directories are not the same as on my PC. I used it just to understand what files are important.

With “sudo mkdir -p” in terminal I created the required destination directories: “obs-rtspserver” and inside it “locale” directories in “/usr/share/obs/obs-plugins/“.

Terminal command to create required destination directories:

Bash
sudo mkdir -p /usr/share/obs/obs-plugins/obs-rtspserver/locale/

Now I used “cd” terminal command to navigate into “locale” directory where I extracted downloaded translation “*.ini” files.

And moved extracted files from /locale/ directory to above created destination.

With terminal command “mv” (Warning!: this command deletes source files upon copying them to destination):

Bash
sudo mv * /usr/share/obs/obs-plugins/obs-rtspserver/locale/

Again using “cd ../../../../” command to navigate back into “usr” directory and from there into “64bit” directory where plugin .so file is located by instructing computer with “cd obs-plugins/64bit/” to “move” into it.

Last thing is to get the “obs-rtspserver.so” file into its right place.

Bash
sudo mv * /usr/lib/x86_64-linux-gnu/obs-plugins/

Making sure that I can stream between two PCs with OBS in LAN

Now I have streaming server with OBS and rtsp plugin I do a test stream session.

Two steps are required for test or a big deal local stream over rtsp protocol.

  • Start RTSP server in OBS on streaming PC, and
  • On the stream “viewer” (receiving) PC in OBS add an “Media source” source that will “play” the video form server.

When first time starting streaming with the RTSP Server I change few settings and parameters.

  • Enable “Audio Tracks [1] ” checkbox since I want sound
  • Also enable “Multicast” checkbox
  • And in URL “rtsp://localhost:554/live” change the default “554” port number to any other that is available, not in use or otherwise blocked

Press “Start” button,

Before moving to “Stream Player” PC I need to read the server PC local area network IP address from it’s network adapter properties.

LET’s PLAY LIVE!

With now obtained stream server IP, port number and URL format I can setup the OBS Media Source to view the stream on second PC.

I add and configure OBS Media Source on stream player PC by unchecking “Local File” option.

That changes Media Sources properties to show options to connect to streaming server.

In “Input” field I enter the URL information from server:
rtsp://obs_rtsp_server_IP:PORT_Number/live

“Use Hardware decoder when available” I usually leave disabled, but it depends on player PC hardware cap and stream source encoder in use.

Superior streaming server performance benchmark tool

This setup is my preferred method of testing encoder options, server load and performance as weal as sound settings and audio levels in Hot Live environment.

This post is also available in de_DE, hi_IN, pt_BR and sv_SE.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *