Kodi Community Forum

Full Version: Cycle Through RTSP Streams? Stuck!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Kodis,

I'm not one to come asking for help at the drop of a hat. I only do so now out of desperation, as I have tried just about everything.
Thank you so much to any who takes the time to read this!

Here's The Story
I have 4 RTSP streams, each one pointing to a different camera on my IP camera server, something like this:
rtsp://admin:[email protected]:554/cam?chan=1
rtsp://admin:[email protected]:554/cam?chan=2
rtsp://admin:[email protected]:554/cam?chan=3
rtsp://admin:[email protected]:554/cam?chan=4

I want to have those 4 streams display in Kodi automatically as the screensaver as either
  • Cycling through each stream for a set durations (say 10 seconds)

  • Simply displaying all four feeds in a single output (a Mosaic)

Trying The Cycling Setup
I put all 4 streams in a single .strm file, set the screensaver to play the strm file.
Success! The chan=1 feed loads! ...and then it never stops playing Undecided. It seems there's no way to specify/limit the duration of each entry in the strm file
Attempted solution: Tried send JSON commands from a Python script on a separate server to "next track" at set intervals... this didn't work as the 'next' command wakes the screensaver.

Trying The Mosaic Setup
Tried using a 'mosaic' stream from VLC: Had a separate (local) media server take all 4 rtsp streams, used VLC mosaic to combine them, then stream to Kodi. Problems! - significant video quality loss, frame skipping, and (most problematic) a significant time delay which is no good at all for obvious reasons with security cameras.
Tried the same thing using ffmpeg on media-server side - same story

Any solutions at all for this?? I've reached the conclusion that any kind of transcoding is really not an option if I am to retain video quality and avoid delay.

Thanks heaps if anyone has any ideas Big Grin
There are a couple of add-ons in this field in the official repo I think.

This one comes to mind immediately, and I think there are others (although it's not an area I have interest or experience with personally so I can't say how applicable or relevant they may be).

Have a look and see if they help with what you are trying to achieve or may be an alternative solution.
(2016-10-03, 02:44)DarrenHill Wrote: [ -> ]This one comes to mind immediately, and I think there are others (although it's not an area I have interest or experience with personally so I can't say how applicable or relevant they may be).

Thanks Darren. I forgot to mention I did try a few different plugins, including this one. Unfortunately they (including the one you mentioned) don't have a screensaver or 'load-when-sytem-is-idle' feature. Nor do they have 'automatic cycle' or 'mosaic' features.
Then you may need to make an add-on request and see if someone is willing and able to assist in creating something suitable.

It's a little bit of a niche usage, but not an unknown one so someone may be able to help based on what already exists (unless someone can point you to an already-existing solution, but it sounds like you've already checked out those already).
Quick question when you're doing the mosaic streams are you using the links to the full resolution streams? Does it all stream ok in VLC but the lag only starts when viewing on Kodi?

My cams have a main stream (which goes to my capture device) and then a sub stream which I use for viewing externally or on lower resolution devices. Given that you're going to be quatering the resolution when you put the into a 4x4 grid it would make sense to only pull the the lower resolution streams.