jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Raspberry Pi TV Hat Playback Issues

Mon Oct 29, 2018 8:09 pm

First of all, thank you for such a great device. I have it up and running on my 3+, and I'm using TVHClient on my Android phone to watch live TV and schedule and watch recordings at my leisure.

My only issue is when I'm in the web interface (on another computer) and go to the 'Electronic Programme Guide' and click on the icon of the TV to watch a standard definition channel with the built in viewer the stream judders quite badly. The only warnings I get are:

Code: Select all

libav: forced frame type (5) at 602 was changed to frame type (3)
If I play the .m3u streams (any channels) via VLC or similar I get perfect streaming. All my recordings are perfect as well.

I'm using a fresh install of Raspberry Pi Lite (I don't enjoy the LXDE Experience, so use the command line version).

Has anyone had similar issues?

Thanks

Peter

**UPDATE**

Just as an update I started again with a fresh version of Rasbian Lite and installed the version from the TVHeadend website:

https://tvheadend.org/projects/tvheaden ... positories

Code: Select all

echo "deb http://apt.tvheadend.org/stable raspbian-stretch main" | sudo tee -a /etc/apt/sources.list.d/tvheadend.list
sudo apt-get update
sudo apt-get install tvheadend
This increases the version from 4.2.4 to 4.2.7

Now I can play HD channels fine using the web based player with no warnings showing and no judder (as long as I use 'matroska' from the pull-down menu on the player. However I can't play any standard definition channels with the web based player. Everything still plays fine through VLC and recordings are fine.

robind694
Posts: 10
Joined: Fri Jun 29, 2012 10:56 am
Location: Glasgow

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 2:20 pm

hi i to had difficulty wit stuttering but took another route i installed libra elec and after a bit of mucking about found that if you install tvheadend server first configure it then install tvheadend client it works great no stuttering great guide and an going to set up pvr to record to a pi hard drive regards
Robin

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 2:24 pm

Thanks. Can you set up recording within LibreElec?

I'm a little disappointed that this wasn't picked up in the testing phase as it seems to be a commonly reported issue.

Still a fantastic device though!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21333
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 2:32 pm

jonesypeter wrote:
Wed Oct 31, 2018 2:24 pm
Thanks. Can you set up recording within LibreElec?

I'm a little disappointed that this wasn't picked up in the testing phase as it seems to be a commonly reported issue.

Still a fantastic device though!
It's not a problem with the HW, but I believe with the software being used and its setup, and we don't test every single combination of SW out there.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 2:37 pm

Hi James,

Thanks for the reply. I'm not using any special configuration. Just the standard install procedures provided by the foundation.

I did do further testing with other versions as detailed in my post, but the warnings and poor playback appear with the standard recommended configuration.

This seems to be a common issue having read reviews on the sales sites.

As I say it is a great device though.

Peter

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5182
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 4:45 pm

The "Watch TV" button uses the browser's built in video decode support, and most browsers won't support MPEG-2 and possibly not H.264.
That means the Pi has to transcode to a format supported by browser (e.g. VP8).

Basically don't use that button. The play buttons on individual channels will allow a proper media player to be launched like VLC.
That will play the broadcast formats directly without requiring transcode.

Even better use Kodi (either running on a Pi or the PC/phone/tablet) which has full integration with tvheadend allowing you to watching live TV, recording and set up advanced timers for recording series and programs with wildcarded search strings.

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 4:57 pm

Thank you Dom,

Could you arrange for the instructions to be changed as this directly contradicts the official information provided (which I think is probably why people are reporting issues.

To watch a TV channel in the browser, click the little TV icon to the left of the channel
listing, just to the right of the i icon. This brings up an in-browser media player.


https://www.raspberrypi.org/app/uploads ... TV-HAT.pdf

If there are options to help test new products in the future and help with documentation I would love to volunteer.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21333
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 5:05 pm

The instructions say "
To watch a TV channel in the browser, click the little TV icon to the left of the channel
listing, just to the right of the i icon. This brings up an in-browser media player.

To watch a TV channel in a local media player, e.g. VLC (www.videolan.org/vlc), you’ll
need to download it: click the i icon to the left of a channel listing to bring up the
information panel for that channel. Here you can see a stream file that you can download.

TVHeadend is supported by numerous apps, such as TvhClient for iOS, which will play TV from
the Pi. Kodi and OMXPlayer are also supported for viewing TV streams
So, yes, it does say you can use the button, but it also says you can run outside the browser. I suppose an addition would be to say the external players give better results, and include Dom's stuff from above. Not sure who wrote that document, I'll try and find out who is the source.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 5:09 pm

Thank you James,

I think those additions and clarifications would be useful for the community.

Peter

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21333
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 5:10 pm

jonesypeter wrote:
Wed Oct 31, 2018 4:57 pm
If there are options to help test new products in the future and help with documentation I would love to volunteer.
The majority of documentation is held in github (https://github.com/raspberrypi/documentation), its easy to fork it, make additions and improvements and then send in as PR's. https://www.raspberrypi.org/documentati ... -github.md
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 5:25 pm

Thanks James. That will be useful. Hope the TV Hat gets added soon to that documentation tree.

I appreciate you both taking time out of your day to answer my questions.

Peter

hippy
Posts: 4363
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 5:27 pm

jonesypeter wrote:
Mon Oct 29, 2018 8:09 pm
https://tvheadend.org/projects/tvheaden ... positories

Code: Select all

echo "deb http://apt.tvheadend.org/stable raspbian-stretch main" | sudo tee -a /etc/apt/sources.list.d/tvheadend.list
sudo apt-get update
sudo apt-get install tvheadend
This increases the version from 4.2.4 to 4.2.7
Don't forget to install the PGP key first as described in the link or there will be errors on the update -

Code: Select all

sudo apt-get -y install coreutils wget apt-transport-https lsb-release ca-certificates
sudo wget -qO- https://doozer.io/keys/tvheadend/tvheadend/pgp | sudo apt-key add -
If tvheadend is already installed, 'sudo apt-get upgrade' should automatically bump it to the latest version.

But didn't work for me, nor with 'sudo apt-get install tvheadend' -

Code: Select all

Get:1 https://apt.tvheadend.org/stable raspbian-stretch/main armhf tvheadend armhf 4.2.7-17~g45cc65a03~raspbianstretch [7,070 kB]
Fetched 7,070 kB in 1s (4,081 kB/s)
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 132792 files and directories currently installed.)
Preparing to unpack .../tvheadend_4.2.7-17~g45cc65a03~raspbianstretch_armhf.deb
...
Unpacking tvheadend (4.2.7-17~g45cc65a03~raspbianstretch) over (4.2.4-dmo1~bpo9+1~rpt1) ...
dpkg: error processing archive /var/cache/apt/archives/tvheadend_4.2.7-17~g45cc65a03~raspbianstretch_armhf.deb (--unpack):
 trying to overwrite '/usr/share/man/man1/tvheadend.1.gz', which is also in package tvheadend-data 4.2.4-dmo1~bpo9+1~rpt1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/tvheadend_4.2.7-17~g45cc65a03~raspbianstretch_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@Pi3B:~$
Any ideas ?

A complete 'remove tvheadend', 'autoremove' and 'install tvheadend' does seem to have fixed things.

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 6:00 pm

Hi Hippy

Yes it only works with a clean install of Raspian (at least that was my findings). The install does error if you already have (or have ever had) the standard version installed. I just tried a standard uninstall then went for fresh install as I find it easier (especially as I use Raspian Lite).

No need for the PGP key. Just answer 'Y' when apt-get asks about untrusted sources.
Last edited by jonesypeter on Wed Oct 31, 2018 6:36 pm, edited 1 time in total.

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 6:02 pm

Dom,

Any idea why I get perfect playback from the browser with HD streams (BBC1 HD for example). Are they using an encoder built into the browser?

Peter

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5182
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 6:58 pm

jonesypeter wrote:
Wed Oct 31, 2018 6:02 pm
Any idea why I get perfect playback from the browser with HD streams (BBC1 HD for example). Are they using an encoder built into the browser?
HD streams are mostly H.264. SD streams are mostly MPEG-2 (but both of these vary with location).
Sounds like your browser supports H.264 decode but not MPEG-2 decode.

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 7:04 pm

Thanks Dom, I'm using Chrome. Note for other users. This only worked with installing the version from the TVHeadEnd website.

hippy
Posts: 4363
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 10:00 pm

jonesypeter wrote:
Wed Oct 31, 2018 6:00 pm
No need for the PGP key. Just answer 'Y' when apt-get asks about untrusted sources.
I didn't get asked; it just terminated with an error report. So I followed the link, installed the PGP, and then it was fine.

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 10:09 pm

Interesting. I had to enter 'Y' to confirm installation, then 'y' to confirm from untrusted sources.

Anyway, I hope the updated version helped.

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Wed Oct 31, 2018 10:13 pm

This is the sort of feedback, presumably because people are using the web browser player. The changes to the notes you are making will make it much clearer.

https://shop.pimoroni.com/products/rasp ... pi#reviews

hippy
Posts: 4363
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Raspberry Pi TV Hat Playback Issues

Thu Nov 01, 2018 1:43 pm

jonesypeter wrote:
Wed Oct 31, 2018 10:09 pm
Anyway, I hope the updated version helped.
It does seem to have. I am not using the Pi TV uHAT, was testing something I had lying around after I discovered I could receive a good Freeview signal when I couldn't before. Some channels worked fine when viewed through the tvheadend :9981 web page on a PC, clicking the TV icon, others stalled every few seconds. This seems to have fixed things but only minimal testing so far. And thanks anyway for pointing to the latest version.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21333
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi TV Hat Playback Issues

Thu Nov 01, 2018 3:48 pm

There's a PR here which brings the doc in the main repo, and I think contains the required changes.

https://github.com/raspberrypi/document ... /README.md
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Thu Nov 01, 2018 4:08 pm

Many thanks James,

I will take a read through.

Peter

User avatar
DougieLawson
Posts: 34561
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi TV Hat Playback Issues

Thu Nov 01, 2018 4:51 pm

jamesh wrote:
Thu Nov 01, 2018 3:48 pm
There's a PR here which brings the doc in the main repo, and I think contains the required changes.

https://github.com/raspberrypi/document ... /README.md
You should extend that with how to get Kodi and the "Kodi hts pvr" plugin running since that's likely what most folks will want to do rather than searching round for other funky bits of software that can play the TVHeadEnd streams.

I also got BBC1 on a quick and dirty stream by running with wget, a fifo and Omxplayer.

mkfifo /tmp/tvpipe
wget "http://localhost:9981/stream/channelid/1628452359?ticket=E96B1DC88B43916AD8F64B640C58E90971EAFEF2&profile=pass" -http-user=kodi -http-password=kodi -O /tmp/tvpipe &
omxplayer /tmp/tvpipe

which will test things nicely.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21333
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi TV Hat Playback Issues

Thu Nov 01, 2018 5:16 pm

DougieLawson wrote:
Thu Nov 01, 2018 4:51 pm
jamesh wrote:
Thu Nov 01, 2018 3:48 pm
There's a PR here which brings the doc in the main repo, and I think contains the required changes.

https://github.com/raspberrypi/document ... /README.md
You should extend that with how to get Kodi and the "Kodi hts pvr" plugin running since that's likely what most folks will want to do rather than searching round for other funky bits of software that can play the TVHeadEnd streams.

I also got BBC1 on a quick and dirty stream by running with wget, a fifo and Omxplayer.

mkfifo /tmp/tvpipe
wget "http://localhost:9981/stream/channelid/ ... ofile=pass" -http-user=kodi -http-password=kodi -O /tmp/tvpipe &
omxplayer /tmp/tvpipe

which will test things nicely.
I don't have an aerial in the office, so cannot work out the Kodi stuff. Any one have instructions?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jonesypeter
Posts: 103
Joined: Fri Aug 02, 2013 3:07 pm

Re: Raspberry Pi TV Hat Playback Issues

Thu Nov 01, 2018 6:25 pm

Hi,

There is Kodi instructions here:

https://thepihut.com/blogs/raspberry-pi ... -pi-tv-hat

Or here

https://www.modmypi.com/blog/getting-st ... -pi-tv-hat

You should take one home with you for testing purposes!

Return to “HATs and other add-ons”