How to stop an addon when player stops while playing a nonstandard satip rtsp stream?
#61
Hello Phunkyfish

believe me or not, but it took now in total 16(!) month until kodi19 became available als LibreElec for the Pi 3, so even if we did our first trials with the beta 19 on Android Firestick already in the end of 2019, I had to wait until now to switch my SAT-IP Receiver from http:// to rtsp:// for my "main" raspi 3 TV..

When doing that, I made two observations:
the satip:// protocol seems not to have made it into the final release -  when I send a satip:// URL to play via jsonRPC Player.Open(), I get 

CreateLoader - unsupported protocol(satip) in satip://192.168.1.113/?freq=1

but that's no problem, as rtsp:// is working.

But that brings me to observation 2, which was also a problem in Kodi 18 with http:// URLs, but I've hoped that kodi 19 with rtsp:// will fix it:

When I'm using the simple IPTC client, I can move through the channels with the cursors keys nearly instandly from one channel to the next, it just takes some seconds for the receiver to switch.


But when I try to switch remotely during watching a channel by sending a Player.Stop() / Player.Open(NewURL)  sequence, the new URL always fails. I always have to wait around a minute (60 secs) before I can sent a new URL after stopping the old one.

So I guess that this 60 secs could be a prototol timeout in my satip server, but which does not appear with the simple IPTV client. So when remembering our initial investigation about the implemention of rtsp/satip, there was a protocol command TEARDOWN which the client shall send to terminate a running stream. 

So I assume that the simple iptv client correcty sends the TEARDOWN command before switching a channel, while my remote Player.Stop() command simply cuts the rtsp control tcip link, which it interpreted by my satip server as a network failure and so the server waits for 60 secs for the tcp connection to come back. 

So my questions would be:
  • Should I raise a ticket for this (Where is the best place?) 
    or
  • does a simple workaraund exist and would I just have to use another jsonRPC sequence to make it work?

Please give me some advice about how to proceed best ;-)

And of course thanks for your great work  - your player and the iptv client is doing a perfect job here all day
Reply
#62
(2022-04-18, 08:29)stko Wrote: Should I raise a ticket for this (Where is the best place?) 

Click on the Bug Tracker link at the top of the web page.

And if you want to "ping" a fellow Kodi forum member, just add a @ in from of his(her) name, like @phunkyfish . ^^
Reply
#63
Ok, satip should work. Maybe we fixed it ffmpeg but forgot to added to the right place in kodi. Let me check that. If I have a test build for this do you a Windows or Mac to test this?

Regarding the json API I’m really not sure.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#64
Thanks for your amazing fast response!

So 'll wait for your feedback regarding the satip protocol request identification in kodi, and in the meantime I'll open a ticket regarding the 60 secs timeout issue in Player.Open(),ok?
Reply
#65
... issue is made....
Reply
#66
What platform can you test a fix for supporting satip:// on Mac/Windows or something else?

Here is Windows 64bit on nexus: https://mirrors.kodi.tv/test-builds/wind...ip-x64.exe
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#67
Hi

it's more a something else as a Mac/Windows :-) I've only Linux here..

But is is just the naming only (which wouldn't matter so much imho), or does it have some effect on the underlying protocol handling?
Reply
#68
It’s not only naming. There is a large number of differences in how satip in ffmpeg is managed as opposed to rtsp.

Do you build kodi yourself? I think you did, LibreElec I believe.

Just add the change from this PR to your build and hopefully it works:

https://github.com/xbmc/xbmc/pull/21281

If you just want the patch:

https://github.com/xbmc/xbmc/pull/21281.diff
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#69
@stko were you able to try the patch? It should apply on Matrix or master.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#70
Hello @phunkyfish 

sorry for the later answer, to much other trouble during the week  Sad

No, I've never build LibreElec by myself- but there's always a first time, so I'm actual set up the build environment. Thanks to docker it sounds quite easy to manage according to the LibreElec documentation, but I'll see...

I'll do a dry run first with the actual LibreElec repository, and if there really a bootable raspi image will come out, then it comes to the advanced part, because then I need to find out how/where I have to place your PR or patch inside the libreElec structure - hopefully it possible at all, because actual the LIbreElec folder does not contain the file (DVDFactoryInputStream.cpp) to patch yet, but the documentation said that it takes ~ 8 hours to initially download and build it all  - so tomorrow I hopefully knows more :-)
Reply
#71
@stko as far as I know there is somewhere in the LibreElec build config where you can add patches.

Let me see if I can find out.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#72
Update: The vanilla LibreElec build really gave an bootable image in the end-  but I've checked out the the wrong repository tag and ended up with V.20 Alpha instead of V.19 - that happens when doing things in a hurry ...

So 'll rebuild it with the actual released version to download all needed references again, apply the patch and recompile.
Reply
#73
@stko V20 will work too, for testing purposes it’s all good. To add a patch to to the build just download the patch (eg https://github.com/xbmc/xbmc/pull/PRNUMBER.patch) to packages/mediacenter/kodi/patches/ and then rebuild.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#74
@phunkyfish I thought it would be better to use an released version to then not getting other problems from the alpha version, and I'll need the working version here to run Kodi then - but maybe the idea was not so good, because the build of the released version fails again and again, and I've to restart it all the time to move some more steps forward. Actual it's at step 271 of 276, so nearly done, but I will have only one hour left today for testing, so I hope the build will come to an end soon...  Rolleyes
Reply
#75
so finally the build went through
I've patched the file and did another 
  docker run --rm --log-driver none -v `pwd`:/build -w /build -it -e PROJECT=RPi -e DEVICE=RPi2 -e ARCH=arm libreelec make image

but satip is still not recocnized.

Code:

2022-04-24 14:30:18.013 T:765      INFO <general>: UDP: Listening on port 9777 (ipv6 : true)
2022-04-24 14:31:45.585 T:775   WARNING <general>: Create - unsupported protocol(satip) in satip://192.168.1.113/?freq=11347&src=aa&pol=v&msys=dvbs2&sr=22000&fec=23&rolloff=35&sid=11170&pmt=6700&pids=0,6710,6720,6700
2022-04-24 14:31:45.585 T:775     ERROR <general>: Exists - Error checking for satip://192.168.1.113/?freq=11347&src=aa&pol=v&msys=dvbs2&sr=22000&fec=23&rolloff=35&sid=11170&pmt=6700&pids=0,6710,6720,6700
2022-04-24 14:31:45.617 T:578      INFO <general>: VideoPlayer::OpenFile: satip://192.168.1.113/?freq=11347&src=aa&pol=v&msys=dvbs2&sr=22000&fec=23&rolloff=35&sid=11170&pmt=6700&pids=0,6710,6720,6700
2022-04-24 14:31:45.618 T:776      INFO <general>: Creating InputStream
2022-04-24 14:31:45.619 T:776   WARNING <general>: CreateLoader - unsupported protocol(satip) in satip://192.168.1.113/?freq=11347&src=aa&pol=v&msys=dvbs2&sr=22000&fec=23&rolloff=35&sid=11170&pmt=6700&pids=0,6710,6720,6700
2022-04-24 14:31:45.619 T:776     ERROR <general>: CVideoPlayer::OpenInputStream - error opening [satip://192.168.1.113/?freq=11347&src=aa&pol=v&msys=dvbs2&sr=22000&fec=23&rolloff=35&sid=11170&pmt=6700&pids=0,6710,6720,6700]
2022-04-24 14:31:45.619 T:776      INFO <general>: CVideoPlayer::OnExit()



The second build went very fast, maybe too fast.. so I'm not sure at all if the build system has discovered the updated file and recompiled it or not - any proposal how I could make a clean build but without downloading all the packages again and overwrite all local changes?
Reply

Logout Mark Read Team Forum Stats Members Help
How to stop an addon when player stops while playing a nonstandard satip rtsp stream?0