RPI4, Buster, Mythtv Light, H264, playback stutter

For discussion of topics specific to MythTV on Raspberry Pi devices
Post Reply
lynnux
Junior
Posts: 19
Joined: Thu Sep 05, 2019 10:16 pm
Great Britain

RPI4, Buster, Mythtv Light, H264, playback stutter

Post by lynnux » Thu Oct 17, 2019 2:28 pm

With great help from @MikeB2013 I have Mythtv Light 30 running on Pi3B+ (FE) and Pi4 4GB (FE & BE). Both Pis are running Buster. (This thread refers.)

Both frontends are fine with SD recordings but exhibit video stutter and unpredictable behaviour in FFwd/Rev or time jumps when replaying 1080i@25fps (H264, UK Freeview HD) recordings. ("Openmax Normal" playback profile)

(Outside of mythfrontend both Pi's can replay these HD recordings perfectly with omxplayer or VLC; no config.txt fiddling required.)

I have spent weeks, on and off, trying to get rid of the stutter and note others here in similar boats but found no definitive solutions yet.
(The jump/Ffw problem is ameliorated with "audio readahead = 800ms" though.)

I now run a default config.txt, have proven that "cpu_governor = performance" makes no difference and have tried pretty much every mythfrontend setup option possible (including ffmpeg vs. OMX, interlacer vs no interlacer, ...) Most changes provide no noticeable effect on stutter, some make it worse.

I'm now stuck, I suspect from @stuartm "...it means HD (H.264) performance isn't great..." there's no point in compiling my own v31. I'd have shot if I thought it would yield a result though.

Anyone out there with Pi3/4 + Buster watching super smooth Freeview HD or 1080i@25fps playback? Would love to know.

jksj
Senior
Posts: 122
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: RPI4, Buster, Mythtv Light, H264, playback stutter

Post by jksj » Wed Oct 23, 2019 8:07 am

I have the same issues with Mythfrontend on PI4. In case you have not noticed a working version of Kodi is now available in the Buster Raspian repository and works fine with mythbackend.

lynnux
Junior
Posts: 19
Joined: Thu Sep 05, 2019 10:16 pm
Great Britain

Re: RPI4, Buster, Mythtv Light, H264, playback stutter

Post by lynnux » Wed Oct 23, 2019 9:04 am

Thanks for that @jksj. I may indeed go the Kodi route eventually as I'm finding mythfrontend increasingly frustrating with Ffwd and ad skips. (It seems to lose its position in the playback stream completely sometimes.)

Note: I did find some interesting ffmpeg/Openmax bug fixes here which look highly relevant to me (in my ignorance). I shall investigate shortly.

Bob

User avatar
jfabernathy
Senior
Posts: 353
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: RPI4, Buster, Mythtv Light, H264, playback stutter

Post by jfabernathy » Wed Oct 23, 2019 9:40 am

I can't help with your H.264 question, but I use a combo FE/BE on a Raspberry Pi4 B 4GB ram and the USA OTA mpeg HD 1080i/720p recordings work fine. I'm comparing the playback on a RPI4 as very acceptable. I have to find very high action scenes where I notice any difference from my FE on a PC with Nvidia GFX card.

lynnux
Junior
Posts: 19
Joined: Thu Sep 05, 2019 10:16 pm
Great Britain

Re: RPI4, Buster, Mythtv Light, H264, playback stutter

Post by lynnux » Wed Oct 23, 2019 3:41 pm

jfabernathy wrote:
Wed Oct 23, 2019 9:40 am
I can't help with your H.264 question, but I use a combo FE/BE on a Raspberry Pi4 B 4GB ram and the USA OTA mpeg HD 1080i/720p recordings work fine. I'm comparing the playback on a RPI4 as very acceptable. I have to find very high action scenes where I notice any difference from my FE on a PC with Nvidia GFX card.
Thanks for the info! Appreciated.
I am easily living with the stutter (most noticeable on slow pan/zoom type scenes).
The unpredictable behaviour on skips or Ffwd/rev drives me nuts though. Do you notice anything untoward there?

(Aside: In spite of my replay problems, I'm still amazed Mythtv/Pi4 combo can record at least four HD channels and playback with little load on the CPUs.)
Bob

User avatar
jfabernathy
Senior
Posts: 353
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: RPI4, Buster, Mythtv Light, H264, playback stutter

Post by jfabernathy » Fri Oct 25, 2019 8:28 pm

lynnux wrote:
Wed Oct 23, 2019 3:41 pm

Thanks for the info! Appreciated.
I am easily living with the stutter (most noticeable on slow pan/zoom type scenes).
The unpredictable behaviour on skips or Ffwd/rev drives me nuts though. Do you notice anything untoward there?

(Aside: In spite of my replay problems, I'm still amazed Mythtv/Pi4 combo can record at least four HD channels and playback with little load on the CPUs.)
Bob
I have not noticed FFWD/REV problems. I'll play with it and see what I find.

lynnux
Junior
Posts: 19
Joined: Thu Sep 05, 2019 10:16 pm
Great Britain

Re: RPI4, Buster, Mythtv Light, H264, playback stutter

Post by lynnux » Fri Oct 25, 2019 10:08 pm

@jfabernathy Thanks - that's kind of you.
I find the further into the recording the worse the Ffwd or fwd skip problem gets; sometimes repeatedly skipping right to the end (whilst I madly stab the play/resume button).

(Aside: @jksj I quickly tried kodi on a Pi3B+ as an alternative frontend. Utterly terrible experience; slow UI and dreadful playback problems. I don't think I set it up well though. I'll have another go on a Pi4.)

User avatar
jfabernathy
Senior
Posts: 353
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: RPI4, Buster, Mythtv Light, H264, playback stutter

Post by jfabernathy » Sat Oct 26, 2019 11:44 am

lynnux wrote:
Fri Oct 25, 2019 10:08 pm
@jfabernathy Thanks - that's kind of you.
I find the further into the recording the worse the Ffwd or fwd skip problem gets; sometimes repeatedly skipping right to the end (whilst I madly stab the play/resume button).

(Aside: @jksj I quickly tried kodi on a Pi3B+ as an alternative frontend. Utterly terrible experience; slow UI and dreadful playback problems. I don't think I set it up well though. I'll have another go on a Pi4.)
Not sure if it's a difference in media type, but I use an RP3B+ with Kodi (LibreELEC 9) as a FE only in a sitting room and it works great. I've tried LibreELEC on the RP4 but it still has issues. Same with Kodi on Raspbian Buster on RP4.

lynnux
Junior
Posts: 19
Joined: Thu Sep 05, 2019 10:16 pm
Great Britain

Re: RPI4, Buster, Mythtv Light, H264, playback stutter

Post by lynnux » Sun Oct 27, 2019 11:33 pm

@jfabernathy
>Not sure if it's a difference in media type ...
It's very difficult to say - I started grokking the libmythtv/ffmpeg/omx code just to get an idea of how the various playback components fit together and where things might be going wrong; my eyes glazed over inside five minutes but it seems to me that some recent fixes in omx code would affect replay of any format and some only H264.

The good news is that I took a brand new Pi4 4GB with a more recent release of Buster (2019-09-26) and the latest Kodi (18.4 Leia). Kodi is very alien to me but I got the Mythtv 30 add-on running very quickly. Playback is very smooth; indistinguishable from OTA, plus low cpu usage and no need for a heatsink so far. I haven't had any quality time with Kodi yet but I can see why people like it as an alternative to mythfrontend.

I shall try mythfrontend on the new Raspbian soon but I can't see anything in the release notes that make me think it will be any different.

User avatar
jfabernathy
Senior
Posts: 353
Joined: Wed Feb 18, 2015 2:37 pm
United States of America

Re: RPI4, Buster, Mythtv Light, H264, playback stutter

Post by jfabernathy » Mon Oct 28, 2019 4:39 pm

not sure what gpu memory split you use, but for me it's 320. mythtv-frontend seems to like it.

Post Reply