Performance on the RPI3

For discussion of topics specific to MythTV on Raspberry Pi devices
Post Reply
ricks03
Junior
Posts: 67
Joined: Thu Oct 01, 2015 8:59 pm
United States of America

Performance on the RPI3

Post by ricks03 »

I used to run the MVPMC for my front end, but with the advent of digital video, that meant I needed something else, and I settled on what I thought your be simple - the Raspberry Pi 3. Most of the notes out there are for the RPI2 and working, and I figured with the 3 it would be even better.

So I figured I was running a fairly standard platform (Raspbian), and the build from the MythTV Wiki (MythTV Light) and hasn't expected to encounter many problems setting up the front end. After tweaking the wiki (fixing an error) I've mostly waded through stuff, but my performance for playback of recorded video still isn't that good. Historically the server's been ok, and playback via VLC seems to be alright, so I don't think I have a server performance problem, but I don't know why this front end is slow.

I've done the following (mostly from https://www.mythtv.org/wiki/Raspberry_Pi):
sudo raspi-config (also in /boot/config.txt)
set gpu_mem=256

update /boot/config.txt for the MPEG license and confirm with:
vcgencmd codec_enabled MPG2

Performance:
to fix audio hiss, add this line to the /boot/config.txt:
disable_audio_dither=1

Disable pulseaudio as follows Edit /etc/pulse/client.conf. Uncomment the line autospawn=yes and replace the yes with a "no".

MythtV Frontend: Setup > Video > Playback
Change Video Profile from Normal to OpenMax Normal

Each boot, set pi to performance mode (in /etc/rc.local):
echo "performance" |sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

That all got me from disastrously bad to better but still not watchable. Any other suggestions?

Also, I have audio through the headphones, but I can't seem to figure out how to get it over HDMI, and the RP3 supports that, so I"m missing something there as well.

Thanks!

Rick
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Performance on the RPI3

Post by pgbennett »

Can you clarify what you see. What does "Bad performance" mean? Does the audio stutter? Does the video freeze? Is the video jumpy?

I have been using Raspberry Pi 2 on two TVs for some time (one SD and one HD), and for straight watching they are perfect. Some things like slow motion and fast forward do not work well. Jump forward and back is acceptable for skipping commercials. Subtitles can cause audio and video glitches. Some types of remote control are slow to respond.

The OpenMAX Normal profile may cause stuttering and jumpiness when displaying OSD. OpenMAX High Quality profile should prevent that.

If you are getting stuttering or jumpiness start the frontend with option -v playback and see if there are relevant messages in the log.

For audio over HDMI, either of the following will work
1. Use raspi-config to force audio over HDMI and in MythTV frontend audio setup select ALSA default.
2. In front end audio setup select OpenMAX HDMI, uncheck the digital options (Dolby etc.), make sure to select Stereo for speakers, and in the next page select Openmax for mixer. When starting playback press volume up (right square bracket]) until the volume goes up enough. Sometimes OpenMax HDMI starts up with volume set to zero and you hear nothing.
ricks03
Junior
Posts: 67
Joined: Thu Oct 01, 2015 8:59 pm
United States of America

Re: Performance on the RPI3

Post by ricks03 »

The video stutters. Audio is ok.

Ok, well it did. Taking the two suggestions from you (below, option #2 for audio), the playback is now awesome. Thanks!

Jump forward/back and skip forward/back work better than they ever did with my MVPMC, and both work from my Vizio remote (with CEC enabled on the Vizio). Strangely nothing else works from the remote, but still, progress.

Thanks!
ricks03
Junior
Posts: 67
Joined: Thu Oct 01, 2015 8:59 pm
United States of America

Re: Performance on the RPI3

Post by ricks03 »

Well, performance is good, but it's still not quite there. Whenever things on the screen move quickly, there's some digital fractaling around the edges (both playing recorded TV, and playing .vob files).

Any other suggestions?
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Performance on the RPI3

Post by pgbennett »

Can you be more specific or give an example. I don't know what you mean by "digital fractaling around the edges". Is that the edge of the screen you are referring to, or something else?
ricks03
Junior
Posts: 67
Joined: Thu Oct 01, 2015 8:59 pm
United States of America

Re: Performance on the RPI3

Post by ricks03 »

Whenever something on the screen moves moderately fast (say a person turns their head quickly) the edges of their head "blur". If the camera pans quickly, then objects "blur" around the edges.

So of someone moves their arm quickly across the screen you get a digital blur around the edges of their arm.
User avatar
heyted
Senior
Posts: 301
Joined: Sun Jun 08, 2014 2:14 am
Location: South Florida
Contact:
United States of America

Re: Performance on the RPI3

Post by heyted »

This sounds like a deinterlacing issue. It also sounds like the issue this guy describes: https://www.youtube.com/watch?v=cff77kjT-jY
Ted | My blog
ricks03
Junior
Posts: 67
Joined: Thu Oct 01, 2015 8:59 pm
United States of America

Re: Performance on the RPI3

Post by ricks03 »

How would I solve a deinterlacing issue?
Tdiguy
Newcomer
Posts: 2
Joined: Sun May 14, 2017 10:44 am
United States of America

Re: Performance on the RPI3

Post by Tdiguy »

I myself am very new to this. From what my limited understanding is though you are using a pi as a headend to playback mpeg2 video's. I have heard that this is best done by buying a license from raspberry pi license key for mpeg2. http://www.raspberrypi.com/mpeg-2-license-key/
I could be wrong on this and i hate to advise to buy stuff normally without trying it out myself first but its pretty cheap.
ricks03
Junior
Posts: 67
Joined: Thu Oct 01, 2015 8:59 pm
United States of America

Re: Performance on the RPI3

Post by ricks03 »

Tdiguy wrote:I myself am very new to this. From what my limited understanding is though you are using a pi as a headend to playback mpeg2 video's. I have heard that this is best done by buying a license from raspberry pi license key for mpeg2. http://www.raspberrypi.com/mpeg-2-license-key/
I could be wrong on this and i hate to advise to buy stuff normally without trying it out myself first but its pretty cheap.
I did that as part of the setup process.
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Performance on the RPI3

Post by pgbennett »

ricks03 wrote:How would I solve a deinterlacing issue?
Are you still having the deinterlacing issue? Sorry for the delay in responding.
See https://code.mythtv.org/trac/ticket/13030 - there is a deinterlacing issue with recent versions of raspbian. There are some suggestions there for a workaround.
Post Reply