pjbroad
Posts: 8
Joined: Sun Dec 16, 2018 8:39 pm

Choppy replay with TV uHat on pi zero w

Sun Dec 16, 2018 8:53 pm

I've had issues with choppy playback with the new TV uHat. I setup a pi zero w with the latest raspberian lite image, installed tvheadend package and set things up. I connected this back end to kodi. Everything works fine except the replay is choppy on all channels. I took the SD card out, put it in a pi 3b and plugged the hat into the pi 3b. With no software changes, this just worked and playback is very smooth.

So, should the TV uHat work OK on a pi zero w? Running top shows that the pi zero CPU is coping just fine. RF antenna and Wi-Fi setup is the same for both devices, wavemon shows the connection strength/speed is the same on both setups. There are lots of official pictures with the hat plugged into a pi zero so I assumed it would work.

Thanks.

itsmedoofer
Posts: 288
Joined: Wed Sep 25, 2013 8:43 am

Re: Choppy replay with TV uHat on pi zero w

Mon Dec 17, 2018 12:50 pm

Hi,

I think the instructions state that for playback a Pi 3 is recommended, getting the MPEG-2 key may help for SD channels..
If you want to watch TV on the Pi itself, we recommend using a Pi 2, 3, or 3B+, as you may need more processing power for this.
https://www.raspberrypi.org/blog/raspberry-pi-tv-hat/

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6049
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Choppy replay with TV uHat on pi zero w

Mon Dec 17, 2018 1:39 pm

Software decoding of MPEG-2 will be far too slow on the Pi0/1, so buying a licence key is effectively mandatory if you want that to work.
HD content is most likely H264, so slightly counter-intuitively I would expect that to work out of the box as the H264 hardware codec is licenced on all Pis.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

pjbroad
Posts: 8
Joined: Sun Dec 16, 2018 8:39 pm

Re: Choppy replay with TV uHat on pi zero w

Mon Dec 17, 2018 10:31 pm

Thanks for the replies. However, I'm not trying to watch TV on the same pi as has the TV card. I'm just using the zero for the tvheadend server part. I'm running kodi on another machine. The same other machine that works fine if I run the server on a pi 3 rather than a pi zero,

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6049
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Choppy replay with TV uHat on pi zero w

Tue Dec 18, 2018 10:07 am

pjbroad wrote:
Mon Dec 17, 2018 10:31 pm
Thanks for the replies. However, I'm not trying to watch TV on the same pi as has the TV card. I'm just using the zero for the tvheadend server part. I'm running kodi on another machine. The same other machine that works fine if I run the server on a pi 3 rather than a pi zero,
Using a Pi0W for just the tvheadend backend should be fine. Storing your recordings to SD card may cause issues though.

How are you connecting the Pi0W to the network? There are a number of dodgy USB LAN adapters that are actually only USB1.1, so limited at 12MBit/s. DM9601 rings a bell as the chip.
Streaming over wifi should be OK as long as you've got a reasonable signal, and at least an 802.11g network (54Mbits/s). 802.11n or 802.11ac would be better.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

pjbroad
Posts: 8
Joined: Sun Dec 16, 2018 8:39 pm

Re: Choppy replay with TV uHat on pi zero w

Tue Dec 18, 2018 12:40 pm

Thanks @6by9. Its a Pi Zero W so I'm using the built in Wifi. The wavemon tool says its getting 72MB rx/tx. It is a new pi zero w, so I will another one in case it's faulty.

Edit:
I tried another pi-zero-w and its just as choppy as the new one.
Last edited by pjbroad on Tue Dec 18, 2018 12:59 pm, edited 1 time in total.

itsmedoofer
Posts: 288
Joined: Wed Sep 25, 2013 8:43 am

Re: Choppy replay with TV uHat on pi zero w

Tue Dec 18, 2018 12:41 pm

pjbroad wrote:
Mon Dec 17, 2018 10:31 pm
Thanks for the replies. However, I'm not trying to watch TV on the same pi as has the TV card. I'm just using the zero for the tvheadend server part. I'm running kodi on another machine. The same other machine that works fine if I run the server on a pi 3 rather than a pi zero,
Apologies ! I have a similar setup, I will try maybe tonight or tomorrow with a ZeroW rather than the Pi2 that I'm currently using.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6049
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Choppy replay with TV uHat on pi zero w

Thu Dec 20, 2018 9:26 am

I didn't have a ZeroW with headers fitted to hand, so have tried it with a Zero and USB LAN adapter. No problems at all viewing with VLC on my laptop.

If both your devices are on the Wifi then you are doubling the bandwidth as typically data has to be sent to the AP, and then the AP forwards it on.
Sorry, not much more debug we can do remotely. If I can snag a Pi0W (or better still a Pi0WH) from the office then I'll try again tonight to see if it is the wireless that is the limiting factor.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6049
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Choppy replay with TV uHat on pi zero w

Thu Dec 20, 2018 11:47 am

6by9 wrote:
Thu Dec 20, 2018 9:26 am
If I can snag a Pi0W (or better still a Pi0WH) from the office then I'll try again tonight to see if it is the wireless that is the limiting factor.
Success, so try to remember to find out what happens over Wifi tonight.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

pjbroad
Posts: 8
Joined: Sun Dec 16, 2018 8:39 pm

Re: Choppy replay with TV uHat on pi zero w

Thu Dec 20, 2018 11:58 pm

Thanks @6by9, you are going above and beyond to help :)

I'm viewing on my desktop connected to the wired network. Both the pi0w and the p3 connect over the same wifi to the same desktop running kodi, but the p3 picture is fine, the pi0w is choppy. I've tried another pi0z and its the same choppy picture.

I wonder if TV RF signal strength is a factor? I get a perfect picture on all but a couple of channels on the p3, but no good channels on the pi0w. I did also noticed that if I reconnect my TV to the antenna (no splitting in any of my set-ups), I get a few additional channels and all channels are good quality.

Piemanagain
Posts: 2
Joined: Fri Dec 21, 2018 12:16 am

Re: Choppy replay with TV uHat on pi zero w

Fri Dec 21, 2018 12:57 am

Not sure if this is of any help.

I have just setup the Pi DVB hat and apart from an issue with not being able to log in as admin I still get choppy playback from a pI 3B+ tvheadend server on some devices not others.

I have tried the pi3B+ server on both wired and wireless didn't see any difference really.

an old client 2010 mac mini dual core 2.4Ghz running kodi and tvheadend plugin works fine reading streams. (there's a buffering pause initially but not at all bad)

a iphone 7 running tvhclient is also good.

an old 2010 i7 2.4Ghz Macbook pro is choppy both in firefox and safari via the tvheadend web gui, taking ages to load and buffering, pauses and goes out of sync. This machine is certainly faster than the mac mini and I suspect if running kodi it would be fine but perhaps as previously suggested it is a software decoding issue? perhaps with the web transport stream?
I can now confirm the macbook pro works nicely with kodi and the tvheadend add on

good luck.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6049
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Choppy replay with TV uHat on pi zero w

Fri Dec 21, 2018 10:47 am

pjbroad wrote:
Thu Dec 20, 2018 11:58 pm
I'm viewing on my desktop connected to the wired network. Both the pi0w and the p3 connect over the same wifi to the same desktop running kodi, but the p3 picture is fine, the pi0w is choppy. I've tried another pi0z and its the same choppy picture.

I wonder if TV RF signal strength is a factor? I get a perfect picture on all but a couple of channels on the p3, but no good channels on the pi0w. I did also noticed that if I reconnect my TV to the antenna (no splitting in any of my set-ups), I get a few additional channels and all channels are good quality.
Quick test on a Pi0WH and I get some odd results. It doesn't help that I've been having fun and games with my Draytek access points for a while where they won't route between two devices on the same AP(*).
Most of the channels I tried are fine, but Channel4+1 (COM7 ARQC, 746MHz for me) breaks up quite badly in the typical "bad signal strength" manner that DVB-T does. On Sandy Heath COM7 and COM8 are at only 49.6kW transmitted power instead of the 170kW , so it may just be the lower signal strength - I haven't checked the signal strength and error rates reported in TVH.

I have had a chat with the hardware designer for the TV-HAT. Pure speculation - no real evidence to back this up, and both devices have passed EMC tests. The wireless module of the Pi0W isn't in a can as on the 3B+, so I guess there may be different EMC patterns that could interfere with the TV-HAT, give lower S/N ratios and break up. We need to quantify it, which will really have to wait until the New Year.

One test I will try is switching the 0W to wired ethernet and see if that improves matters. And further does the Wifi chip "idling" cause issues vs totally disabling it. If anyone else seeing odd things can try either of those steps then they would be useful data points. I think "raspi-gpio set 41 dl" is going to be the magic rune to disable the Wifi chip totally, although adding "raspi-gpio set 45 dl" to disable BT as well would be sensible. (It may be "dh" at the end - need to check the default state when I have one in front of me again)


(*) Seems to be related to having VLAN IDs defined for the multiple SSIDs, remove the VLAN ID and it generally works. Must report it formally to Draytek.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

pjbroad
Posts: 8
Joined: Sun Dec 16, 2018 8:39 pm

Re: Choppy replay with TV uHat on pi zero w

Fri Dec 21, 2018 11:19 pm

@6by9 thanks again for looking into this. The p3 that is working OK is a 3 Model B (revision a02082). I'll try the steps to disable the wi-fi on both devices and let you know how that does, but it may take a couple of days for me to get a chance to do so.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6049
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Choppy replay with TV uHat on pi zero w

Sat Dec 22, 2018 7:43 am

The gpios to disable the WiFi and bt are different on the 3b+. I haven't got the numbers to hand but will try to dig them out when I have a moment.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1798
Joined: Thu Jul 11, 2013 2:37 pm

Re: Choppy replay with TV uHat on pi zero w

Sat Dec 22, 2018 9:33 pm

One thing worth considering is the quality of the coaxial cable you are using to connect the antenna to the TV HAT. You have a very weak signal from a distant transmitter and a strong signal from a local transmitter.
Though the frequencies of each are quite different, the TV HAT doesn't have bandpass filtering to cut out out-of-band noise. If your coax has poor shielding, it's quite possible that the wifi signal (at +20dBm) is swamping the weak antenna signal at ~-40dBm. Foil+braid screens are best for screening out high frequency interference - quoted as RG6 or "satellite" cable.
Rockets are loud.
https://astro-pi.org

pjbroad
Posts: 8
Joined: Sun Dec 16, 2018 8:39 pm

Re: Choppy replay with TV uHat on pi zero w

Sun Dec 23, 2018 5:53 pm

jdb wrote:
Sat Dec 22, 2018 9:33 pm
One thing worth considering is the quality of the coaxial cable you are using to connect the antenna to the TV HAT. You have a very weak signal from a distant transmitter and a strong signal from a local transmitter.
Though the frequencies of each are quite different, the TV HAT doesn't have bandpass filtering to cut out out-of-band noise. If your coax has poor shielding, it's quite possible that the wifi signal (at +20dBm) is swamping the weak antenna signal at ~-40dBm. Foil+braid screens are best for screening out high frequency interference - quoted as RG6 or "satellite" cable.
Thanks @jdb. However, I'm using the same cables for the pi3 b as the pi zero w, on the p3 b I get around 140 channels, many TV, all but one or two work fine. On the pi zero W, none of the TV channels work without constant break-up and freezing; very choppy. Everything is the same except the pi boards. The wi-fi, SD card, location and cabling. Replay of TV is on a separate desktop machine running Kodi, the same for both pi boards. My next step is to try disabling the pi zero W wi-fi and using Ethernet instead; Ethernet alone does not help. I also have a pi zero without wi-fi which I will try too. I tried another pi zero W but it had the had the same issue.

pjbroad
Posts: 8
Joined: Sun Dec 16, 2018 8:39 pm

Re: Choppy replay with TV uHat on pi zero w

Sat Jan 05, 2019 7:16 pm

Sorry its taken some time for me to follow this up. I can not get the raspi-gpio command to disable wifi. However, with my original pi zero w set-up, I'm now getting much better quality reception. The picture is still breaking up occasionally but nothing like what is was previously. I wonder if the recent change in the weather has effected my reception? I'll keep monitoring but would appreciate more help to disable wifi/Bluetooth on a pi zero w so that I can quickly check the effect if reception gets worse again.

pjbroad
Posts: 8
Joined: Sun Dec 16, 2018 8:39 pm

Re: Choppy replay with TV uHat on pi zero w

Sun Jan 13, 2019 1:04 am

I've been running on the Pi Zero W for a few days without issues using wifi, no choppy replay. Today all channels were choppy again, nothing has changed with the set-up, the pi was not event rebooted. I tried a reboot and still had choppy channels. I thought if it is interference, then perhaps separating the hat from the pi using a short ribbon cable might help. It does! All the choppiness is gone.

User avatar
mooblie
Posts: 119
Joined: Fri Oct 14, 2016 2:07 pm
Location: The Scottish Highlands

Re: Choppy replay with TV uHat on pi zero w

Sun Jan 13, 2019 2:11 pm

pjbroad wrote:
Sun Jan 13, 2019 1:04 am
............ I thought if it is interference, then perhaps separating the hat from the pi using a short ribbon cable might help. It does! All the choppiness is gone.
Brilliant! Good detective work! So a short ribbon cable is perhaps recommended, if using the TVhat on a Pi0W?

Would 6by9 (and the TVhat designer) care to comment?

----

Edit: Or maybe even using something like four of these weird-looking things between the Pi0W and TVhat:

Image

Return to “HATs and other add-ons”