UDP Stream stutters with no audio when TV turned off and on

We are using OSMC to stream an HD channel over UDP on a Pi2. The TV is a display sceen in a foyer so nobody really touches it. The TV is powered off automatically at 6PM and powered on the next morning at 9AM. I was hoping the UDP stream would still be playing the next morning and it was, kind of. It is stuttering and there is no audio.

I would like to say that SSH to th Pi and reboot. Then walk down to the tv to start the strm script would be workable, but alas, I cannot find the energy to do this everyday. I previously used openelec and the autostart script worked great, but I had to crontab to refresh the stream every hour as it just kept buffering continuously every day. I suspect same problem.

Now the stream is multicast on the same University network so I cannot see that bandwidth is an issue. I can only assume it is something to do with buffering or memory cache. The OSMC documentation is not getting me anywhere. Does anyone have any ideas?

I assume I can adjust the video and audio buffers but I need some guidance with this.

If not I need to find a solution to start a script after OSMC starts. Then I could just reboot every day via cron.

If anyone has any ideas I would be most grateful.

Thnx

http://kodi.wiki/view/HOW-TO:Modify_the_video_cache

While I am not sure if that solves your problem.
Would be an interesting test to have the video playing 24 hours without switching off the TV to see if that has an impact.

@reboot in crontab will do the job

Read this: Rpi 2 Loses Sync With Other Rpi 2 - Delay Increases Over Time

I suspect that is your issue. A nightly build may solve your issue if the stream can be flagged as realtime (but I’m not sure of the mechanism for that).

Looks like streams starting with udp:// or rtp:// are treated as realtime:

Give a Kodi 17 test build a try.

Many thanks. I have setup the advancedsetting.xml and the @reboot cron. Reboot is now firing up the stream as required. I guess I’ll have to wait until tomorrow for the results of that.

Thank you for that info. If no luck with advanced settings I will try Kodi 17 test build.

Alternatively I will just cron reboot at 9am every day.

Many thanks for your help.

Hmm, the stream has dropped out today and returned to the home menu. Would the details of what went wrong be in a log anywhere?

you can check .kodi/temp/kodi.log but without debugging enabled I doubt any details in there