Bug #5252
"iptv network" htsp stream doesn't randomly start
0%
Description
I recently added an automatic iptv network (.m3u playlist as source for mux/services).
Then mapped some services to my already existing channels shared with dvb-c adapters.
The problem is: starting a channel stream, the "input" field on the status page shows normal data throughput but the "output" field is stuck at "0".
This happens randomly and ONLY when profile is "htsp" - the attached picture shows the described case.
This is annoying because:
- Have to STOP/PLAY the channel until it works
- The stream doesn't abort automatically (no output data "timeout")
The stream configuration page has a data timeout field but I believe that it only cares for input data (it doesn't care about output data).
Files
History
Updated by Jaroslav Kysela about 6 years ago
--trace parsers : https://tvheadend.org/projects/tvheadend/wiki/Traces , describe channel / time where the problem occurs
Updated by Luis Alves about 6 years ago
Here it is:
Bad tune (0kb/s output): https://pastebin.com/KnsWvAM0
Good tune: https://pastebin.com/qn1cptcF
Updated by Luis Alves about 6 years ago
side by side:
(left is bad, right is good)
test 1: http://www.mergely.com/roIrJCW5/
test 2: http://www.mergely.com/aqsK05HX/
The numbers on 'pcr', 'dts' and 'pts' seem to be the "main" difference (on the bad tune they seem to be way off).
Updated by Luis Alves about 6 years ago
Done tests using transcoding stream profiles and it has the same issue.
Updated by Jaroslav Kysela about 6 years ago
It looks like clock wrapping issue. The non-working PCR values are around 8589875192 which is 0x1ffff17f8. The wrap mask for the PTS/PCR clock is 0x1ffffffff, so the value 8589875192 means -59400 which is basically OK (DTS is around zero, thus the difference is fine).
So, the question is - where the packets are dropped? It might be probably tsfix. Try "--trace parser,tsfix" .
Updated by Luis Alves about 6 years ago
I just did a quick hack on the code that "fixes" the issue: https://pastebin.com/qVWhQv83
It basically ignores the first packet... my bets go to the dts=0
Will do the tsfix trace and report back.
Thanks!
Updated by Luis Alves about 6 years ago
tsfix log w/o above hack (never recovers):
https://pastebin.com/C0f8iaKP
tsfix log with above hack:
https://pastebin.com/26YP5Kjw
Updated by Luis Alves about 6 years ago
Hi Jaroslav,
Please confirm if this is the correct fix (it seems to solve the issue):
Updated by Luis Alves about 6 years ago
Updated by Luis Alves about 6 years ago
After looking at the inline func pts_diff, doesn't it make more sense to be just this:
?
Updated by da h4xX0rz1sT about 6 years ago
0kb/s output size, that sounds familiar.
Could be related to #5256, pls see there.
At least TVheadend lacks the robustness to detect the problem in both bugs, which it could.
HTH,
/HXZ
Updated by Jaroslav Kysela about 6 years ago
- Status changed from New to Fixed
The fix was applied to 4.3 master.