Mailing List Archive

rpi4 HD playback profile
i give up... spent 2-3 days on getting my new rpi4 (2gb, with 256mb GPU ram assignment) to playback HD content smoothly and just can't. playback profile is setup to use V4L2 codecs, and I've upped core count to 4. Tried none, software, oGL and driver deinterlacers and disabled deblocking to try and improve things but non of them really fix the issue, just make it worse depending on system load.
rpi4 not overheating (around 72c during playback and running the full 1.5ghz)

seems like i could be dealing with multiple issues too.
first, any playback of HD content feels like it's dropping frames. also seems to jump every few seconds. almost like a rpi3 does with HD content with 'ondemand' governor.

second is HD deinterlacer. LiveTV seems to correctly detect HD content as interlaced (correct; UK is 1080i broadcast). Recorded program gets detected as progressive. I'm having to change this manually every playback to interlaced.

Third, very intermittent screen blanking where hdmi video&audio both cut out but resume again after 2-3 seconds. doesnt seem to be related to anything specific and seems completely random. I'll be placing an order later for a new HDMI cable to see if that helps but not sure this would have an effect on the above..

thanks for any help on this - its driving me insane !!
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: rpi4 HD playback profile [ In reply to ]
---- On Sun, 17 May 2020 13:31:29 +0100 Tim Draper <veehexx@zoho.com> wrote ----
> i give up... spent 2-3 days on getting my new rpi4 (2gb, with 256mb GPU ram assignment) to playback HD content smoothly and just can't. playback profile is setup to use V4L2 codecs, and I've upped core count to 4. Tried none, software, oGL and driver deinterlacers and disabled deblocking to try and improve things but non of them really fix the issue, just make it worse depending on system load.
> rpi4 not overheating (around 72c during playback and running the full 1.5ghz)
>
> seems like i could be dealing with multiple issues too.
> first, any playback of HD content feels like it's dropping frames. also seems to jump every few seconds. almost like a rpi3 does with HD content with 'ondemand' governor.
>
> second is HD deinterlacer. LiveTV seems to correctly detect HD content as interlaced (correct; UK is 1080i broadcast). Recorded program gets detected as progressive. I'm having to change this manually every playback to interlaced.
>
> Third, very intermittent screen blanking where hdmi video&audio both cut out but resume again after 2-3 seconds. doesnt seem to be related to anything specific and seems completely random. I'll be placing an order later for a new HDMI cable to see if that helps but not sure this would have an effect on the above..
>
> thanks for any help on this - its driving me insane !!
>

might've found the issue - TV HDMI port. moved to a different port and the rpi4 is behaving a lot better and not stuttering/hitching. Still early days with testing it though and not seen a 2-3sec cutout yet today before or after the input change to know if thats related.
*recorded* HD content using progressive rather than interlaced is still a problem and i have to manually define interlaced in the OSD menu. LiveTV HD channels seem to be detected correctly. Still open to suggestions on a solution there. I haven't noticed it on my Shield thats been fine for a few weeks since i updated to v31, but the rpi3&4 FE's are having this issue...
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: rpi4 HD playback profile [ In reply to ]
On 17/05/2020 13:31, Tim Draper wrote:
> i give up... spent 2-3 days on getting my new rpi4 (2gb, with 256mb GPU ram assignment) to playback HD content smoothly and just can't. playback profile is setup to use V4L2 codecs, and I've upped core count to 4. Tried none, software, oGL and driver deinterlacers and disabled deblocking to try and improve things but non of them really fix the issue, just make it worse depending on system load.
> rpi4 not overheating (around 72c during playback and running the full 1.5ghz)
>
> seems like i could be dealing with multiple issues too.
> first, any playback of HD content feels like it's dropping frames. also seems to jump every few seconds. almost like a rpi3 does with HD content with 'ondemand' governor.
>
> second is HD deinterlacer. LiveTV seems to correctly detect HD content as interlaced (correct; UK is 1080i broadcast). Recorded program gets detected as progressive. I'm having to change this manually every playback to interlaced.
>
> Third, very intermittent screen blanking where hdmi video&audio both cut out but resume again after 2-3 seconds. doesnt seem to be related to anything specific and seems completely random. I'll be placing an order later for a new HDMI cable to see if that helps but not sure this would have an effect on the above..
>
> thanks for any help on this - its driving me insane !!
> _______________________________________________

I am assuming that you are trying to get mythtv-light  31 working from
https://www.mythtv.org/wiki/MythTV_Light on current Raspbian Buster.

Pi 4 must be in console mode (not Desktop)

In /boot/config.txt make sure screen resolution is correctly set and no
higher than 1920x1080 with either 50Hz or 60Hz refresh (depends on your
broadcast standard.

For example in UK hmdi_group=1 hdmi_mode=31 gives 1920x1080@50Hz

There maybe further complications depending on your TVs maximum
resolution, which requires an eglfs json override file, otherwise qt
(part of mythfrontend) will use data from EDID which is likely to cause
incorrect resolution/fresh during playback or LiveTV. I have a 4K TV and
playback tries to use a much higher resolution and the wrong refresh
frequency (30Hz with Pi4 in default settings). I also have an HD TV and
this uses 60Hz instead of 50Hz.

I have a script run_mythfrontend.sh which launches mythfrontend and sets
up the required override based on hdmi_group and hdmi_mode settings in
/boot/config.txt.

The script is available from my github repository at
https://github.com/MikeB2013/pi-utils


Mike







_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: rpi4 HD playback profile [ In reply to ]
On Sun, May 17, 2020 at 8:34 AM Mike Bibbings <mike.bibbings@gmail.com>
wrote:

> On 17/05/2020 13:31, Tim Draper wrote:
> > i give up... spent 2-3 days on getting my new rpi4 (2gb, with 256mb GPU
> ram assignment) to playback HD content smoothly and just can't. playback
> profile is setup to use V4L2 codecs, and I've upped core count to 4. Tried
> none, software, oGL and driver deinterlacers and disabled deblocking to try
> and improve things but non of them really fix the issue, just make it worse
> depending on system load.
>

1. Disable the Desktop Environment
2. Overclock it just a bit

I listed a few other things I tried in
https://forum.mythtv.org/viewtopic.php?f=46&t=3791 also the link has a bit
more details. Also see https://www.mythtv.org/wiki/Raspberry_Pi.

Good luck, i am happy with mine, but I basically use it for HDHomerun MPEG2
OTA recording playback.

The two above did it for me. Mostly it was the desktop environment. Then a
slight overclock, now things are smooth.


> rpi4 not overheating (around 72c during playback and running the full
> 1.5ghz)
> >
> > seems like i could be dealing with multiple issues too.
> > first, any playback of HD content feels like it's dropping frames. also
> seems to jump every few seconds. almost like a rpi3 does with HD content
> with 'ondemand' governor.
> >
> > second is HD deinterlacer. LiveTV seems to correctly detect HD content
> as interlaced (correct; UK is 1080i broadcast). Recorded program gets
> detected as progressive. I'm having to change this manually every playback
> to interlaced.
> >
> > Third, very intermittent screen blanking where hdmi video&audio both cut
> out but resume again after 2-3 seconds. doesnt seem to be related to
> anything specific and seems completely random. I'll be placing an order
> later for a new HDMI cable to see if that helps but not sure this would
> have an effect on the above..
> >
> > thanks for any help on this - its driving me insane !!
> > _______________________________________________
>
> I am assuming that you are trying to get mythtv-light 31 working from
> https://www.mythtv.org/wiki/MythTV_Light on current Raspbian Buster.
>
> Pi 4 must be in console mode (not Desktop)
>
> In /boot/config.txt make sure screen resolution is correctly set and no
> higher than 1920x1080 with either 50Hz or 60Hz refresh (depends on your
> broadcast standard.
>
> For example in UK hmdi_group=1 hdmi_mode=31 gives 1920x1080@50Hz
>
> There maybe further complications depending on your TVs maximum
> resolution, which requires an eglfs json override file, otherwise qt
> (part of mythfrontend) will use data from EDID which is likely to cause
> incorrect resolution/fresh during playback or LiveTV. I have a 4K TV and
> playback tries to use a much higher resolution and the wrong refresh
> frequency (30Hz with Pi4 in default settings). I also have an HD TV and
> this uses 60Hz instead of 50Hz.
>
> I have a script run_mythfrontend.sh which launches mythfrontend and sets
> up the required override based on hdmi_group and hdmi_mode settings in
> /boot/config.txt.
>
> The script is available from my github repository at
> https://github.com/MikeB2013/pi-utils
>
>
> Mike
>
>
>
>
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: rpi4 HD playback profile [ In reply to ]
On 17/05/2020 21:21, Monkey Pet wrote:
> On Sun, May 17, 2020 at 8:34 AM Mike Bibbings <mike.bibbings@gmail.com
> <mailto:mike.bibbings@gmail.com>> wrote:
>
> On 17/05/2020 13:31, Tim Draper wrote:
> > i give up... spent 2-3 days on getting my new rpi4 (2gb, with
> 256mb GPU ram assignment) to playback HD content smoothly and just
> can't. playback profile is setup to use V4L2 codecs, and I've
> upped core count to 4. Tried none, software, oGL and driver
> deinterlacers and disabled deblocking to try and improve things
> but non of them really fix the issue, just make it worse depending
> on system load.
>
>
> 1. Disable the Desktop Environment
> 2. Overclock it just a bit
>
> I listed a few other things I tried in
> https://forum.mythtv.org/viewtopic.php?f=46&t=3791 also the link has a
> bit more details. Also see https://www.mythtv.org/wiki/Raspberry_Pi.
>
> Good luck, i am happy with mine, but I basically use it for HDHomerun
> MPEG2 OTA recording playback.
>
> The two above did it for me. Mostly it was the desktop environment. 
> Then a slight overclock, now things are smooth.
>
>
> > rpi4 not overheating (around 72c during playback and running the
> full 1.5ghz)
> >
> > seems like i could be dealing with multiple issues too.
> > first, any playback of HD content feels like it's dropping
> frames. also seems to jump every few seconds. almost like a rpi3
> does with HD content with 'ondemand' governor.
> >
> > second is HD deinterlacer. LiveTV seems to correctly detect HD
> content as interlaced (correct; UK is 1080i broadcast). Recorded
> program gets detected as progressive. I'm having to change this
> manually every playback to interlaced.
> >
> > Third, very intermittent screen blanking where hdmi video&audio
> both cut out but resume again after 2-3 seconds. doesnt seem to be
> related to anything specific and seems completely random. I'll be
> placing an order later for a new HDMI cable to see if that helps
> but not sure this would have an effect on the above..
> >
> > thanks for any help on this - its driving me insane !!
> > _______________________________________________
>
> I am assuming that you are trying to get mythtv-light  31 working
> from
> https://www.mythtv.org/wiki/MythTV_Light on current Raspbian Buster.
>
> Pi 4 must be in console mode (not Desktop)
>
> In /boot/config.txt make sure screen resolution is correctly set
> and no
> higher than 1920x1080 with either 50Hz or 60Hz refresh (depends on
> your
> broadcast standard.
>
> For example in UK hmdi_group=1 hdmi_mode=31 gives 1920x1080@50Hz
>
> There maybe further complications depending on your TVs maximum
> resolution, which requires an eglfs json override file, otherwise qt
> (part of mythfrontend) will use data from EDID which is likely to
> cause
> incorrect resolution/fresh during playback or LiveTV. I have a 4K
> TV and
> playback tries to use a much higher resolution and the wrong refresh
> frequency (30Hz with Pi4 in default settings). I also have an HD
> TV and
> this uses 60Hz instead of 50Hz.
>
> I have a script run_mythfrontend.sh which launches mythfrontend
> and sets
> up the required override based on hdmi_group and hdmi_mode
> settings in
> /boot/config.txt.
>
> The script is available from my github repository at
> https://github.com/MikeB2013/pi-utils
>
>
> Mike
>
>
>
>
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org <mailto:mythtv-users@mythtv.org>
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Similarly I have tried many settings to get Pi 4 Jitter free playback. I
suspect its the UK HD broadcact standard (1280i 25Hz) that's screwing
this up. I have not seen any bad reports from US users. Kodi/Mythbackend
is better but still not perfect showing a little jitter.

When using Mike's script (thanks for the build script) to run in console
mode things get worse, the screen flickers and the graphics flash. I
have not had a chance to chase the issue down.

Conclusion use Kodi.

Pi makes a great backend though.
Re: rpi4 HD playback profile [ In reply to ]
---- On Sun, 17 May 2020 16:32:28 +0100 Mike Bibbings <mike.bibbings@gmail.com> wrote ----
>
> I am assuming that you are trying to get mythtv-light 31 working from
> https://www.mythtv.org/wiki/MythTV_Light on current Raspbian Buster.

correct.

> Pi 4 must be in console mode (not Desktop)

already done & using the wiki recommended cmdline to run it. Cant say desktop vs console made any difference to HD playback.

> In /boot/config.txt make sure screen resolution is correctly set and no
> higher than 1920x1080 with either 50Hz or 60Hz refresh (depends on your
> broadcast standard.
>
> For example in UK hmdi_group=1 hdmi_mode=31 gives 1920x1080@50Hz
>
tried both mode=31 (1080p50) and mode=16 (1080p60) which is what EDID seems to prefer but no difference.

Found that using Software decoding works for HD content and it's fixed all my issues (with a brief 10minute test)
- interlaced content correctly detected - no more manually switching from progressive to interlaced.
- 1080i content no longer looks extremely jagged (as in an (anti)aliasing type jagged, not combing you get with nodeinterlacing) reguardless of deinterlacing settings.
- More of an observation; cpu jumped from around 10% to 50% across all cores. not a big problem as allows me to use the 'ondemand' govenor since the mhz threshold has been exceeded.
- stuttering has gone.

Currently i've set 2 playback profiles. a HD one specifically for 1920x1080 that uses 'standard' decoder, 4cores, & medium single rate deinterlacer. the SD one catches anything <1920 <1080 with v4l2 decoder, 4core, no single rate & medium double rate deinterlacer.
I stumbled upon something on the official rpi forums last night that sugested there is some issue with hardware h264 content which made me try software decoding.

if my understanding of the rpi page & v31 release notes wiki that v4l2 should be used for all content on a rpi4 FE, and that my findings are correct, then the v4l2 implimentation on rpi4 still needs work (or atleast wiki correctly reflects the playback profile required).

i also mentioned in another post in this thread that i was having issues with AV randomly blanking out. Appears the the tv input HDMI4 was at fault. moving to HDMI1 didnt show any blanking issue at all yesterday.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: rpi4 HD playback profile [ In reply to ]
---- On Mon, 18 May 2020 10:20:05 +0100 John <jksjdevelop@gmail.com> wrote ----
> On 17/05/2020 21:21, Monkey Pet wrote:
> Similarly I have tried many settings to get Pi 4 Jitter free playback. I suspect its the UK HD broadcact standard (1280i 25Hz) that's screwing this up. I have not seen any bad reports from US users. Kodi/Mythbackend is better but still not perfect showing a little jitter.
> When using Mike's script (thanks for the build script) to run in console mode things get worse, the screen flickers and the graphics flash. I have not had a chance to chase the issue down.
> Conclusion use Kodi.
> Pi makes a great backend though.
>

forgot to say that in previous responses... yes, i'm in UK. Signal is via DVB-S2 (Freesat)
interesting you say HD content is 1280i25. livetv > C5 HD shows 1080i25 in the playback data/OSDDEBUG overlay.

I'm currently using software decoding (rather than v4l2) for 1080i content which has so far made TV source playback perfect. no jitter etc and that includes no overclocking and using ondemand govenor.
Yet to try high bitrate 1080p content for more than a few minutes but a random 1080p also working perfectly smooth.

brother runs Kodi and he says they're having some issues with playback being jittery too. i didnt get much details but sounds like the grass greener...


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: rpi4 HD playback profile [ In reply to ]
---- On Mon, 18 May 2020 11:02:30 +0100 Tim Draper <veehexx@zoho.com> wrote ----
> I'm currently using software decoding (rather than v4l2) for 1080i content which has so far made TV source playback perfect. no jitter etc and that includes no overclocking and using ondemand govenor.
> Yet to try high bitrate 1080p content for more than a few minutes but a random 1080p also working perfectly smooth.
>

might've been a bit quick to say it's perfect, but it's 95% better. still seeing very slight jumpyness. seems to come and go every few seconds so i'm wondering if it's some sort of fps&refresh rate issue. should get my 2nd rpi4 order today so will spend some time using that to see if i can find a solution. number of ideas but i'm so far away from the setup info in the wiki that i'm going to disreguard any sugestions there and find my own way to deploy to see whats needed.
I'm not finding any playback info useful yet (temps, hw usage, OSDDEBUG output), but havent ran mythfrontend with any playback verboseness to see if that shows anything or tried overclocking the rpi4 which i doubt will help.
seems to be a lot of thought in rpi forums to sugest video playback is a long outstanding bug but no real info on why, when it might be fixed or even acceptance it's an issue.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: rpi4 HD playback profile [ In reply to ]
---- On Thu, 21 May 2020 13:10:20 +0100 Tim Draper <veehexx@zoho.com> wrote ----
>
>
>
> ---- On Mon, 18 May 2020 11:02:30 +0100 Tim Draper <veehexx@zoho.com> wrote ----
> > I'm currently using software decoding (rather than v4l2) for 1080i content which has so far made TV source playback perfect. no jitter etc and that includes no overclocking and using ondemand govenor.
> > Yet to try high bitrate 1080p content for more than a few minutes but a random 1080p also working perfectly smooth.
> >
>
> might've been a bit quick to say it's perfect, but it's 95% better. still seeing very slight jumpyness. seems to come and go every few seconds so i'm wondering if it's some sort of fps&refresh rate issue. should get my 2nd rpi4 order today so will spend some time using that to see if i can find a solution. number of ideas but i'm so far away from the setup info in the wiki that i'm going to disreguard any sugestions there and find my own way to deploy to see whats needed.
> I'm not finding any playback info useful yet (temps, hw usage, OSDDEBUG output), but havent ran mythfrontend with any playback verboseness to see if that shows anything or tried overclocking the rpi4 which i doubt will help.
> seems to be a lot of thought in rpi forums to sugest video playback is a long outstanding bug but no real info on why, when it might be fixed or even acceptance it's an issue.
>

problem found.. need to use the MMAL (decode only) decoder (but not the MMAL playback profile!). half of the rpi4 & v31 specific instructions are wrong and not a single mention of MMAL on the rpi wiki page.
gpu_mem adjustments not required, FakeKMS not needed to be manually configured (seems to be default now on the 2020feb raspbian lite image), no govenor tweaks (tried with both ondemand and performance with no visual difference) etc. still running in console mode so yet to test running with GUI just to see what that experience is like...
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org