Picture breakup watching live TV from a Raspberry Pi 4 running TVHeadend Client in LibreELEC

  • Hello,

    I bought a Pi 4, 4GB memory. I use it to run LibreELEC 9.2.1 for Pi 4 with the Tvheadend HTSP Client (Version 4.4.21.1). This connects to TVHeadend server running on a Pi3B+ that is running on OSMC but with the mediacenter on that Pi stopped... so it runs just (I think) Jessie.

    I am getting lots of picture artifacts and occasional popping and squeaking of sound and sound falling out of sync with picture. In TVheadend server there are lots of continuity errors. The problem is worse on HD channels but no channel gives a solid clear picture, HD or SD.

    What I have tried:

    • The signal strength is good because when I hook the satellite cables and terrestrial cable up to my triple tuner enigma2 box the picture is solid.
    • I also tested by plugging the terrestrial cable directly into the back of my TV and the picture is rock solid.
    • I also tried playing with the de-interlaced settings... well I don't really know what I am doing with them but I tried them all and none helped.
    • I set "Adjust Framerate" to "Always"... not sure if it made any big difference.

    Here are some logs.. taken when viewing a particular terrestrial channel that gives rock solid picture when cable is connected directly to TV but gives constant picture break up when the co-ax cable is connected into an enigma2 satellite triple tuner box with minisatip running that feeds the channel to TVHeadend and then on to the LibreELEC Client.

    paste /storage/.kodi/temp/kodi.log

    dmesg | paste

    By the way... I had set this up another way and still was getting some picture break up but much LESS breakup... I had the TVHeadend server on the PiB3+ running OSMC and using just this Pi on its own with the TVHeadend HTSP client also on that OSMC Kodi install. That gave some picture breakup still which is why I got the Pi4 because I thought I needed a more powerful and dedicated Kodi client to play the ip tv streams. But unfortunately I actually have even worse picture now with the Pi4.

    Any help much appreciated!

    Flex

    • Official Post

    If using deinterlaced media make sure the 1080p@25/29.97/30 modes are NOT enabled in the whitelist so that Kodi will default to 50/59.94/60; as Kodi only outputs progressive and needs to render each interlaced half-frame as a full frame, requiring double the frame rate. Also set "Adjust refresh" to start/stop not always.

  • Thanks chewitt,

    I tried what you suggested... Set "Adjust refresh" to start/stop. I also went in to the Whitelist menu and well I don't really know what I'm doing there but I went to System > Display > Whitelist and enabled these...

    1920x1080p 60.00Hz

    1920x1080p 59.94Hz

    1920x1080p 50.00Hz

    1680x1050p 60.00Hz

    1600x900p 60.00Hz

    1280x1024p 60.00Hz

    1280x720p 60.00Hz

    1280x720p 59.94Hz

    1280x720p 50.00Hz

    The Kodi Resolution is set to 1920x1080p

    Refresh Rate: 50.00

    Limit GUI size 1080p

    I'm still getting blocky picture breakup all the time. I'm not sure what the reason is... My use case is watching live TV from a satellite dish and rooftop aerial piped through a sat>ip server (minisatip) to TVHeadend installed on a Pi3B+. When the picture is breaking up I see the "continuity error" count going up in TVHeadend. Maybe this means the source of the picture breakup is nothing to do with the Pi4 HTSP Client on LibreELEC?? Maybe network communication

    Other things I tried:

    I have a usb drive with movies recorded from the TV. I connected that to the Pi4 with the latest LibreELEC and the picture and sound is fine. So it's only live tv that is affected.

    As mentioned above... the TVHeadend server is running on a Pi3 B+ installed on OSMC. Viewed through the osmc HTSP client on that Pi3B+ I get a far better picture although to confuse things, when I had both clients running... LibreELEC on Pi4 and OSMC on Pi 3B+ then both clients had constant picture breakup. Both are Kodi 18.6.

    Chewitt, I read in another post that you have a Pi4. Have you ever used it with TVHeadend server to watch live TV? If so, did you manage to get a solid picture and what are your settings exactly?

    Cheers,

    Flex

    • Official Post

    I watch live TV on an RPi4 in Dubai from a TVH server (DVB-C) shared by one of Kodi developers in Helsinki with all traffic routed via a WireGuard tunnel that egresses in the UK, but without any noticeable issues that aren't easily explained by other things consuming bandwidth on the Dubai to UK leg, or bad weather in Finland. Why? .. because there is no terrestrial TV in Dubai and no option to use a Satellite receiver in the development where I live so it's the only way I get to test DVB related things. I also have access to a TVH server in Germany but the Finns don't dub everything and my schoolboy German sucks so the Helsinki server is more usable :)

    No need to whitelist the non-1080p resolutions. Set Kodi GUI to 1080p60.

    Re-reading the original post, I think you need to solve the server side issues as bad signal/reception or processing in the server is going to result in issues that can't be resolved client side. I doubt the client is the issue, although some of your original config wouldn't help.

    I'm not much good with the server end as I never self-host it..

    • Official Post

    Have you ever used it with TVHeadend server to watch live TV? If so, did you manage to get a solid picture and what are your settings exactly?

    for Tvheadend you use plain default, just select your sources and scan for the channels

    Tvheadend basically just directly streams the pure video stream to your Kodi client

    A basic setup needs basically no setup besides those things I mentioned, main failure is that ppl start changing settings at video profiles and stream profiles at Tvheadend, that is not needed and not wanted for 99% of the users.

  • Thanks CvH,

    That's how I have set up my Tvheadend... Configuration > General > Base > DSCP/TOS = Default and nothing complicated anywhere else either.

    I get a lot of continuity errors in the streams when the client is LibreELEC on a Pi4 and TVH is on a separate Pi3B+. Whereas if I also have the Kodi client in OSMC on the same Pi3B+ that TVH is on then I get less continuity errors. But I still get some errors and they are more likely when playing HD channels and I can't really stream more than one channel at a time or the continuity error count goes up even more.

    I'm beginning to think that TVH is somehow extremely sensitive to imperfections in the signal along the cables coming from the satellite and terrestrial aerials on my roof. The SNR and Signal Strength are both at 73% now as I am playing a satellite radio channel and no errors at all. Using the same cables and reception equipment connected to my satellite decoder box gives a rock sold picture whether playing SD or HD channels and I can stream a second one fine using the enigma2 VU+ plugin from OpenwebIf.

    So it's very frustrating to read other people having stable set-ups because I don't know how their setups are different from mine. There are so many different things that could be causing the continuity errors but no easy way to understand the exact source of the problem. Maybe I need to get a new dish and aerial, new cables and a new router too? I use minisatip running on my enigma2 satellite box (with enigma2 turned off) to feed TVH. Maybe a hardware sat>ip like the Digibit R1 would be better?

    I will try installing TVH on the Pi4 and use LibreELEC on the Pi3B+ as the client but I think there is some kind of interference going on around the Pi that will still give me continuity errors regardless of what I try...

    Flex

    • Official Post

    The problem is the RPi3 (also 0/1/2) due its crappy usb/network HW.

    The only proper working device at the RPi 0-3 is the RPi dvb-t hat.

    What works:

    - use RPi0-3 as client to a Tvheadend server

    - use RPi0-3 as Tvh server and Client at the same device

    In general don't do a Tvh server at RPi0-3 if you want to stream it over the network.

    The Digibit R1 works great but also here is the Rpi0-3 not good.

    The communication is via done UDP and not TCP that results in dropped packets/continuity errors. Workaround for that is using perexg firware for the Digibit R1 and activate SatIP over TCP at the minisatip settings.

  • Thanks CvH,

    That explains why I get worse results when the tvheadend client and server are on separate Pis... lack of gigabit ethernet in the Pi3B+. I like the idea of that Digibit R1 firmware using TCP instead of UDP. That could reduce the continuity error count also.

    Today I was all set to install tvheadend server on a Pi4 (which has gigabit ethernet) but for some reason both my Pi4s suddenly won't boot up. Now I just get a colourful/rainbow screen when I turn them on but they won't boot. I'm asking for help over on the Raspi Forums but not getting any responses!

    Flex

  • I'm beginning to think it was an apt update and apt dist-upgrade that I ran the night before both my Pi4s stopped working. I've left two posts on the Pi forums but got no takers. After the first one gave the rainbow screen I put the same sd card in the other pi then it also gave the rainbow screen and neither have worked since then.

    1. I tried updating the eeprom to the latest version. I get that blinking green light pattern with no sd card in there indicating it is ready to boot a card. Then I get no blinking green lights when I put an sd card in there, just rainbow screen on the TV.

    2. The sd cards I am trying are the same ones the Pi4s were booting a day earlier... one has LibreELEC, another Ubuntu 20.04 for Pi4 and then Raspbian Buster Lite.

    3. I used the Pi Imager Tool to download the latest Pi Buster Light 32-bit OS which is supposed to work on any Pi. The Pi 4s won't boot it but my Pi1 will.

    4. The hdmi cable is working because I see the Pi 1 booting up on the TV.

    5. I am using the official Pi power supply.

    Looking at the Pi forums it seems a recent update is causing a lot of problems with chromium. Maybe the same update can brick a Pi4? I don't know what else to try except see if I can get them replaced under warranty.

    Any ideas much appreciated!

    Flex