Myth31 Missing VAAPI support

Do you want advice about what hardware to buy for use with MythTV? Ask here.

Moderator: Forum Moderators

Post Reply
jensk
Junior
Posts: 19
Joined: Sat Oct 06, 2018 11:38 am
Denmark

Myth31 Missing VAAPI support

Post by jensk » Tue Jan 07, 2020 7:32 am

I have primarily been using frontends based on VDPAU/Nvidia but last autum my Acer Aspire Revo 3600 frontend gave up. So I thought that the combination of Linux, VAAPI and Intel Graphics must have been matured enough to give it a go.
So i bought a Intel NUC7PHYJ to use as a new frontend. I have installed Lubuntu 19.10 with myth 30.0+fixes – and everything works functionality-wise – but i experience tearing and stuttering on video playback – both recordings and videos.
I have been trying different settings in playback profiles I should be able to use VAAPI profiles but then the stuttering is more pronounced and frames are clearly skipped. I can in ”top” se that all playback of matarial from mythtv don’t not use the VAAPI interface because the CPU utilisation is very high.
If I play the same video material through VLC the CPU utilisation is 10 times lower and there is no stuttering and frameskipping.

Vainfo shows that the VAAPI is active on the NUC

As a temporary mean i have choosen to use mythtv with the profile ”normal”. I still have some stuttering and frameskipping but no tearing using this setting.

What can I do to make Myth-frontend 30.0 use the VAAPI interface when it is present and active on the pc and it is choosen as playback profile in the frontend settings?
Last edited by jensk on Sat Jun 06, 2020 3:55 pm, edited 4 times in total.

chicobiker
Newcomer
Posts: 6
Joined: Thu Jun 26, 2014 8:47 pm
United States of America

Re: Myth 20 Missing VAAPI support

Post by chicobiker » Sun Jan 26, 2020 2:20 pm

I am using vaapi on a intel desktop. Under advanced playback settings I have enable realtime priority threads checked. You might also try using the AVsync2 to see if that helps.

Just to confirm since you mentioned you were using myth 20.0+fixes sevreal times that the current version is myth 30.0.

jensk
Junior
Posts: 19
Joined: Sat Oct 06, 2018 11:38 am
Denmark

Re: Myth 20 Missing VAAPI support

Post by jensk » Fri Jun 05, 2020 1:56 pm

Thank you for your suggestions - and yes the mythtv version 20 should have been mythtv version 30
I have since upgraded frontends to Lubuntu 20.04 and mythtv 31+fixes
I still have the same problem getting mythtv to diaplay good without stuttering when on a Intel GPU. My frontend with the old nVidia Ion GPU and original Ingtel Atom works without flaws.

So i am still looking for a setting for NUC7PHYJ with Intel GPU to work without stuttering under Lubuntu and Myth 31+fixes. Any input is welcome.

User avatar
Steve Goodey
Moderator
Posts: 108
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: Myth30 Missing VAAPI support

Post by Steve Goodey » Fri Jun 05, 2020 3:19 pm

I've taken the liberty of correcting the subject for the first post. Hope that's OK.

User avatar
heyted
Senior
Posts: 141
Joined: Sun Jun 08, 2014 2:14 am
Location: South Florida
Contact:
United States of America

Re: Myth30 Missing VAAPI support

Post by heyted » Sat Jun 06, 2020 12:04 am

It may be a deinterlacing issue.
Ted | My blog

jksj
Junior
Posts: 82
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: Myth30 Missing VAAPI support

Post by jksj » Sat Jun 06, 2020 7:52 am

In my experience VAAPI works very well on v31. (might be VAAPI2)
The most likely issue is the correct playback profile has not been selected.
Software playback using FFMPEG has issues for me and would show the problems you are having.
Check that you are actually using VAAPI
Post a log generated from mthfrontend -v playback > debug.txt
You just need the start showing a minute of playback.
I had some tearing issues with the Intel driver which were fixed by specifying tear free
/usr/share/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
# Option "AccelMethod" "uxa"
Option "TearFree" "true"
# Option "TripleBuffer "true"
EndSection

jensk
Junior
Posts: 19
Joined: Sat Oct 06, 2018 11:38 am
Denmark

Re: Myth30 Missing VAAPI support

Post by jensk » Sat Jun 06, 2020 3:54 pm

Steve Goodey wrote:
Fri Jun 05, 2020 3:19 pm
I've taken the liberty of correcting the subject for the first post. Hope that's OK.
Hi Steve.
It is quite OK - I am editing it again because now I'm on 31 and the problem persists

jensk
Junior
Posts: 19
Joined: Sat Oct 06, 2018 11:38 am
Denmark

Re: Myth30 Missing VAAPI support

Post by jensk » Sat Jun 06, 2020 4:50 pm

jksj wrote:
Sat Jun 06, 2020 7:52 am
In my experience VAAPI works very well on v31. (might be VAAPI2)
The most likely issue is the correct playback profile has not been selected.
Software playback using FFMPEG has issues for me and would show the problems you are having.
Check that you are actually using VAAPI
Post a log generated from mthfrontend -v playback > debug.txt
You just need the start showing a minute of playback.
I had some tearing issues with the Intel driver which were fixed by specifying tear free
/usr/share/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
# Option "AccelMethod" "uxa"
Option "TearFree" "true"
# Option "TripleBuffer "true"
EndSection
Thank you for your suggestions.
Rights now we are painting the living room where this Mythtv frontend is placed - so it's under plastic covers right now
I will try the debugging tomorrow when I get everything back to normal - I hope.

I previously tried the 20-intel.conf settings and the result was a black screen except if i had
Option "AccelMethod" "uxa"
set.
And then there were still stuttering when the recording was of a panorating scene. That was under Lubuntu 19.04. I will try again with my 20.04

jensk
Junior
Posts: 19
Joined: Sat Oct 06, 2018 11:38 am
Denmark

Re: Myth31 Missing VAAPI support

Post by jensk » Sun Jun 07, 2020 7:32 am

I tried the 20-intel.conf setting. If i have this setting:

Code: Select all

Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"
EndSection
Mythfrontend will only show itself as a little blue rectangle i the upper left corner of the screen

If i set this setting:

Code: Select all

Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "uxa"
Option "TearFree" "true"
EndSection
Mythfrontend shows normal, but I still have stuttering.

Both 20-intel.conf setting was tried with "VAAPI2 - Normal" selected as playback of video
The CPU utilisation is still, way higher than if i play the same video with VLC.

Since the upgrade to Ubuntu 20.04 the tearing is almost gone but the stuttering is still there. Compared to my 10 years old nVidia ION frontends the is a world of difference in how floating scenes are when panoraming.

jensk
Junior
Posts: 19
Joined: Sat Oct 06, 2018 11:38 am
Denmark

Re: Myth31 Missing VAAPI support

Post by jensk » Sun Jun 07, 2020 7:54 am

I have done the debugging with mthfrontend -v playback > debug.txt
The resulting debug.txt can be downloaded here:
https://www.kjellerup-hansen.dk/nextclo ... sfpELdikFW

When i startet the debug mythfront gave the error:

Code: Select all

<xxxxxx>@FE-Stuen:~$ mythfrontend -v playback > debug.txt
"Display: Requesting EGL for 'Mesa Project, 1.5'"
Failed to open VDPAU backend libvdpau_va_gl.so: kan ikke åbne delt objektfil: I>
Cannot load libcuda.so.1
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
DRM_IOCTL_I915_GEM_CONTEXT_DESTROY failed: Ugyldig fildeskriptor
<xxxxxx>@FE-Stuen:~$

jksj
Junior
Posts: 82
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: Myth31 Missing VAAPI support

Post by jksj » Sun Jun 07, 2020 9:44 am

Looking at the log (I am not an expert) VAAPI is installed and working.
However are you trying to display a 1280*720 25Hz video on a 1920*1080 display running at 60Hz.
I would expect issues if the frame rate of the video does not match a multiple of the screen rate.
Software playback may be more tolerant as you have observed.
Try Opengl High Quality after the next build becomes available.

User avatar
kmdewaal
Developer
Posts: 88
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Myth31 Missing VAAPI support

Post by kmdewaal » Sun Jun 07, 2020 2:01 pm

This is what looks suspect to me:

Code: Select all

2020-06-07 09:43:37.276594 I  AFD: Initial key frame distance: 15.
2020-06-07 09:43:37.314019 I  AFD: Key frame distance changed from 99 to 1.
I am not the expert on video coding but a key frame distance of 1 might be wrong.

jensk
Junior
Posts: 19
Joined: Sat Oct 06, 2018 11:38 am
Denmark

Re: Myth31 Missing VAAPI support

Post by jensk » Sun Jun 07, 2020 4:30 pm

I am a bit puzzlet about this. I was under the impression that Mythfront by it self adjusted the resolution af frame frequency of the screen to the the parameters of the source material.
My nVidia setup frontend runs the resolution 1024x768 60Hz but still it plays the same material without stuttering

What if one plays material of different resolution and framerate - there should be an automatic adjustment to the media parameters by the frontend

Or am I completely wrong

jksj
Junior
Posts: 82
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: Myth31 Missing VAAPI support

Post by jksj » Mon Jun 08, 2020 4:27 pm

You are correct the frontend can switch the display resolutions when correctly setup.
This seems to be your issue.

Code: Select all

2020-06-07 09:43:35.230832 I  AFD: Selected track #0: ID: 0x0 Codec ID: H264 Profile: High Type: Video(1280x720) Bitrate: 500000
2020-06-07 09:43:35.230909 I  AFD: Selected FPS: 25 (Avg:25 Mult:1 Codec:0 Container:1000 Estimated:25)
2020-06-07 09:43:35.230978 I  VDP: LoadBestPreferences(1280x720, 25.000, h264)
The system is displaying at 25HZ.
There have been recent threads covering the issue, which is beyond my expertise, possibly depends on if X or Wayland is being used.
I would start a new post including your log as this threads title does not cover the real issue.

Post Reply