Closed itprotj closed 1 year ago
Thanks for entering an issue. I would like to get some info from the log. While in DEBUG mode, if you can make a clean start so no tuners are running. Then go into TVH MUX and turn one of the channels from IDLE to PEND. This should cause Cabernet to run a tuner scan on just one channel. If we can get the tuner to stick, post the log info on the rows when the mux starts to scan through the end. Also, do not have the browser watching the home page. It just clogs up the log.
Hey matey,
Yep so tuner stayed active even after tvh had finished scan. Here is the log. It started to get cluttered with the logs of the browser as I went in after a minute or so to check if the tuner was still in use and rebooted cabernet after that.
Thanks for the log.
This is good information. I need to look into why the added item on the forked process queue is not being pulled off by Cabernet after 16:09:43. So, the tuner process was still running and sending data to Cabernet. Cabernet was not picking up the data. Will get back to you.
What does not make sense is Cabernet served the stream to TVH from 8:41 to 9:43. It looks like you have the timeout set to 60 seconds in TVH, but you said you set it to 30 seconds. Please clarify. Also, if it is set to 60 seconds, then Cabernet should have received a HTTP connection termination notice from TVH, but it is not listed. It just hangs waiting for TVH to finish receiving the stream indicating TVH did not terminate the connection. My first guess is something is wrong with TVH. Can you try using VLC with the same URL http://ip:5004/M3U/watch/USBC600018CF and see if we get the same results?
Hey Rocky
I've done some further testing with the advice you gave and apologies for wasting your time on this. It appears this is a TVH issue. Streaming directly from cabernet is working fine and disconnects the tuner properly when the stream is stopped. TVH on the other hand does not.
I take it the next step would be to raise this with the TVH community unless you feel it would be beneficial continuing here?
Thanks again
These are the TVH Debug logs for when I ran the cabernet stream from tvheadend. It says it has stopped the stream however looking at cabernet the tuner is still very much active.
2022-06-03 14:41:29.165 [ INFO]:http: 192.168.100.17: using ticket bb7af086b1a04538bd018628ec981636cc2d8889 for /stream/mux/85592b9cc71b70c158edbd6fee0fbcc0
2022-06-03 14:41:29.165 [ DEBUG]:mpegts: channels.m3u - CHIVE TV in Internet IPTV Streams - add raw service
2022-06-03 14:41:29.165 [ DEBUG]:service: 2: channels.m3u - CHIVE TV in Internet IPTV Streams si 0x7f1fa81854f0
I thought about giving you a small change file to increase logging, but we may be able to determine if it is a TVH bug. If you run the test and cabernet process/tuner hangs, then restart TVH. If the tuner clears after a short, then the issue is a TVH bug. Although strange, if this is the case, you can try going to 4.2 or 4.3 based on your current version. Also, I recommend trying jellyfin as a complete media server as well as DVR.
There is only one way I know to hang the cabernet processes. It is for the client to keep the HTTP connection open while NOT accepting any data from it. This will cause the queues to fill and basically plug up cabernet. I really cannot do much about this case. TVH as well as others squelch the data while the provider can provide the stream at a much faster rate. If the rates are different, cabernet has to buffer the data. If you restart TVH, then the connections will drop and cabernet should indicate the client closed the connection and do a cleanup on the tuner.
I thought about giving you a small change file to increase logging, but we may be able to determine if it is a TVH bug. If you run the test and cabernet process/tuner hangs, then restart TVH. If the tuner clears after a short, then the issue is a TVH bug. Although strange, if this is the case, you can try going to 4.2 or 4.3 based on your current version. Also, I recommend trying jellyfin as a complete media server as well as DVR.
There is only one way I know to hang the cabernet processes. It is for the client to keep the HTTP connection open while NOT accepting any data from it. This will cause the queues to fill and basically plug up cabernet. I really cannot do much about this case. TVH as well as others squelch the data while the provider can provide the stream at a much faster rate. If the rates are different, cabernet has to buffer the data. If you restart TVH, then the connections will drop and cabernet should indicate the client closed the connection and do a cleanup on the tuner.
Just to confuse us both even more, I restarted tvh with tuners being "active" in cabernet and the tuners are still in cabernet as active. How long are they meant to hang in cabernet for if tvh rebooted for instance?
Will have a look into Jellyfin.. I take it it is a lot more stable then TVH I would hope.. It seems the stability of tvh is very sketchy... a very comprehensive bit of software but a steep learning curve. All the live tv I use comes in on IPTV streams apart from some free to air stuff on HDHomeRun Tuners, as long as jellyfin can handle that it is worth a shot.
Thanks
I have found a case where the tuner was not disabled when a provider was not responding. This has been fixed and should be available in the next release. 0.9.9
Fix test successfully 0.9.9.7. With the additional state information on the main page, it will let you know what the state of every tuner is. I did have it lock up the queues and it still found a way to shutdown the tuner and cleanup the processes.
When tuning to different channels, Cabernet shows that a tuner is active for the channel I am tuned to (or tvh is scanning). However, the tuner is never marked inactive and keeps spawning new python.exe processes and they don't end by themselves either.