v18 Kodi 18 on RP3B+ vs. RP4
#1
I use Kodi as a frontend to a remote Mythtv-backend. Kodi on a RP3B+ has always been better than mythfrontend at playing 1080i MPEG2 recorded TV from mythtv using the pvr addon.

When all I needed was a Kodi frontend I used LibreELEC 9.2.0, but now that RP4 is powerful enough to run the backend and frontend I've decided to compare Kodi and mythfrontend once more.

So I installed Raspbian buster lite then X, then XFCE on my RP4.  I created my mythtv backend and tested everything with mythfrontend.  It actually works really well.  But video playing with mythfrontend is still not as smooth as when I use another RP3B+ as a LibreELEC Kodi frontend to the RP4 mythtv backend.

So I installed Kodi 18.4 per the instructions in this thread (https://www.raspberrypi.org/forums/viewt...p?t=251645).  Basically Kodi 18.4 is in the buster repositories.

What I'm finding is Kodi is no smoother at this point on the RP4 than mythfrontend.  Certainly not as good as Kodi on a remote frontend RP3B+

Here's the setup:

RP4 connected via HDMI to AV receiver and shows up a 3840x2160p30 even though the TV is capable of 3840x2160p60. The receiver limits you to 30p.

The GUI size is limited to 1080p. The videos are all 1080i or 720p.

The Allow passthrough is off and the Player is set to Adjust display refresh rate Always and Sync playback to display is on.  Any other setting really has a lipsync problem.

I tried changing the Display size to 1080p but that zooms in to where part of the GUI text is off screen.

I'm wondering is there some setting I need to change to get this to work on the RP4 as good as the RP3B+??
Reply
#2
(2019-12-07, 17:16)jfabernathy Wrote: I use Kodi as a frontend to a remote Mythtv-backend. Kodi on a RP3B+ has always been better than mythfrontend at playing 1080i MPEG2 recorded TV from mythtv using the pvr addon.

When all I needed was a Kodi frontend I used LibreELEC 9.2.0, but now that RP4 is powerful enough to run the backend and frontend I've decided to compare Kodi and mythfrontend once more.

So I installed Raspbian buster lite then X, then XFCE on my RP4.  I created my mythtv backend and tested everything with mythfrontend.  It actually works really well.  But video playing with mythfrontend is still not as smooth as when I use another RP3B+ as a LibreELEC Kodi frontend to the RP4 mythtv backend.

So I installed Kodi 18.4 per the instructions in this thread (https://www.raspberrypi.org/forums/viewt...p?t=251645).  Basically Kodi 18.4 is in the buster repositories.

What I'm finding is Kodi is no smoother at this point on the RP4 than mythfrontend.  Certainly not as good as Kodi on a remote frontend RP3B+

Here's the setup:

RP4 connected via HDMI to AV receiver and shows up a 3840x2160p30 even though the TV is capable of 3840x2160p60. The receiver limits you to 30p.

The GUI size is limited to 1080p. The videos are all 1080i or 720p.

The Allow passthrough is off and the Player is set to Adjust display refresh rate Always and Sync playback to display is on.  Any other setting really has a lipsync problem.

I tried changing the Display size to 1080p but that zooms in to where part of the GUI text is off screen.

I'm wondering is there some setting I need to change to get this to work on the RP4 as good as the RP3B+??

Two things to point out :

1. Broadcast TV is 59.94Hz (aka '60Hz') or 50Hz - so running your Pi 4B into your AVR at 2160p30 means you won't get decent full motion.  You need to run 1080p59.94 or 1080p50 if your AVR won't support 2160p59.94 or 2160p50.   As your Pi 3B+ is unlikely to be running at 2160p (*) the chances are your Pi 3B+ is running at 1080p59.94 or 1080p50 with full motion.  Although interlaced video (used by many broadcasters) is described as 29.97 (or '30Hz') or 25 frames per second (and thus you might imagine 29.97/30 or 25Hz output is correct for this, native interlaced content is actually made up of 59.94/60 or 50 'half images' (called fields) each second and importantly these are captured at different points in time to each other - so to deinterlace them with full motion to avoid judder you have to output at 2 x Frame rate (59.94/60 or 50Hz)  You won't see this on all material (movies, TV drama and high-end docs are shot at 23.976 or 25fps progressive not interlaced) but you will on sport, entertainment and most news material.

If you are in the USA, Sweden, Norway, Denmark etc. then some broadcasters are using 720p as their broadcast format - which isn't interlaced and sends 59.94 or 50 full progressive frames every second.  To avoid judder on this content you also obviously need a 59.94 or 50Hz output mode - not a 29.97 (30) or 25Hz mode.

2. Are you in North America, Japan, Korea or parts of South America?  If you're in Europe, Aus, NZ and large parts of Asia you will be in a 50Hz region - so you should be running at 50Hz (to avoid frame repeat judder)

Where are you and what is your MythTV source?

(*) It is actually possible to get Raspberry Pi 3B+s to output 2160p video at 23.976 and 25Hz progressive - which can be useful in some signage situations.
Reply
#3
(2019-12-07, 17:42)noggin Wrote:
(2019-12-07, 17:16)jfabernathy Wrote: I use Kodi as a frontend to a remote Mythtv-backend. Kodi on a RP3B+ has always been better than mythfrontend at playing 1080i MPEG2 recorded TV from mythtv using the pvr addon.

When all I needed was a Kodi frontend I used LibreELEC 9.2.0, but now that RP4 is powerful enough to run the backend and frontend I've decided to compare Kodi and mythfrontend once more.

So I installed Raspbian buster lite then X, then XFCE on my RP4.  I created my mythtv backend and tested everything with mythfrontend.  It actually works really well.  But video playing with mythfrontend is still not as smooth as when I use another RP3B+ as a LibreELEC Kodi frontend to the RP4 mythtv backend.

So I installed Kodi 18.4 per the instructions in this thread (https://www.raspberrypi.org/forums/viewt...p?t=251645).  Basically Kodi 18.4 is in the buster repositories.

What I'm finding is Kodi is no smoother at this point on the RP4 than mythfrontend.  Certainly not as good as Kodi on a remote frontend RP3B+

Here's the setup:

RP4 connected via HDMI to AV receiver and shows up a 3840x2160p30 even though the TV is capable of 3840x2160p60. The receiver limits you to 30p.

The GUI size is limited to 1080p. The videos are all 1080i or 720p.

The Allow passthrough is off and the Player is set to Adjust display refresh rate Always and Sync playback to display is on.  Any other setting really has a lipsync problem.

I tried changing the Display size to 1080p but that zooms in to where part of the GUI text is off screen.

I'm wondering is there some setting I need to change to get this to work on the RP4 as good as the RP3B+??

Two things to point out :

1. Broadcast TV is 59.94Hz (aka '60Hz') or 50Hz - so running your Pi 4B into your AVR at 2160p30 means you won't get decent full motion.  You need to run 1080p59.94 or 1080p50 if your AVR won't support 2160p59.94 or 2160p50.   As your Pi 3B+ is unlikely to be running at 2160p (*) the chances are your Pi 3B+ is running at 1080p59.94 or 1080p50 with full motion.  Although interlaced video (used by many broadcasters) is described as 29.97 (or '30Hz') or 25 frames per second (and thus you might imagine 29.97/30 or 25Hz output is correct for this, native interlaced content is actually made up of 59.94/60 or 50 'half images' (called fields) each second and importantly these are captured at different points in time to each other - so to deinterlace them with full motion to avoid judder you have to output at 2 x Frame rate (59.94/60 or 50Hz)  You won't see this on all material (movies, TV drama and high-end docs are shot at 23.976 or 25fps progressive not interlaced) but you will on sport, entertainment and most news material.

If you are in the USA, Sweden, Norway, Denmark etc. then some broadcasters are using 720p as their broadcast format - which isn't interlaced and sends 59.94 or 50 full progressive frames every second.  To avoid judder on this content you also obviously need a 59.94 or 50Hz output mode - not a 29.97 (30) or 25Hz mode.

2. Are you in North America, Japan, Korea or parts of South America?  If you're in Europe, Aus, NZ and large parts of Asia you will be in a 50Hz region - so you should be running at 50Hz (to avoid frame repeat judder)

Where are you and what is your MythTV source?

(*) It is actually possible to get Raspberry Pi 3B+s to output 2160p video at 23.976 and 25Hz progressive - which can be useful in some signage situations. 

I'm located in USA, so the mythtv recordings are from an OTA tuner (SiliconDust HDHR Quatro). I'm wondering if it's worth a test to connect the RP4 directly to my UHD 4K TV so the PI4 will see 4Kp60?
Reply
#4
So I connected my RP4 directly to my UHD 4K Samsung TV. I could not get 60P only 30P. I'm using the TV info button to see that.  I made sure I had

hdmi_enable_4kp60=1

in my /boot/config.txt

The only way I can get 60p is with my Nvidia Shield TV. the info button shows 3840x2160 / 60

All that said, what would be ideal is to have the RP4 only put out 1080P just like the RP3B+. 

Is there a way to force the rp4 into 1080p.  I have not found anything that says you can.

Jim A
Reply
#5
(2019-12-07, 19:17)jfabernathy Wrote: So I connected my RP4 directly to my UHD 4K Samsung TV. I could not get 60P only 30P. I'm using the TV info button to see that.  I made sure I had

hdmi_enable_4kp60=1

in my /boot/config.txt

The only way I can get 60p is with my Nvidia Shield TV. the info button shows 3840x2160 / 60

All that said, what would be ideal is to have the RP4 only put out 1080P just like the RP3B+. 

Is there a way to force the rp4 into 1080p.  I have not found anything that says you can.

Jim A
I suspect your HDTV only supports 2160p59.94/60 at 4:2:0 - which the Pi 4B doesn't support.

I've not used Kodi on a Pi 4B with anything other than LibreElec - when I get a chance I'll have a look at the process to enable 1080p59.94 under Raspbian.
Reply
#6
(2019-12-07, 20:15)noggin Wrote:
(2019-12-07, 19:17)jfabernathy Wrote: So I connected my RP4 directly to my UHD 4K Samsung TV. I could not get 60P only 30P. I'm using the TV info button to see that.  I made sure I had

hdmi_enable_4kp60=1

in my /boot/config.txt

The only way I can get 60p is with my Nvidia Shield TV. the info button shows 3840x2160 / 60

All that said, what would be ideal is to have the RP4 only put out 1080P just like the RP3B+. 

Is there a way to force the rp4 into 1080p.  I have not found anything that says you can.

Jim A
I suspect your HDTV only supports 2160p59.94/60 at 4:2:0 - which the Pi 4B doesn't support.

I've not used Kodi on a Pi 4B with anything other than LibreElec - when I get a chance I'll have a look at the process to enable 1080p59.94 under Raspbian.  
I'm betting that the RP4 team will have to enable the new 4K drivers to use some of the config.txt parameters that specify what resolution you want to boot up in.  Since Mythtv-frontend runs on X I can use XFCE to set the screen resolution to 1920x1080P and it works perfectly fine. It looks like Kodi doesn't use X so we are stuck with 4k30p
Reply
#7
(2019-12-07, 21:11)jfabernathy Wrote:
(2019-12-07, 20:15)noggin Wrote:
(2019-12-07, 19:17)jfabernathy Wrote: So I connected my RP4 directly to my UHD 4K Samsung TV. I could not get 60P only 30P. I'm using the TV info button to see that.  I made sure I had

hdmi_enable_4kp60=1

in my /boot/config.txt

The only way I can get 60p is with my Nvidia Shield TV. the info button shows 3840x2160 / 60

All that said, what would be ideal is to have the RP4 only put out 1080P just like the RP3B+. 

Is there a way to force the rp4 into 1080p.  I have not found anything that says you can.

Jim A
I suspect your HDTV only supports 2160p59.94/60 at 4:2:0 - which the Pi 4B doesn't support.

I've not used Kodi on a Pi 4B with anything other than LibreElec - when I get a chance I'll have a look at the process to enable 1080p59.94 under Raspbian.      
I'm betting that the RP4 team will have to enable the new 4K drivers to use some of the config.txt parameters that specify what resolution you want to boot up in.  Since Mythtv-frontend runs on X I can use XFCE to set the screen resolution to 1920x1080P and it works perfectly fine. It looks like Kodi doesn't use X so we are stuck with 4k30p    

LibreElec allows you free selection of resolution from within Kodi - so I'm not sure why you'd need a config.txt parameter for running Kodi under Raspbian? (The 4Kp60 enable code in the config.txt section is required, as by default the Pi 4B runs the HDMI output section at a lower clock rate - or similar - that doesn't support 4Kp60, for performance/power reasons)

You can manually force an HDMI mode in config.txt - just as you can override EDID - so if you want to force 1080p output in config.txt - that's an option.  I'm not aware that it doesn't work on the Pi 4B (it's also used for configuring DPI GPIO displays etc.)  If I were near my Pi4Bs and a UHD TV I'd give them a go - but I'm away from them both until next weekend...

The 4:2:0 issue is apparently a hardware(ish) limitation, as 4:2:0 requires both vertical and horizontal chroma subsampling - and there have been comments that the Pi SoC may not be able to do this. There have been comments, though, that it can do 4:2:2 horizontal chroma subsampling, as will be required for 12-bit 4:2:2 4Kp60 HDR output of 10-bit 2160p60 HDR10 or HLG content.  Whilst most UHD Blu-ray content is 2160p23.976 (so can be output 4:4:4/RGB with 10-bit), 2160p50 and 2160p59.94 UHD Blu-rays do exist, and it's the format used for streaming UHD HLG iPlayer stuff in the UK for instance, so 4:2:2 12-bit output at 2160p50 and above is a key requirement (Since you can't output >8 bit 4:4:4/RGB at 2160p50 and above within HDMI 2.0 specs)
Reply
#8
I am using LibreElec 9.2.0 on a RPi 4, with the TVHeadEnd TV backend running. I think this would support your tuner.

I then mount a SMB share from my NAS drive, and save/timeshift TV to there.

Everything is working fine for me, up to 1080p TV. Not tried any higher resolution stuff.

I have no experience of MythTV as a backend, but coming from MediaPortal, I really like the fact that I can do all of my TVHeadEnd configuration remotely using the web interface.

Best wishes,

Mark
Reply
#9
(2019-12-08, 13:24)mcelliott Wrote: I am using LibreElec 9.2.0 on a RPi 4, with the TVHeadEnd TV backend running. I think this would support your tuner.

I then mount a SMB share from my NAS drive, and save/timeshift TV to there.

Everything is working fine for me, up to 1080p TV. Not tried any higher resolution stuff.

I have no experience of MythTV as a backend, but coming from MediaPortal, I really like the fact that I can do all of my TVHeadEnd configuration remotely using the web interface.

Best wishes,

Mark
I have used LibreELEC with TVH before and I got it to work on an RP3B+.  However, it was the issue of requiring another computer on the same network to configure it was the problem.  In that case I was building the RP3 DVR for a mobile system in an RV camper. Mythtv didn't require another computer or internet connection.  Just the LAN for the RP3 and HDHR tuner.
Reply
#10
Yep - the OP may well find that TV Headend in LibreElec is a much more pain-free option. DVB-T/T2 Silicon Dust HD Home run tuners are supported in TV Headend - and I believe US ATSC 8VSB OTA models are too.  Certainly there are no issues with LibreElec switching output resolution - it does it on the fly (either with whitelisting or when you play 2160p content with Kodi configured for 1080p - possibly if you have adjust refresh rate enabled)

I'm running TV Headend with a Dual HD Homerun DVB-T2 tuner, and they just appeared as tuners automatically in the DVB Config tab in the TVH web interface.   You only need to use the web i/f for config, and you may find you can enable wifi on the Pi in access point mode (Tethered Hotspot I think it's called) to let you use a phone or tablet to web configure it out on the road?

However I'm still surprised that you can't configure Raspbian and Kodi to work at 1080p59.94 on a 2160p display.
Reply
#11
(2019-12-08, 12:55)noggin Wrote:
(2019-12-07, 21:11)jfabernathy Wrote:
(2019-12-07, 20:15)noggin Wrote: I suspect your HDTV only supports 2160p59.94/60 at 4:2:0 - which the Pi 4B doesn't support.

I've not used Kodi on a Pi 4B with anything other than LibreElec - when I get a chance I'll have a look at the process to enable 1080p59.94 under Raspbian.      
I'm betting that the RP4 team will have to enable the new 4K drivers to use some of the config.txt parameters that specify what resolution you want to boot up in.  Since Mythtv-frontend runs on X I can use XFCE to set the screen resolution to 1920x1080P and it works perfectly fine. It looks like Kodi doesn't use X so we are stuck with 4k30p     


You can manually force an HDMI mode in config.txt - just as you can override EDID - so if you want to force 1080p output in config.txt - that's an option.  I'm not aware that it doesn't work on the Pi 4B (it's also used for configuring DPI GPIO displays etc.)  If I were near my Pi4Bs and a UHD TV I'd give them a go - but I'm away from them both until next weekend... 
If you try to force 1080P output in config.txt using raspi-config, you get an error on exit.  I can't find it now, but when I was researching that I found a post that said the new 4K drivers don't allow changes to resolution via the config.txt parameter. I'll see if I can find that again.  But my testing says those parameters have no affect in the RP4.
Reply
#12
(2019-12-08, 13:32)jfabernathy Wrote: I have used LibreELEC with TVH before and I got it to work on an RP3B+.  However, it was the issue of requiring another computer on the same network to configure it was the problem.  In that case I was building the RP3 DVR for a mobile system in an RV camper. Mythtv didn't require another computer or internet connection.  Just the LAN for the RP3 and HDHR tuner.

Plug a laptop into the LAN or use WIFI to configure it, and then leave it alone?
Reply
#13
(2019-12-08, 13:45)mcelliott Wrote:
(2019-12-08, 13:32)jfabernathy Wrote: I have used LibreELEC with TVH before and I got it to work on an RP3B+.  However, it was the issue of requiring another computer on the same network to configure it was the problem.  In that case I was building the RP3 DVR for a mobile system in an RV camper. Mythtv didn't require another computer or internet connection.  Just the LAN for the RP3 and HDHR tuner.

Plug a laptop into the LAN or use WIFI to configure it, and then leave it alone? 
While this seems simple at home, but when your location is changing every few days and WiFi or cell coverage is limited it can be a bigger problem.  I was on the road camping in the western USA last year for 4 months. keeping TVH working was a real pain under these conditions. When I got my RP4, it was now capable of a combo FE/BE for mythtv but no kodi but it worked for the month I tested it on the road.  It was much easier to setup and rescan for channels by only getting my wireless keyboard/mouse out and turning on the RP4 and TV.
Thanks for your ideas though.
Reply
#14
I just remembers something that keeps me from regularly using TVHeadend in LibreELEC.  If I'm wrong, please let me know.  There are 2 ways to talk to a SiliconDust HDHR Quatro, UDP and TCP. The latest mythtv uses TCP so all 4 tuners can be shared with others streaming devices like Smart TV's with HDHomerun apps or tablets.  I've been told that TVHeadend uses the original UDP method which does not share the tuners.

Any news on when or if TVH will use the TCP method and share the tuners??
Reply
#15
(2019-12-07, 20:15)noggin Wrote:
(2019-12-07, 19:17)jfabernathy Wrote: So I connected my RP4 directly to my UHD 4K Samsung TV. I could not get 60P only 30P. I'm using the TV info button to see that.  I made sure I had

hdmi_enable_4kp60=1

in my /boot/config.txt

The only way I can get 60p is with my Nvidia Shield TV. the info button shows 3840x2160 / 60

All that said, what would be ideal is to have the RP4 only put out 1080P just like the RP3B+. 

Is there a way to force the rp4 into 1080p.  I have not found anything that says you can.

Jim A
I suspect your HDTV only supports 2160p59.94/60 at 4:2:0 - which the Pi 4B doesn't support.

I've not used Kodi on a Pi 4B with anything other than LibreElec - when I get a chance I'll have a look at the process to enable 1080p59.94 under Raspbian. 

I also have a 4k samsung 60hz and My shiny new RPI4 is only outputting 4k at 30. Looks noticeably worse than 4k Netflix. Are you sure this is a TV problem and not just the RPI4 still being new?
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 18 on RP3B+ vs. RP40