Mailing List Archive

1 2 3 4  View All
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------
Changes (by Mike Bibbings):

* Attachment "gdb.2.txt" added.

backtrace chanscan seg fault

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------
Changes (by Mike Bibbings):

* Attachment "mythtv-setup.20200730131428.19054.log.zip" added.

mythtv-setup log chanscan seg fault

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal <kdewaal@…>):

In [changeset:"b2672ec3abd3b7a2178aa45b3acccdc8342cc17a/mythtv"
b2672ec3a/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="b2672ec3abd3b7a2178aa45b3acccdc8342cc17a"
Sat>IP client KeepAlive timer

Improve the RTSP KeepAlive timer handling, inspired by how it is done in
the Ceton RTSP handler.

Refs #13121
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:22>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal):

Hi Mike,

The above patch does solve a stability issue that came up when stress
testing with a local DVB-S minisatip and a real networked Sat>IP box, also
DVB-S.

However, your DVB-T2 scanning crash does look different. The plan is to
reproduce this by attaching a MyGica USB stick to a RPi3 and run minisatip
on that. I do not expect that the hat does make any difference.

N.B. If there is any special incantation for the minisatip that you use
please post that also.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:23>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Mike Bibbings):

Hi Klaas,

Nothing special for minisatip on Pi3, invoked at default by sudo
./minisatip

built from master source https://github.com/catalinii/minisatip
{{{
minisatip configuration


Linux DVB: enabled
Common Interface (needs DVBEN50221): disabled
OpenSSL (AES as part of DVBAPI): enabled
Embedded system: disabled
DVBCSA (needs libdvbcsa): disabled
Netceiver support: disabled
SatIP Client: enabled
Static: disabled
dvbapi: enabled
axe: disabled
enigma: disabled

}}}

I use the same default minisatip build and configuration everywhere
including Xubuntu 18.04 and Xubuntu 20.04


Mike

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:24>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal):

The segfault when scanning for DVB-T2 channels can be now reproduced, with
the MyGica USB stick and minisatip in my development box. To be continued.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:25>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal <kdewaal@…>):

In [changeset:"2daf1a046ac268cd648e89652064b2603c386d6d/mythtv"
2daf1a046a/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="2daf1a046ac268cd648e89652064b2603c386d6d"
Sat>IP client -- Discard old RTP packets

After tuning to a new channel discard all RTP packets received before the
new channel is
tuned and the PLAY command is given with at least one pid.
Do not process any RTP packet after a TEARDOWN command is given.

Refs #13121
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:26>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Mike Bibbings):

Hi Klaas,

I am still seeing mythtv-setup seq fault whilst channel scanning on UK
Freeview (DVB/T-T2) with latest master e015e7a. In this case it is a
TBS6280 tuner with minisatip on same machine.

Attached are mythtv-setup.log and associated gdb backtrace. Note the seg
fault happened after a number of channel scans (full scan).

Mike

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:27>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------
Changes (by Mike Bibbings):

* Attachment "mythtv-setup.20200809123425.79080.log.zip" added.

mythtv-setup log tbs6280

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------
Changes (by Mike Bibbings):

* Attachment "gdb-tbs6280.txt" added.

gdb backtrace tbs6280

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal):

Hi Mike,

Thanks for testing, looks like this is the same crash as before. So the
discarding of old packets does not solve it, only makes the problem less
frequent.
Looks like a concurrency/locking issue as valgrind does not show anything.

Other bugs that are still present:
- When configured with a single tuner instance and Schedule as Group
disabled, then the backend crashes on EIT when the single tuner instance
is closed. This is accompanied with Qt error messages about doing things
in the wrong thread. Removing SATIP from the close in tv_rec.cpp, or
having at least two tuner instances, does fix this for now.
- Channelscan timeouts while actually finding all the channels.

Have been testing with minisatip and DVB-C and that works OK.

To be continued.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:28>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by peper03):

Hi Klaas,

I had a bit of time to play around with this and immediately hit the two
bugs you mentioned.

I've not managed to find a solution to them but thought I'd add what I've
found so far:

The crash appears to be because SatIPChannel::Open is called in
ChannelBase::CreateChannel via TVRec::CreateChannel at start-up in the
main thread, but SatIPChannel::Close is called from the TVRec thread when
the recording. This is what is causing the error messages about the wrong
threads and appears to be what is leading to the SIGSEGV.

ChannelBase::CreateChannel almost immediately closes the channel if it's
DVB, HDHOMERUN or a V4L card, but not if it's SatIP. Adding SatIP here
stops the recording even starting and I haven't had time to investigate
why.

Regarding the channel scan, I'm not sure if it's the same issue you are
seeing but I had to tell it to use only DVB-S instead of DVB-S2 before the
scan would work. The DVB-S2 channels were still found and a brief look in
Wireshark seemed to indicate that MPEG-TS packets were being received when
DVB-S2 was selected but nothing appeared in mythtv-setup and it timed out
on the first transponder.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:29>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal):

Hi Richard,

Thanks for looking into this. You are completely right about the bits in
ChannelBase, I had overlooked this. Getting the recording to start again
after the channel has been closed in ChannelBase is being fixed.

What is still going wrong in the channel scan is timeouts. They are almost
all caused by, after doing the tuning, receiving a PAT from the previously
tuned frequency. Tuning is complete when all PMTs of all channels have
been received and this then never happens. How to filter out the packets
from the previous frequency is still an issue. One possibility is to check
more on transport ID if that is known, but this is a biggish change to the
common code and not limited to SatIP.

About DVB-S/S2, in the "Full Scan (Tuned)" you have to specify the
delivery system and the other tuning parameters of the initial frequency
you want to start with.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:30>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal <kdewaal@…>):

In [changeset:"00a94e00c199766a60cf3ace57a48b0299a4d0d9/mythtv"
00a94e00c1/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="00a94e00c199766a60cf3ace57a48b0299a4d0d9"
Sat>IP client -- Limit number of pids in PLAY request

Limit the number of pids in a PLAY request to 32.
If the requested number of pids is higher then select all pids.
This selects then the complete transport stream without filtering.
Such a high number of pids only happens with channel scanning
when the PMT pids for all channels in the PAT are selected.
Testing with hardware Sat>IP box, the Telestar Digibit R1, shows
that this box becomes unhappy when the number of pids is too large.
The software minisatip implementation does not have this limit.
Note that the limit for the number of pids in the DVB code
in MythTV is 64. This is not enough for some transports found
on satellite Astra-1 on 19.2E.

Refs #13121
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:31>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal <kdewaal@…>):

In [changeset:"d6e04a4e8a4d9880ef2ec18116d906ed4aa1109f/mythtv"
d6e04a4e8a/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="d6e04a4e8a4d9880ef2ec18116d906ed4aa1109f"
Sat>IP client -- Reset tuner lock status

Reset tuner lock status after TEARDOWN and SETUP messages.
This prevents accessing the pid handling code with the list of pids from
the previous channel when there is no tuner lock.

Refs #13121
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:32>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal <kdewaal@…>):

In [changeset:"027f1291b486e96676c908695ca67a73155395e2/mythtv"
027f1291b/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="027f1291b486e96676c908695ca67a73155395e2"
Sat>IP client -- Never close channel

Keep the channel always open.
This avoids a Qt issue about opening and closing in different threads that
only
happens when "Max Recordings" is set to 1 and the "Schedule as Group" is
unchecked.
A more elegant solution would be to insure that opening and closing
happens always
in the same thread like it is done in the ceton driver.

Refs #13121
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:33>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal <kdewaal@…>):

In [changeset:"cf09ffe847a9b5c9e12d5ea140f6bd22cf799f91/mythtv"
cf09ffe847/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="cf09ffe847a9b5c9e12d5ea140f6bd22cf799f91"
Sat>IP client -- Add recording of MPTS streams

Add the capability to record a full transport stream, similar to how it is
done for the HDHomeRun tuners.
Reduce the interval to wait before processing received RTP packets from
200 to 20 milliseconds.
This greatly reduces the number of missed RTP packets and the
corresponding "Sequence number" error messages.

Refs #13121
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:34>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal <kdewaal@…>):

In [changeset:"728b5a68db2ef7ed600efc4f1b82b46e4bffd247/mythtv"
728b5a68d/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="728b5a68db2ef7ed600efc4f1b82b46e4bffd247"
Sat>IP client -- Fix compilation warning

Fix compilation warning introduced with the MPTS patch.

Refs #13121
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:35>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal <kdewaal@…>):

In [changeset:"d9589fd1de4b6482d70ec75b799a0dc998055e44/mythtv"
d9589fd1de/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="d9589fd1de4b6482d70ec75b799a0dc998055e44"
Sat>IP client -- Remove unused variables

Removed two unused variables and other cosmetic cleanup.

Refs #13121
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:36>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal):

Current status:
- Supports DVB-C/T/T2/S/S2
- Does NOT support DiSeqC yet
- Supports channel scans
- Tested with minisatip (DVB-C/T2/S/S2) and with the Telebit Digibit R1
box (DVB-S/S2)
- No crashes observed for some time now

Implementation details that might be improved:
- Open/close code. Channels are always kept open because opening and
closing gives all kinds of errors.
- Reducing the RTP packet processing interval from 200 to 20 ms does fix a
problem with missing RTP packets in MPTS recordings but there is no
logical reason why this should make a difference. A possible reason can be
the implementation of the underlying packetbuffer code because random
numbers are used to identify packets and there is always a risk of
collusion when storing a large number of packets.
- Channel scans work OK but sometimes the PAT of the previous transport is
processed. This does cause a timeout but the scan results are OK. The
difficult part is here that MythTV assumes that as soon as a tuning
command is given that everything that is received after that is from the
requested frequency. This is not really true in networked environments
where packets are buffered. One possible solution, which would improve
scanning for all tuner types, is to filter on transport ID when that is
known. This requires storage of the transport ID in table dtv_multiplex
and it somehow changes the concept of tuning from tuning to a frequency
into tuning to a transport ID.
- Tuning timeout default values are quite high and are correct for
DVB-S/S2 but could be reduced for DVB-C and DVB-T2. The actual values can
of course be configured in the Capture Card page of mythtv-setup.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:37>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by jksj461):

I have tried a Telestar Digibit Twin but could only get one input to work
and then with some packet loss. I have posted some log fragments in
[https://forum.mythtv.org/viewtopic.php?f=3&t=4102]. It looks to me like
the box is defective so I am not posting here as a fault. I will return it
in the next few days. I can supply more log info if you think it is a
genuine bug rather than defective hardware.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:38>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by jksj461):

Testing with a Digibit R1- produces good results with 2 active inputs. Log
shows good quality recordings with some but low packet loss
{{{
tv_rec.cpp:825 (FinishedRecording) TVRec[3]:
FinishedRecording(65791_2020-11-21T00:05:00Z) good recq:<RecordingQuality
overall_score="1" key="65791_2020-11-21T00:05:00Z"
continuity_error_count="10" packet_count="19911688" />
}}}
I use a remote frontend so the network may be busy occasionally.
If I up the number of inputs in use to 3 and add EPG, noticeable glitches
appear on the display about every 10 mins.
My question is have you tested using the standard firmware in the Digibit
box :-
Firmware Version V1.25.0.157 (30-03-2016 17:48)
or are you using [https://github.com/perexg/satip-axe].

I note that satip-axe is an implementation of minisatip which supports TCP
streaming.
If I switch to this firmware would the mythtv client work with TCP streams
and do you think it would be a sensible solution.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:39>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal):

I have not changed the firmware in the box and it is indeed "Firmware
Version V1.25.0.157 (30-03-2016 17:48)".
I have tested with two inputs simultaneously and as noted, this works OK.

However, I found a correlation between "Sequence errors", indicating RTP
packet loss and consequently continuity errors, and EIT "write to disk"
actions. This could be the cause of the periodic display glitches.


MythTV only supports UDP at the moment. Minisatip can do both UPD and TCP
and maybe going TCP is the way forward, but for the moment the plan is to
check the UDP packet handling.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:40>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal):

Testing with the SatIP box the "Sequence errors", other than those that
appear after tuning to a new channel, are almost all gone when the UDP
kernel buffers are increased from 256kb, the default on my system, to 4Mb.

This can be effected with the following commands:

{{{
$ sudo sysctl -w net.core.rmem_max=4194304
net.core.rmem_max = 4194304
$ sudo sysctl -w net.core.rmem_default=4194304
net.core.rmem_default = 4194304

}}}

Investigation shows that the data is not lost in satiprtsp.cpp; all
packets that are received from the UDPSocket are stored in the buffer and
retrieved from the buffer without loss.

There are also no lost packets at the interface level; the network driver
has no errors and network statistics do not show lost packets.

Therefore all packets are lost in the UDP buffers; the packets are simply
not read on time by MythTV. This is demonstrated by the output of

{{{
cat /proc/net/udp

}}}
of which the last column is the number of packets lost.

Increasing the buffer size does give more latency. A full transport stream
from a satellite is about 40Mbit/second which is 5Myte/second, so 4Mb
buffering is 800 milliseconds.

I do not know how much buffer memory is used by the /dev/dvb/adapter*/*
drivers but mythtv is capable of reading all data from these devices
without loss.

Using TCP instead of UDP will not solve anything as the packets are not
lost at the network level. TCP allows flow control between MythTV and the
SatIP box but the SatIP box will be less capable of buffering the stream
than the MythTV PC is.

Note that usually the PID filtering is done by the SatIP box; only when
the number of PIDs is more than 30 the full transport stream is received.
This is the worst case situation and this can happen with channel scanning
on some streams.
Normal recording always uses PID filtering by the SatIP box and then the
4Mbyte buffer should be big enough for perfect recordings.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:41>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13121: Sat>IP client support [ In reply to ]
#13121: Sat>IP client support
--------------------------------+-------------------------------
Reporter: cg@… | Owner: Klaas de Waal
Type: Patch - Feature | Status: assigned
Priority: minor | Milestone: 32.0
Component: MythTV - Recording | Version: Master Head
Severity: low | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+-------------------------------

Comment (by Klaas de Waal):

Increase UDP buffer size for Sat>IP

Try to increase the UDP buffer size for reading the Sat>IP RTP streams to
8Mbytes (decimal).
A log message is given when the system maximum only allows for a lower
value.
Change log messages to have only the cardid and not the device name on
each message.
This leaves more space for the actual message text.

Commit f0c708a89a3b762fa3ccbe3d8ccede7745000649

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13121#comment:42>
MythTV <http://www.mythtv.org>
MythTV Media Center

1 2 3 4  View All