If I use wget on the service (http://10.0.1.200:9981/play/ticket/stream/service/7f91e773910e858d58d0e640e4fc0e70?title=Service01%20%2F%20FFmpeg), wget downloads a few "K", then just sits there waiting for more. It never comes though because TVH has already disconnected from my flask app.
Here is the log:
2022-10-27 17:30:06.267 service: 12: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a2a892850 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 11: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a313a7790 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 10: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a2855b790 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 9: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a2bc3c790 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 8: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a2bc8d3d0 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 7: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a2bdc2a90 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 6: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a238f9550 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 5: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a3a660cd0 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 4: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a3a660b50 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 3: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a3a660910 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 2: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a3a660790 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 service: 1: Test/http://10.0.1.7:8001/play/Service01 si 0x7f7a3a6606d0 weight 0 prio 11 error 0 (OK)
2022-10-27 17:30:06.267 mpegts: http://10.0.1.7:8001/play in Test - tuning on IPTV #1
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 0000 (0) [20/0x7f7a39894020]
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 0001 (1) [16/0x7f7a39896aa0]
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 0010 (16) [20/0x7f7a41963570]
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 0011 (17) [20/0x7f7a41964a90]
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 0011 (17) [16/0x7f7a42d02ab0]
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - started
2022-10-27 17:30:06.268 tbl-eit: uk_freesat: grab started
2022-10-27 17:30:06.268 tbl-eit: uk_freesat_eit: grab started
2022-10-27 17:30:06.268 tbl-eit: uk_freeview: grab started
2022-10-27 17:30:06.268 tbl-eit: nz_freeview2: grab started
2022-10-27 17:30:06.268 tbl-eit: nz_freeview1: grab started
2022-10-27 17:30:06.268 tbl-eit: viasat_baltic: grab started
2022-10-27 17:30:06.268 tbl-eit: Bulsatcom_39E: grab started
2022-10-27 17:30:06.268 tbl-eit: uk_cable_virgin: grab started
2022-10-27 17:30:06.268 tbl-eit: eit: grab started
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 1FFB (8187) [20/0x7f7a3a8ae020]
2022-10-27 17:30:06.268 tbl-eit: mgt: installed table handlers
2022-10-27 17:30:06.268 psip: psip: grab started
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 1000 (4096) [8/0x7f7a236f2f10]
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 0100 (256) [8/0x7f7a236f2f10]
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 0101 (257) [8/0x7f7a236f2f10]
2022-10-27 17:30:06.268 mpegts: http://10.0.1.7:8001/play in Test - open PID 1000 (4096) [16/0x7f7a3a8af560]
2022-10-27 17:30:06.268 subscription: 004D: "HTTP" subscribing to service "Test/http://10.0.1.7:8001/play/Service01", weight: 100, adapter: "IPTV #1", network: "Test", mux: "http://10.0.1.7:8001/play", provider: "FFmpeg", profile="pass", hostname="10.0.1.7", client="Wget/1.20.3 (linux-gnu)"
2022-10-27 17:30:07.907 service: Test/http://10.0.1.7:8001/play/Service01: Status changed to [Hardware input]
2022-10-27 17:30:07.907 service: Test/http://10.0.1.7:8001/play/Service01: Status changed to [Hardware input] [Input on service]
2022-10-27 17:30:07.907 service: Test/http://10.0.1.7:8001/play/Service01: Status changed to [Hardware input] [Input on service] [Demuxed packets]
2022-10-27 17:30:07.907 service: Test/http://10.0.1.7:8001/play/Service01: Status changed to [Hardware input] [Input on service] [Demuxed packets] [Reassembled packets]
2022-10-27 17:30:07.907 webui: Start streaming /play/ticket/stream/service/7f91e773910e858d58d0e640e4fc0e70?title=Service01%20%2F%20FFmpeg
2022-10-27 17:30:07.907 tbl-base: sdt: onid FF01 (65281) tsid 0001 (1)
2022-10-27 17:30:07.907 tbl-base: sdt: mux http://10.0.1.7:8001/play in Test
2022-10-27 17:30:07.907 tbl-base: sdt: sid 0001 (1) running 4 free_ca 0
2022-10-27 17:30:07.907 tbl-base: pat: 0x7f7a23e3d980: tsid 0001 (1)
2022-10-27 17:30:07.907 tbl-base: pat: sid 0001 (1) on pid 1000 (4096)
2022-10-27 17:30:07.907 tbl-base: pmt: sid 0001 (1)
2022-10-27 17:30:07.907 tbl-base: pmt: pcr_pid 0100
2022-10-27 17:30:07.907 tbl-base: pmt: pid 0100 estype 27
2022-10-27 17:30:07.907 tbl-base: pmt: type H264 position 0
2022-10-27 17:30:07.907 tbl-base: pmt: pid 0101 estype 15
2022-10-27 17:30:07.907 tbl-base: pmt: type AAC position 0
2022-10-27 17:30:38.893 webui: Stop streaming /play/ticket/stream/service/7f91e773910e858d58d0e640e4fc0e70?title=Service01%20%2F%20FFmpeg, client hung up
2022-10-27 17:30:38.893 subscription: 004D: "HTTP" unsubscribing, hostname="10.0.1.7", client="Wget/1.20.3 (linux-gnu)"
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 1000 (4096) [16/0x7f7a3a8af560]
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 1000 (4096) [8/0x7f7a236f2f10]
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 0100 (256) [8/0x7f7a236f2f10]
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 0101 (257) [8/0x7f7a236f2f10]
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - stopping mux
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 0000 (0) [20/0x7f7a39894020]
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 0001 (1) [16/0x7f7a39896aa0]
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 0010 (16) [20/0x7f7a41963570]
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 0011 (17) [20/0x7f7a41964a90]
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 0011 (17) [16/0x7f7a42d02ab0]
2022-10-27 17:30:38.893 mpegts: http://10.0.1.7:8001/play in Test - close PID 1FFB (8187) [20/0x7f7a3a8ae020]
2022-10-27 17:30:38.894 epggrab: grab done for http://10.0.1.7:8001/play in Test (stolen)
2022-10-27 17:30:38.894 psip: Calling _psip_stop
I can see that it is TVH that disconnects because the python generator is exited by flask when a client disconnects. Using prints I can see that it happens immediately after starting.
If I enable the av library in TVH, then the stream will play... But I shouldn't have to enable the av library because the stream is already compatible... I'm just restreaming it.
The fact I am getting a few K with wget and sometimes I see a single frame or two in VLC also suggests the stream is compatible. It just decides to disconnect right away for whatever reason.