cabernetwork / cabernet

Cabernet allows control of IPTV streams. Plugins supports DaddyLive, Pluto TV, XUMO, M3U/XMLTV.XML files (SamsungTV, STIRR, DistroTV, Plex TV)
https://cabernetwork.github.io
MIT License
184 stars 25 forks source link

Requests lib does not support HTTP/2.0 protocols #114

Closed rocky4546 closed 9 months ago

rocky4546 commented 10 months ago

Providers are sometime using HTTP/2.0 protocols and the requests library only supports upto HTTP/1.1. The recommendation is to move to HTTPX library that supports HTTP/2.0. When HTTP/2.0 is used by the provider, the connection is refused and dropped causing that video packet to not be received.

This being a major upgrade will be applied to a new release number, instead of a patch upgrade. Once fully implemented, the requests library should not be required and the new HTTPX library will be needed.

rocky4546 commented 10 months ago

Adding parallel processing of video packets to reduce 404 and timeout errors. Looks like providers will have a sweet spot for the number of parallel pulls at one time.

rocky4546 commented 10 months ago

RC04 is not bad. It has lots of logging and the values are hard coded right now, but daddylive seems to be running much better.

rocky4546 commented 10 months ago

Seem to have a good version with RC06; however, concerned about memory usage when provider is struggling to respond to video packet requests. Currently, will continue to use memory when provider delays occur until a memory exception occurs (not good thing). Believe the best answer is using the memory size of the processed video packet queue to determine if there are too many issues with the stream and to shut it down (configuration setable). Alternatively, could also use the number of packets in the processed queue instead of the size. Issue is the packets are from 1 second to 10 seconds sizes and from 480p to 1080p, so memory usage can vary extremely based on number of packets.

rocky4546 commented 9 months ago

RC08 will be the last version for the httpx updates. requests will be fully removed at this point. Additional enhancements to 0.9.14 to follow. Recommend staying with RC08 until all enhancements are complete, but your choice.