[mythtv-commits] Ticket #13121: Sat>IP client support
MythTV
noreply at mythtv.org
Mon Nov 23 21:00:06 UTC 2020
#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
More information about the mythtv-commits
mailing list