general performance questions (and rare artefacts on HD channels with Sat>IP)

  • Hi,

    I own a new 65" 4K TV since Saturday.

    For that matter I also bought a Sat>IP server (Kathrein EXIP 418), to make use of my old TV in the sleeping room (without Sat-wireing) - just using an FireTV stick.

    I the living room next to my TV I was using a Windows10 HTCP (with integrated IR-receiver) with Kodi and DVBViewer(+Media Server).

    But since it was using old HW (A10-7870k from 2014) and such a solutions consumes a lot of Power (70-100W), I insteads decided to go for RasPi with LibreElec and a TVHeadend server.

    I recently got everything to work and am not looking back ever since. I really like the RasPi with LibreElec! :love:

    But sadly, now that I start watching TV with it, I noticed that I rarely get artefacts on HD channels (like "Das Erste HD").

    It happens like 2-5 time per minute. Which would kind of be acceptable (--> my wife also said its fine for her), but is of course not as flawless as I wanted it to be (and the DBVViewer Win10 HTPC was).

    At the soccer games (half finals of the Euro) this was mostly seen at the ball, when it was moving fast. Then is was surrounded with those fragments. Or when the pictures complete switches to another scene, then sometimes those artefacts are more widely spread.

    The network should NOT be the issue. I have a 1GB connection over Fritzbox7950 on all the devices.

    I measures the speeds with JPerf and get the same ~990.000 on all the cables in all my house (measuring from the cellar, where the Sat>IP server is located.

    Also I don't get those artefacts using SIPTV app on the LG TV itself (direct .m3u-plaback from the Sat>IP server, not using TVHeadend).

    Same with my FireTV Stick using Kodi. No artefacts at all using the same TVHeadend-server running on my new RasPi.

    So it's most probably related to RasPi and/or LibreElec.

    When I turn on logging one thing seems weird to me: the RAM usage is close to its maximum - although I'm using the 8GB version of Raspi 4:


    Also on that screenshot you can see a framerate drop to 40.0. The framerate is 99% of the time toggeling between 50 and 48 FPS.

    But frequently it drops down to values like 45-46. And on rare ocasions you can see around 40-42.

    I think the cap is 50, because i set my refresh rate to 50Hz.

    But where are the drops coming from? The CPU util is <40%.

    On my Firestick its far higher (70%ish). And the Framerates are even lower - still I don't see those artifacts.

    Please help me!

    P.S.: I tinkered with ALL! the settings. Here is my latest setup, which tended to create the lowest frequency on artefacts:

    OS: LibreElec 9.2.7 with TVHeadend 4.2

    Resolution: 1920x1080P (@50Hz) --> to me the 4k resolution was no better image at all, and I can only use 30Hz for it.

    HQ Scaler: 20%

    adapt frequency: at start/stop of playback

    Sync Playback to screen: off

    HW-acceleration: on (MMAL)

    Deinterlace Mode: MMAL - Bob

    Edited 2 times, last by LOLinger78 (July 8, 2021 at 3:23 PM).

  • Go to Best Answer
    • Official Post

    pls have a look at the status page of Tvheadend (if errors appear have a look if the continuity errors rise)

    the satip tuners have a general problem with dropping network packages, so depending at your network this could be a problem

    make sure you have disabled lan eco mode at your Fritzbox, that has a bad track record creating every kind of problems

  • Well the problem seems to only apear using my RasPi as the "player".

    On my FireStick I have no issues at all. And it also gets the stream from the THVHeadend on that RasPi (even over WiFi).

    Sat>IP (@cellar) --> Fritzbox (@office room) --> Raspi (=TVHeadend server) (@living room) --> Fritzbox again --> Fritz WLAN Mesh Repeater (wired connection) (@childrens room next to sleeping room) --> WiFi to FireTV (Kodi with TVHeadend client add-on) (@sleeping room) ==> NO artefacts

    vs.

    Sat>IP --> Fritzbox --> RasPi (TVHeadend server) --> SAME RasPi (Kodi with TVHeadend client add-on) ==> artefact issues


    So I really wonder how the FritzBox or Sat>IP should be responsible.

    But I checked the FritzBox and theres no Eco setting on.

    With TVHeadend there a lot of continiuty errors (more than 5000 right now on tuner one).

    What does that mean exactly? (And, if this is a problem, why is it not causing any issues using the FireTV stick as the TVH-client?)

  • Continuity errors in TV Headend mean that the stream from your SAT>IP server is not 100% error free - each one of those continuity errors is an error in the transport stream being received - which could mean corrupt video and/or audio. Different h.264 decoders will behave differently with corrupt video streams - some will mask errors better than others. You need to get rid of those continuity errors whatever you do.

    I have a Kathrein EXIP 418 - though because of building work it's not currently running - but I use a Celeron Linux box as my TV Headend server platform and have it next to the Kathrein server connected via a small 8-port Ubiquiti managed switch. I have only very occasional continuity errors with that set-up. (A couple of them a day at most?)

  • Hmmm.

    Today I de-intalled and re-installed TVHeadend.

    With checking for like 3-5 minutes the artifacts now are gone !!!

    Also I dont have any cont. error since the reinstall:

    Very strange ?!? (I didn't plug in or out anything for the THV reinstall - all doine over the add-on page in Kodi.)

    I will report tonight, when I have time to watch TV for a bit longer, wheter the fragments and cont. errors are (hopefully) gone forever.

    But another very strange thing is:

    after this reinstall I now have all 5 ports open all the time (I binded only 5 of the 8 to THV):

    As you can see from the load (and network needs) they are not really doing much (if I use all 5 ports to actually stream sth. , then cpu load is ~15% and network ~15MB/s).

    But before the reinstall it always went down to 0 again (or the number currently used) when I turned off streams on the clients.

    When I restat the RasPi it goes to 0 (during the shutdown reboot tmes), but shortly after booting the EXIP show "5" used again.

    Any explaination for this?


    CvH

    The setting is in the main network settings. But as I said I didn't use Eco.


    Update: after 3h runtime with the TV just running:

    Still no artifact. Im very happy (--> false alarm)

    But I get cont. errors like mad.... (Which I wouldn't care if thing are working)

    Where are they coming from CvH ? (You seem to be an expert. In every thread I read about related topics, you at least showed up once giving nice advice. THUMBS UP!!!)

    I mean I measure the network from cellar (EXIP 418) to the living room (RasPi) with FPerf.

    And its flawless ~990.000.

    But if I understood you right, then those cont errors are not created withing the "SAT to receiver to network" path, but in the network itself (EXIP to FRITZ to RasPi) - right?

    Edited 6 times, last by LOLinger78 (July 15, 2021 at 8:14 AM).

  • Also I dont have any cont. error since the reinstall:

    maybe you enabled some setting that created that problem ? normally you can keep everything at default and it should work okay at least

    all 5 ports open all the time

    do you allow "idle scan" at every tuner ?

    I have it just at 2/8 and this works okay without keeping all tuners busy.

    But I get cont. errors like mad.

    I guess you overloading the satip device (I have no experience with that particular one), so it is possible that you have corrupted output at a single tuner. Depending at load this could spread to all tuners.

    Could, not saying it is :)

    If you had enabled the idle scan this might fix it.

  • I mean I measure the network from cellar (EXIP 418) to the living room (RasPi) with FPerf.

    sat>ip is udp based, so if you drop packages you loose informations

    there could be several different issues so I can't rule out the one or the other

    For example, you can try disable all traffic at your home lan and have a look what the errors do, then start some heavy file transfer (NAS ...) and observe if the errors get more or less etc. Thats the fun with udp based protocols :D

    In the past even expensive LAN switches created a mess in combination with Sat>IP.

  • I have been using SAT>IP tuners (Digibit R1) for several years without any problem, even one of my SAT>IP tuners (Mecool KIII Pro) is 300 km away managed by the minisatip service and sent via VPN to the tvheadend server. I only see continuity errors for channel switching, but they are few and do not affect image quality. Months ago I saw many video image pixelation and continuity errors on the remote tuner when using the ZeroTier VPN. Since I have been using the WireGuard VPN, everything works perfectly. In short, I think the alarms generated by CvH are excessive.

    My question is: Is LOLinger78 using a stable version of LibreELEC 9.2.X? because it is not the first time that someone with RPi complains on this forum while using a LE 10.x version.

    Edited 6 times, last by elonesna (July 10, 2021 at 6:14 PM).

  • In short, I think the alarms generated by CvH are excessive and unfounded.

    Not sure what you mean by this?

    CvH is a well respected contributor on these things and they're trying to help.

    Continuity errors are just that - errors. AIUI they are flagged when the MPEG2 Transport Stream headers in a transport stream are discontinuous. (i.e. they indicate corruption in the received stream)

    Continuity errors on directly attached tuners (i.e. USB tuners or a Pi DVB-T2 TV Hat) usually indicate poor signal - but on network attached tuners (like SAT>IP) they can also indicate network issues due to packet loss. SAT>IP is UDP-based not TCP-based - so once a packet is lost, it's lost (TCP would allow a re-request, but UDP is 'faster' as it doesn't continuously handshake)

    Whatever the cause - you shouldn't be having continuity errors. Whether it's because your TV Headend server running on the Pi can't keep up (I'm assuming you're running on a Pi 4B but you don't say which model?

    Also are you running TV Headend on a standalone Pi (i.e. Raspberry Pi OS - formerly Raspbian - Lite + TV Headend either installed via apt or built from source) or are you using LibreElec as your OS for your Pi TV Headend server? I'd recommend the former not the latter - as for a TV Headend server you want the bare minimum. (Media Vault + TV Headend can be a nice lightweight combo though).

  • @noggin: I admit that my knowledge is lower than that of CvH, but that does not prevent me from disagreeing, based on my experience, with some of their statements. It is the first rule that is learned in universities and for me that happened 48 years ago.

    Yes - but accusing someone of unfounded alarm isn't respectfully disagreeing based on experience is it? This is a forum operated by volunteers.

    A bit of respect goes a long way - rather than accusations - particularly when someone is trying to help you...

    I was also taught at my universit.y that the plural of anecdote isn't anecdata...


    I have the same SAT>IP tuner and ran it for 6 months constantly recording BBC One HD, BBC Two HD, ITV HD, Channel Four HD, Channel Five HD and the part time BBC Four HD channel to a TV Headend system (so I always had the last 10 days or so of those channels archived). I had very few continuity errors (most recordings were 100% error free). This was using a Celeron PC connected to the same unmanaged switch as the SAT>IP tuner.

    Edited once, last by noggin: Merged a post created by noggin into this post. (July 10, 2021 at 4:41 PM).

  • I think the alarms generated by CvH are excessive

    I am sadly day one user of Tvheadend and Digi R1, so I had a very very bumpy start.

    I described possible problems that are "normal" due the design of the sat>ip protocol and results in such behaviour like described above.

    For example RPi0-3 + Satip is a bad idea in general because you add additional package drops on top due the crappy usb/lan chip.

    It could work, it could not work depending at how much drops are happening. Nobody can tell you, its a try and error thing.

    For example I am ran happily SatIP over WLAN without permanent errors, others could not even run it over the LAN without errors.

    All those problems are easily fixable if the server and the client understand SatIP over TCP instead of UDP, sadly not too much.

    have the same SAT>IP tuner and ran it for 6 months constantly recording

    depending at the tuners, recording is usually a lot less stressing for the hardware - in theory it should not matter, sadly already seen it matters to some extend (for example you can easily kill the Digibit R1 with it)

    Like said shot in the dark, but it is easily testable.

  • Thank you everyone for the feedback and responses.

    I spent soooo much time this weekend troubleshooting, but to me it becomes more an more evident, that the TVHeadend server is causing the mess - but only in combination with my new TV?!

    A very obvious proof to me is, that DVBViewer (-> just switching DVBViewer addon in Kodi, while running DVBViewer Medias Server on my Desktop) runs without any issues at all. So both my network and my SAT>IP must be basically working fine.

    (At least DVBViewer is oviously able to compensate possible flaws.)

    I am very close to just buying a Zotac Pi335 NUC and using Windown10 and DVBViever Media Server instead.

    The device has a 4A 5V PSU (RasPi is 3A), therefore it shouldn't consume much more power than the RasPi.

    BUT the weird thing is: my FireTV Stick on the old TV (47" fulll HD) works all fine with Kodi and TVH. No artifacts at all.

    --> Using the same TVH server on the RasPi, much longer Network path and using WLAN inbetween.

    Though as soon as I switch the FireTV STick over to my new TV (65" 4k) I suddenly get the same artefacts as with the RasPi connected!

    How can that be?

    (Using DVBViewer AddOn works on both RasPi and FireStick without an issue when paired with my new TV. And just to clarify: i am NOT using the 4k resolution. My Kodi is set to 1080p in all the cases: RasPi, FireStick paired with both TVs.)

    maybe you enabled some setting that created that problem ? normally you can keep everything at default and it should work okay at least


    I guess you overloading the satip device (I have no experience with that particular one), so it is possible that you have corrupted output at a single tuner.

    If you had enabled the idle scan this might fix it.

    Well, the artefacts were reduced a lot with the reinstall . But sadly that they are gone was a false alarm. They are still present like 1-2/min.

    Overloading the Sat-device is not the cause. I tested with all 5 streams running on my PC with VLC player and watched TV over DVBViewer. Still no issues.

    But on the other hand if only 1 Tuner is running via TVHeadend I already see those artifacts.

    The "5 tuners running" was another false alarm from myself, it always happens after restart of the device for some minutes. But after that "setup" THV drops them again and only occupies used ones from then on.

    Where can I turn on the "idle scan"? I couldn't find that option in THV.


    elonesna

    Yes, I am using 9.2.7 with THV 4.2. The 9.95.5 version had all kind of issues to me. E.g. MC not running at all. Also many times "restart" didn't work (both from Kodi and from SSH console) and I had to turn power to get the device back alive.

    Ma RaspPi is 4B with 8Gb of RAM (I think only 4B exists in an 8GB version, therefore I didn't state it explicitely).

    noggin

    No, I am NOT using it standalone. Instead I also use it as the source/media center for my TV.

    And yes, I did only try LibreElec so far. I thought this was especially geared towards the "bare minimum" as you say.

    Edited 9 times, last by LOLinger78 (July 12, 2021 at 9:24 AM).

  • noggin

    No, I am NOT using it standalone. Instead I also use it as the source/media center for my TV.

    And yes, I did only try LibreElec so far. I thought this was especially geared towards the "bare minimum" as you say.

    Yes - it's bare minimum for media playback duties. Once you start throwing PVR backends at it - it's not really bare minimum. It's also not optimised for that.

    I'd see how you go running just Raspberry Pi OS Lite and TV Headend on a Pi 4B and see if you still get thousands of continuity errors. It's only a MicroSDc card flash away.

    I wouldn't be running on a Pi 3B+ or earlier because of the USB LAN implementation that CvH mentioned. (The Pi 4B doesn't use its USB bus for LAN connectivity)

  • For me it helped to deactivate Timeshift in tvheadend. This results on a slow system/server the performance and cause artifacts.

    I am running tvheadend and kodi in 3 households with sat to ip with digibits.

    On a digibit it helped to install a custom firmware with TCP stream instead UDP. Don't know if there is one for your kathrein

  • For me it helped to deactivate Timeshift in tvheadend. This results on a slow system/server the performance and cause artifacts.

    I am running tvheadend and kodi in 3 households with sat to ip with digibits.

    On a digibit it helped to install a custom firmware with TCP stream instead UDP. Don't know if there is one for your kathrein

    Yes - with timeshift enabled you are constantly recording (and replaying?) as well as streaming. If you are using a Pi 3B+ or earlier and timeshifting on external storage then the disk access and SAT>IP streaming will all be going over the same, single, USB 2.0 connection.

  • Hi noggin

    I tried Buster with TVHeadend and Kodi.

    But the result is the same. I get the same rare artifacts like 1-2 per minute.

    Somehow TVHeadend seems to not work with my new TV. I still can't understand why it runs fine on my old TV. It just doesn't make sense.

    It's as if the server itself is working, but the displaying on my new TV creates the Artefacts (both from the RasPi and FireTV stick).

    Tinkering with video ram didn't help. Going to 1024 even made the Raspian not boot anymore.

    LibreElec came out of the box with 320MB, and increasing it also didn't help anything.

    After doing some research I found out, that its impossible to buy a proper Win10 Mini-PC in Mid2021.

    NUC 11 (the NUC11TNHi3 is very intresting with its 15W budget) is not sold at all in europe anymore. Prices are like 2x MRSP.

    And I just refuse to buy NUC 10 (Frost Canyon), because its sooooo much worse than NUC 11 (Tiger Canyon), but the prices are still really high.

    And all the other Mini-PCs are not really intresting, since they all ship with at least 65W PSUs (and need them).

    One of the better ones seems to be the Arus Mars (4500U), but it's 10W idle, 20W media playback and close to 50W under full load.

    And I already own a 4800U Laptop, which is not far from that either.

    Today I tried to get it running. But I was unable to get the wake on LAN working with it.

    It just doesn't wake up when it's in S3.

    Update: just figured it out. I had to activate the magic packet passthrough in the USB-LAN settings of the docking station. And also I needed to trigger the MAC-adress of the docking station instead of the laptop.

    But it now works.

    Although the DVB-Viewer PVR client brings wake on lan integrated, the "Advanced Wake on LAN" add-on in LibreElec is a lot more convenient.


    So far I went back to my old HTPC for now, and DVBViewer is running without any issues.

    But tomorrow I will instead setup the raspi with libreelec and remote control my laptop in the office with it.

    But to be honest:

    - SITPV app on ALL my devices RasPi (SIPTV Kodi addon), Firestick (SIPTV App) and LG TV (SIPTV app) - using direct m3u from my EXIP 418 Sat>IP

    - Home IPTV app (LG TV) - also m3u direct play from the SAT>IP

    - DVBViewer (Media Server) on all devices (even on my 2014 AMD APU)

    - VLC player using UPnP auto detection of the EXIP418

    - Sat>IP Viever (Android app) on my smartphone

    all run fine.

    So I can hardly see the "problems" on my side.

    Hopefully TVH is evolving one day and will be able to fix my "problems".

    Because it would definately be the best solution of all for me !

    Edited 3 times, last by LOLinger78 (July 13, 2021 at 11:45 PM).