Push local RTMP stream to OSMC

Hi everyone.
I am trying to push a local stream to osmc in order it to watch the stream automatically as soon as the stream gets live.
Here is my situation

  • I have set up a local RTMP stream server via nginx on my RPi (running osmc), following instructions here
  • I am using Open Broadcaster (obs) on windows to stream PC screen, games and everything else.

I am able to watch the stream from any device in my local network (other PC, phone…) by accessing the stream address rtmp://[RPi nginx server].
Now, I would like the server to push the stream to osmc screen as soon as the stream gets live.

I thought about a solution using the http server, something working like the firefox extension send to XBMC, probably using the JSON-RPC API but I don’t know how to trigger it.
I am not very familiar with Python coding but I can easily understand solutions using it.

By the way, which would be the best extension to watch a local RTMP stream without pushing it (by launching extension and selecting the stream to watch) ? I am planning to have multiple streams running on my server and I would like that only 1 address pushes the stream to osmc and the others to be available “on demand” from osmc.

Thanks in advance for your help !

Hi all.
Does someone has any idea ?
Thanks

You could try following the directions from that link: Getting started with nginx rtmp · arut/nginx-rtmp-module Wiki · GitHub

If you add

exec_push omxplayer -o both --live rtmp://localhost:1935/live/stream;

in the “application” section (in rtmp{server{}}), nginx will start omxplayer as soon as a stream is received on the server.

That worked well on my Arch Pi, but there may be some additionnal things to verify on OSMC since there is a default display (the interface).