phaze75 Thank you for your efforts put into this issue so far.
You are welcome.
The final test that I wanted to achieve on this issue was to see how TVH handles the change in PIDs without the complication introduced by encryption.
I hacked TVH to ignore the CA tags embedded in the PMT of my unencrypted sample stream and then started playback using both VLC and Kodi individually.
When the PID transition occurred, VLC (http) glitched slightly and played for a few seconds before freezing permanently. Playback on Kodi (htsp) froze for at least 2-3 minutes, but then resumed in roughly the right place.
I got lots of error messages about DTS discontinuity, etc.
2025-11-11 14:41:39.890 [WARNING] mpegts: too much queued input data (over 50MB) for TSFile, discarding new
2025-11-11 14:41:40.106 [WARNING] TS: TSfile Network/Multiplex [onid:0001 tsid:03ED]/ORF2St HD: H264 @ #3010 Continuity counter error (total 1)
2025-11-11 14:41:40.111 [WARNING] parser: TSfile Network/Multiplex [onid:0001 tsid:03ED]/ORF2St HD: H264 @ #3010: DTS and PCR diff is very big (685745)
Just before the Kodi unfreeze, the log was bombarded with dozens of DTS discontinuity errors before settling down and then Kodi proceeding without error.
2025-11-11 15:02:20.796 [WARNING] tsfix: transport stream H264, DTS discontinuity. DTS = 138378623, last = 137728823
2025-11-11 15:02:20.796 [WARNING] tsfix: transport stream H264, DTS discontinuity. DTS = 138648623, last = 138378623
At the second transition, it seems like Kodi jumped back in time to just after the first transition. The stream played for several minutes before my test system spontaneously rebooted.
I think that I have 2 findings:
1) Streaming results seem to depend on the client and/or the protocol in use.
2) TVH sees the change in the DTS, tries to compensate (tsfix messages), but does not totally succeed. Perhaps the DTS change is too large to handle.