Kodi Community Forum
How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: How to Install XBMC PVR Xvba for AMD/Nvidia/Intel GPUs (/showthread.php?tid=116996)



RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - fritsch - 2012-08-29

@FeloniousMonkey:

Keep AC3 passthrough unchecked as your hardware cannot do it - if not: you get noise or nothing :p

Concerning the Stuttering:
1.) Please supply a mediainfo of such a file
2.) pastebin the output of xbmc-xrandr (you find it in /usr/(local)/lib/xbmc)
3.) Tell us your settings concerning (Adjust Refresh Rate to match Video and Sync Playback to Display) - also check if Vertical Sync is enabled.
4.) pastebin xbmc.log with debugging turned on

And one important fact: Divx/Mpeg4 etc. are solely handled by ffmpeg - no xvba is involved. <- Cause of Amds Grace :-)

Those were my ideas :-)

5.) One Idea left: Set sync playback to Display with method: Audio Clock <- this is not recommended normally, but i think this is all caused by an AE design bug :-)


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - FeloniusMonkey - 2012-08-29

(2012-08-29, 20:15)fritsch Wrote: Keep AC3 passthrough unchecked as your hardware cannot do it - if not: you get noise or nothing :p
Naturally Smile

(2012-08-29, 20:15)fritsch Wrote: 1.) Please supply a mediainfo of such a file
2.) pastebin the output of xbmc-xrandr (you find it in /usr/(local)/lib/xbmc)
4.) pastebin xbmc.log with debugging turned on
Will do all these as soon as I get home from work.

(2012-08-29, 20:15)fritsch Wrote: 3.) Tell us your settings concerning (Adjust Refresh Rate to match Video and Sync Playback to Display) - also check if Vertical Sync is enabled.
Vertical Sync: Always enable
XVBA: On
Adjust Refreshrate to match video: On
Sync Playback to Display: On
Sync Method: Video Clock (Drop/Dupe)

(2012-08-29, 20:15)fritsch Wrote: 5.) One Idea left: Set sync playback to Display with method: Audio Clock <- this is not recommended normally, but i think this is all caused by an AE design bug :-)
Will try this, and let you know how it goes. I really hope your gut is right about it being an AudioEngine bug.

(2012-08-29, 20:15)fritsch Wrote: And one important fact: Divx/Mpeg4 etc. are solely handled by ffmpeg - no xvba is involved. <- Cause of Amds Grace :-)
Was afraid I might hear this. I'm gonna try out a rip in H.264/AC3, and let you all know how that goes. H.264 will use XVBA, right?
Let's just hope this is all due to something silly.

Thanks for the quick tips!


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - fritsch - 2012-08-29

@FeloniusMonkey:
Xvba does: H264, VC1

It does not: all the rest :-(. Not our fault ...

PS: Why did you quit irc?


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - FeloniusMonkey - 2012-08-30

(2012-08-29, 21:16)fritsch Wrote: @FeloniusMonkey:
Bad News: I tried all of your suggestions, fritsch, and unfortunately, none of them worked.

Good News: I did, however, manage to solve the problem, and it was definitely something stupid-- on MY part!
I had my channels set to 5.1. I changed it to 2.0, and it suddenly worked. The only reason I was getting audio under all other cases was because XBMC doesn't attempt to recode a 2-channel stream into 5.1 channels (and rightfully so).

Sorry to waste your time on this one. I should've seen this much sooner. Guess a configuration issue is better news than a hardware limitation or a bug in the code!

I hope this info helps someone else having the same problem.

Thanks again, fritsch, for all your help!


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - fritsch - 2012-08-30

@FeloniousMonkey:
Can you tell me all of your Audio Engine Settings?

I have set them to 5.1, disabled "play stereo on all" and activated only AC3 and DTS - cause those only need "two real channels" to play 5.1 - and DTS-HD / True HD is "more or less" correctly mixed to that virtual speaker number.

I think you had LPCM enabled? and it tried to recode it to that one?


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - FeloniusMonkey - 2012-08-30

(2012-08-30, 08:26)fritsch Wrote: @FeloniousMonkey:
Can you tell me all of your Audio Engine Settings?

I have set them to 5.1, disabled "play stereo on all" and activated only AC3 and DTS - cause those only need "two real channels" to play 5.1 - and DTS-HD / True HD is "more or less" correctly mixed to that virtual speaker number.

I think you had LPCM enabled? and it tried to recode it to that one?
I lied-- I actually had it set to 3.1 because I never hooked up my two rear speakers. I assume 5.1 would have yielded the same result for me though.
I'm kinda curious how it gets from encoded 5.1 to decoded 3.1. Does it go from 5.1 to PCM, and then map (in some way) into 3.1 channels? I'm assuming it's something like this because 2.0 channels doesn't slow everything down, yet 3.1 does. Incidentally, despite the system dragging at 3.1, I noticed (upon pressing "o") that the CPU utilization during the decoding was only around 15% for each core. The only reason I can imagine is that there is some unnecessary thread synching going on during the decoding that's blocking responsiveness in the system.

BTW, you had told me you use a Marantz PM6002, which has only L/R analog stereo inputs. Why would you activate AC3 and DTS passthrough in your own config? If you don't have any AC3 or DTS encoded files, then your audio is only working for the same reason mine was. Watch an AC3 encoded video, and you'll probably end up with nothing but digital noise.

Again, I figured out how to solve the problem. If you still want my AE settings, let me know if you want the settings WHILE I was having the problem, or the settings NOW, after I've fixed it. Also, is there a flat file (XML?) that holds all these settings, that I can pastebin here?


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - fritsch - 2012-08-30

@FeloniusMonkey:
Marantz PM 6002 at my xbmc / nas device (music and movies in my office)
Marantz PM 1402 at the living room.

Just tell me the AE settings when you had the problem. If you had unchecked AC3 and check LPCM this 5.1 stuff would in deed be remixed to 3.1 by LPCM, which should not work at all with 2 real channels. You would see images at approx 4fps or 8 fps :-)

When enabled LPCM on AMD make sure - you only have 2.0 speakers set on AMD over hdmi.


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - FeloniusMonkey - 2012-08-30

(2012-08-30, 17:38)fritsch Wrote: Just tell me the AE settings when you had the problem. If you had unchecked AC3 and check LPCM this 5.1 stuff would in deed be remixed to 3.1 by LPCM, which should not work at all with 2 real channels. You would see images at approx 4fps or 8 fps :-)
That was EXACTLY the case--images at no more than 4fps, and no sound.
(2012-08-30, 17:38)fritsch Wrote: When enabled LPCM on AMD make sure - you only have 2.0 speakers set on AMD over hdmi.
Where is the LPCM setting?



RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - fritsch - 2012-08-30

@FeloniusMonkey:
It is under the passthrough settings - the problem is that part of the Alsa Sink:
Code:
snd_pcm_hw_params_set_channels_near(m_pcm, hw_params, &channelCount);

  /* ensure we opened X channels or more */
  if (format.m_channelLayout.Count() > channelCount)
  {
    CLog::Log(LOGERROR, "CAESinkALSA::InitializeHW - Unable to open the required number of channels");
    return false;
  }

  /* update the channelLayout to what we managed to open */
  format.m_channelLayout.Reset();
  for (unsigned int i = 0; i < channelCount; ++i)
    format.m_channelLayout += ALSAChannelMap[i];

As you see here, alsa bails out with "return false" and the Reset(); is never done in this case ... this is obviously a bug. Still looking where to report it to.
Removing the return false;

makes it work :-)


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - fritsch - 2012-08-31

The unstoppable wsnipex has built packages for the vdr-plugin-vnsiserver.

So now there is no need to build vnsi server yourself. Together with the supplied vnsi plugin for xbmc, we can provide PVR experience out of the box.

Installation is as easy as (if you already have a vdr up and running):
Code:
sudo apt-get install vdr-plugin-vnsiserver

Afterwards you have to change the permissions for the computers that are allowed to connect to vnsi
Code:
# the next one should be a symlink to /etc/vdr/plugins/vnsi-server/allowed_hosts.conf
# we check permissions. Btw. please report back when this symlink does not exist
# the file would then be empty
sudo edit /var/lib/vdr/plugins/vnsi-server/allowed_hosts.conf
# correct the hostmask if need
# default one is this, if you are in this subnet, just quit without doing anything
# if not, change the line accordingly, e.g. 192.168.1.0/24 or 10.0.0.0/24
192.168.0.0/24

With this vnsi-server now packaged, xvba can be installed together with vdr, without recompiling anything.
Thx and credits to wsnipex!


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - wsnipex - 2012-08-31

Note: vdr-plugin-vnsiserver for now is only available in the testing ppa! If some users can confirm it working ok, I'll put it in normal ppa too.


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - fritsch - 2012-08-31

it works for me, also in my user role :p


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - limahlowski - 2012-09-02

I want to install XBMC PVR Xvba from source (https://github.com/FernetMenta/xbmc/commits/master)
then:

. / bootstrap
. / configure - what options ??

Any help?


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - fritsch - 2012-09-02

@limahlowski:
Please open a different thread. This one is a howto for installing a setup without touching a compiler. I will reply to you in this new thread.


RE: Howto Install XBMC PVR Xvba for AMD/ATI Radeon and Fusion GPUs - jannk - 2012-09-02

Hi - I'm running XBMC PVR Xvba, the latest alpha 5 build; (almost) everything runs pretty smoothly - except one thing: when I stop recording from DVB-T, XBMC crashes (and restarts again). Here's my log: http://pastebin.ca/2200239
Recording directly at http://localhost:9981 works just fine

I understand it could be my configuration issue, I know it's alpha, so I can live with it until Frodo is released - but if you know what I'm doing wrong, I'd be greatful. thanks.