Project

General

Profile

Bug #5252

"iptv network" htsp stream doesn't randomly start

Added by Luis Alves about 6 years ago. Updated about 6 years ago.

Status:
Fixed
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-10-10
Due date:
% Done:

0%

Estimated time:
Found in version:
latest github (master)
Affected Versions:

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

Capture.PNG (78.2 KB) Capture.PNG status tab shows 0 kb/S output data on iptv Luis Alves, 2018-10-11 00:00

History

#1

Updated by Jaroslav Kysela about 6 years ago

--trace parsers : https://tvheadend.org/projects/tvheadend/wiki/Traces , describe channel / time where the problem occurs

#2

Updated by Luis Alves about 6 years ago

Which subsystems should I trace?

#3

Updated by Jaroslav Kysela about 6 years ago

Edit: parser

#4

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

#5

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).

#6

Updated by Luis Alves about 6 years ago

Done tests using transcoding stream profiles and it has the same issue.

#7

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" .

#8

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!

#9

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

#10

Updated by Luis Alves about 6 years ago

Hi Jaroslav,

Please confirm if this is the correct fix (it seems to solve the issue):

https://pastebin.com/CCsF5yg3

#12

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:

https://pastebin.com/e58p2U5r

?

#13

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

#14

Updated by Jaroslav Kysela about 6 years ago

  • Status changed from New to Fixed

The fix was applied to 4.3 master.

Also available in: Atom PDF