Page 1 of 6 123 ... LastLast
Results 1 to 10 of 59

Thread: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Others

  1. #1
    Join Date
    Jan 2010
    Beans
    188
    Distro
    Kubuntu 9.10 Karmic Koala

    Thumbs down AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Others

    Updated:
    January 29, 2010

    Hello everyone. Since I wrote this tutorial nine days ago a few things have been going on. AMD / ATI released version 10.1 of the Catalyst Control Center for starters. This driver release will be the official driver for this guide. The other drivers should work for you, but this is the first driver to really have AMD going in the right direction with Linux Support.

    It appears they re-setup the driver to install the XvBa files. This is looking like they think the driver with the Catalyst Control Center 10.1 is ready for wider testing by individuals. They have also added new setup switches to aticonfig, like for TLS showing they are working on driver that can take advantage of X-Windows better and visa versa.

    It is now time for us AMD graphics people to be able to have totally tear free video playback, and even in some cases full hardware acceleration on top of that. Prior to this driver the use of Xv could bring an occasional tear when watching video, not ones that destroy enjoyment, but enough of one to say you can notice it once in a blue moon.

    With the release of Catalyst Control Center 10.1 almost two days ago, yesterday I went to work on seeing what other things I could do to improve the video playback experience using AMD GPU's. I have finally done it. I now have OpenGL rendering working fully and tear free with MythTV. No drawing / overlay issues anymore. It is all a thing of the past.

    I know this can all be easily replicated on other systems. Because of this new turn of events, it now makes tear free playback in MythTV perfect, not everyone will need to go the route of compiling the hardware accelerated MPlayer to enjoy perfect video playback, though I will say I personally prefer the quality difference between the hardware decoding over FFMpeg software decoding for MPEG4 based files.

    This guide when I am done should also flow a little better and make a little more sense as well for some who are hesitant needing to see it isn't as bad as it sounds. I hope these changes make some people's lives easier.

    I am getting a lot of questions regarding the GPU's prior to what this guide has been written for, namely the HD3xxx series. From what I have gathered from others out here who have tried parts of this guide, is that XvBA should work for you, but not XvMC. The new OpenGL settings I have come up with and proper rendering in MythTV I am not sure about, but would think that should work for you as well and be tear free like it is for me. That is depending on your actual Catalyst Control Center OpenGL settings being set correctly and not too high for the system to handle of course.

    So I will say this, if you are running the AMD proprietary drivers, then this guide should benefit you in some way, shape, or form. How is that?..lol.


    Please Note:

    This tutorial is for Ubuntu 9.10 and its derivatives. It should be relevant to earlier releases of Ubuntu such as the 8.x generations and up. It should also be relevant to most Debian based distributions as well, along with non Debian derivatives.


    Also I take no responsibility if anything you do here causes damage to your computer, causes it to blow up, or even if it leads to cats and dogs living together and mass hysteria (Sorry felt like paraphrasing that from Ghostbusters).

    Introduction

    A guide of this nature needed to be written for quite some time now. So many of us, myself included, have had some issues, call them quirks, with using our AMD / ATI based graphics cards. This has been regardless of us using AMD's proprietary drivers or the ones the developers in the Open Source community have graciously created for our use. For the most part with the three drivers available, the proprietary and the two available from the community, the complaints have been about the sames types of issues for the most part.

    The complaints tend to center around video playback and acceleration. This really has tended to give a bad impression of AMD GPU's and Linux. This is truly not how it should be. The video cards based on AMD GPU's are far from junk.

    AMD based video cards work beautifully under Windows, and that is sadly due to how Gates and Microsoft managed to leverage their places in the marketplace. This part of the history why can bring about a lot of debate. Some would say smart business decisions, others would say unfair business tactics, that is beyond the scope of this guide though. What it did do was create a large gap in hardware support for other operating systems.

    Where Windows has been such the dominant OS, it was only logical to place focus on driver development with it. AMD was not the only GPU maker to go this route. nVidia has done so in the past as well. They learned from having a focus such as this as have other hardware makers.

    nVidia got the head start in the Linux market, but that started to change. ATI before the buyout by AMD, changed their focus from developing two separate driver code bases. They unified the code for both Widows, Linux, and it appears MacOSx has been incorporated as well. This has allowed for jumps in driver performance that has been quite large with Linux compared to before the code consolidation. AMD has continued this focus ATI started of bringing Linux into the fold, making improvements on driver capabilities, along with adding support of hardware features the Windows and Mac worlds have had access to.

    AMD is now truly giving nVidia a run for their money when it comes to Linux and the GPU market in general. As PC users, we are starting to see the results. Not only with the products on the market from AMD currently, but also in the leaps fgrlx has seen in performance compared to price point.

    I have done a lot of research on the quest to get the absolute optimum from my Sapphire AMD HD 4670 video card. One reason I purchased it, was AMD's UVD and UVD2 technologies which were supposedly coming to Linux through AMD / ATI direct, with support provided through fglrx. Compared to nVidia's VDPAU, it as a technology has definite benefits. Unlike VDPAU, which is a means to support features originally intended to be supported by Windows through DirectX interfaces, XvBA is designed to have API calls that are platform and DirectX independent. XvBA had been designed to be this way from moment one, VDAPU was not, it was adapted.

    Sadly, it has taken some time for the reality of XvBA being cross platform to happen. Regrettably, it had to happen after the finalizing of a new MythTV version, which would benefit greatly from adding the means to use XvBA decoding to it. This is because the interface used to access the hardware level of the GPU benefits more then just AMD users.

    Accessing XvBA is done through the VA-API interface. This interface was originally designed by Intel for it's own GPU's, but it has grown to allow for nVidia to use it besides AMD. The support base for VA-API has grown including the ability for other GPU makers' technologies to share it's interface. A solution finally has arrived which now allows for code to be written once, it does not matter that each GPU being called by it has totally different coding and hardware structures. That is how it has been for the Windows world with DirectX allowing for interfacing such as this using hooks in the driver API calls. Now this capability on Linux to have code written once and interface with many GPU's allows for us AMD users to have access to hardware accelerated decoding of video and it's playback. Which is definitely something the Linux nVidia camp has rubbed in our faces.

    It has allowed for AMD to keep their code for UVD proprietary, only needing a intermediary interface to acces it. This was the majority of code AMD has not been able to release. It is because in UVD / UVD+ / UVD2 capable GPU's, it appears AMD / ATI placed a lot of the hardware decoding features into them with hard linkings to the DRM on each GPU's die. There was no need to have DRM as part of it, but it does make for implementing HDCP compliant connectivity and DRM decoding such as with Blueray in theory easier, just not use under Linux thanks to NDA agreements and our community is all thieves according to groups like the MPAA. Thankfully with the use of VA-API AMD can keep the specs and code agreed to under the NDA internal and we get full hardware accelration and decoding of video.

    Now we need to actually look at what you are getting into. From here there are a few things that you will need to know before starting. There are a couple of things you will need or should do before starting.


    Before Getting Started:


    This guide has been written for Radeon 4000 and 5000 series GPU's. Originally the drivers used in it, were the ones provieded with Catalyst Control Center 9.10 and 9.12 Hotfix. You can still use these drivers, but AMD has released version 10.1 of the Catalyst Control Center and it is the reccomended version to use. If a newer version is available then 10.1 it should be safe to choose that one where AMD is increasing it's efforts to have the VA-API access XvBA.


    You can not use any drivers then the ones specified from AMD. Versions of Catalyst Control Center prior to 9.10 are not capable of hardware accelerated decoding and playback of MPEG4 base video. For version 9.12 it is necessary that it is the Hotfix version, otherwise support is broken. As stated, this guide now uses 10.1 and there should be no reason to use the older driver versions. Eventually they will be removed from this guide entirely.

    You will be making some changes to your configuration files. So make sure to back them up before making any changes. This way if you do something that makes your graphic interface unusable, you can restore it back to prior the modifications easily.


    Needed Files:


    AMD Drivers:

    Catalyst Control Center Download
    *This link takes you directly to the main driver download page for AMD graphics. You can download from here any of the driver versions this guide uses. If using Catalyst Control Center 9.12 Hotfix, you still need to download the original release of it and install it before the Hotfix.

    Catalyst Control Center 9.12 Hotfix
    *Places a watermark in the bottom right of the screen stating "AMD Testing use only" once installed, a reason to consider 10.1.

    VA-API Files:

    GB's Corner (Developer's Page)
    *The developer has been nice enough to include .deb files for all of the VA-API files.

    You will be downloading the following files:

    • libva1
      *This link will directly download the VA-API library binary. It can be updated periodically but not to the point it could not be linked directly here. I will try to keep this link up to date, but if you want to make sure you have the latest go to the developers site using the link above.

    • libva-dev
      *This link will directly download the VA-API library development files. It can be updated periodically but not to the point it could not be linked directly here. I will try to keep this link up to date, but if you want to make sure you have the latest go to the developers site using the link above.
    • libva1-dbg
      *This link will directly download the VA-API library debug files. It can be updated periodically but not to the point it could not be linked directly here. I will try to keep this link up to date, but if you want to make sure you have the latest go to the developers site using the link above.
    • xvba-video
      *The XvBA interface for VA-API is updated quite frequently with it still being in it's infancy so to speak. I have found it to be very stable even though young, don't let it's short life so far scare you off. This link places you into the directory for it. Make sure to download the latest version.
    • mplayer-vaapi
      *MPlayer is constantly under development and it appears that the XvBA VA-API interface developer is keeping up with it. Not only for that reason, but also for stability ones I am sure with XvBA and MPlayer as well. This link places you into the directory for it. Make sure to download the latest version



    File Installation:


    Catalyst Control Center:

    In order to install the Catalyst Control Center you need to make sure of the following:


    • This file must be made executable. You can do so through the properties window in your graphics manager or by using the command which will make it so everyone can read write or execute it. Crude but effective for new users:

      chmod 777
      ati-driver-installer-10-1-xx-x86.x86_64.run

    • It is recommended to have the file saved in a directory without spaces. The reason is it can error trying to executing the installer. A way around this that should work is to enclose the path and filename in quotes.


    sudo sh ati-driver-installer-10-1-xx-x86.x86_64.run --buildpkg Ubuntu/karmic
    *This will create a package for installation by apt-get or one of the graphical package managers. Note for Catalyst Control Center 10.1 and Ubuntu 9.10, this option is broken but there is a work around on this forum. It is not the preferred method for this guide and should not be in general. It compiles modules to the current system kernel. If you update the kernel then you are applying old modules to it and that is not the best thing to be doing under any circumstances.

    or

    sudo sh ati-driver-installer-9-xx-x86.x86_64.run
    *Go through the menus and choose to
    install the drivers without using a package. This is the way I prefer. You will have to go in under "safe mode" and rerun this command with every kernel update from the directory where you have it saved, but seems to have less issues then the drivers from packages.

    If you are using Catalyst Control Center 9.12, you will have to install 9.12, then the Hotfix. You can not just install the Hotfix itself which is just the driver files. You also need the Catalyst Control Center as well for this Guide from the non Hotfix Catalyst 9.12.

    Once installed you will need to run the following commands:

    sudo aticonfig --initial

    or

    sudo aticonfig --initial -f
    *Using the -f option will cause a clean xorg.conf to be written.

    You will need to make sure there are two files installed with these drivers. For some reason on this pretty fresh install of Karmic they didn't get installed with Catalyst Control Center 9.12. When I upgraded to 10.1 I was unable to see if these files were installed having this setup prior.

    The two files are the libraries that VA-API's XvBA interface will be calling to, and the installer seems to neglect X86_64 when installing them. Supposedly, the 32bit binaries for them get installed on both 32bit and 64bit installs but I have no way to confirm this. (If they do not please post here so others will be aware of it.)

    The two files should be in either of these locations

    /usr/lib

    or

    /usr/lib64

    The missing files:

    libAMDXvBA.so.1.0

    and

    libXvBAW.so.1.0

    If they are not on your system, you will need to extract them from the driver .deb. This is easy. Use the following command in the terminal.

    sh ati-driver-installer-9-xx-x86.x86_64.run --buildpkg Ubuntu/source

    This will create an archive in the same directory as the driver's .deb file. You need to extract this archive, and find the lib64 directory in /x86_64/usr/X11R6/lib64. Inside of it are the files you will need if they were not installed onto your system.

    These files will need to be symlinked like the following example once copied there:

    sudo ln -s libXvBAW.so.1.0 libXvBAW.so.1

    If this is not done, Xv Binary Acceleration errors will arise with the VA-API and it won't work. All you will get is sound and a few errors in the terminal window.

    Once you are at this point there needs to be some configuration made to optimize fglrx.

    First is to modify your xorg.conf. I have done a lot of research on this particular part of this guide and in your xorg.conf all you should need is the following options set in the driver section under where it says Driver "fglrx".

    su gedit /etc/X11/xorg.conf

    or

    su kedit /etc/X11/xorg.conf

    This snippet allows for OpenGL Rendering to work properly in MythTV, reduces tearing greatly if not removes it for Xv, specifically tells X which monitor to overlay on (Should be enabled even if a single monitor setup.), and also enables FastTLS an AMD optimization.

    Code:
        Option        "TexturedVideoSync" "on" #HD4xxx & HD5xxx use textured video to render Xv. This helps to remove tearing.
        Option        "Capabilities" "0x00000800" #This option also turns on vertical syncing as well. Both can and do work well together.
        Option        "OpenGLOverlay" "off" #This is for workstations and certain commercial graphics applications for them. Nothing as Linux user that we do needs this so disabled.
        Option        "UseFastTLS" "on"
        Option        "OverlayOnCRTC2" "0" #For some reason when only using one monitor it should see this and use overlay on it correctly and does not. This I believe is what caused some of the MyThTV issues. This needs to be set to 0 for a single monitor application and in a multiple monitor to the one MythTV is displayed on.
    Now it is time to reboot your machine and configure the Catalyst Control Center:

    Open as administrator from your machine's launch menu or by the means below the Catalyst Control Center

    $ amdxdg-su -c amdcccle

    or

    $ sudo amdcccle

    Now we need to adjust several settings here before continuing.

    Note before starting that these settings work on the HD4670 without issue. On the older GPU's supported by the proprietary driver or even a lower 4XXX model, these settings may be too much for system to handle and run smoothly. There might have to be some tweaking to your specific system.

    Go to the 3D section of the options list on the left. These settings actually effect 2D rendering in Linux as well to some extent. It doesn't say it does, but they do. It is because rendering even when not using OpenGL in Linux still uses it for things like vertical syncing, also we will be using OpenGL rendering in a large part of this guide for rendering and playback.

    You are going to manually override the system settings on each of the options for 3D to their max settings. I have absolutely no problems with rendering doing so and the quality difference is quite noticeable. If your system has problems handling the workload they will have to be brought back from max settings a little.

    Anti-Aliasing:
    Override and set to 8x

    Adaptive Anti-Aliasing:
    Override and set to Quality

    Anisotropic Filtering:
    Override and set to 16x

    MipMap Detail
    Override and set to High Quality

    More Settings:
    Wait for Vertical Refresh
    Set to on unless application specifies off
    * This is the second to last option. You can set to be always on, but no need for it. If an application wants no refresh rate syncing let it. Plus having it on is actually better in my opinion. What is so great getting 10,000 frames a second if the display can't reproduce it. Visually all you will see perceive is what the display is capable of.

    Enable Catalyst AI:
    You want to enable and set to advanced.

    You will need to at minimum log out and back in for these settings to take effect, but I would suggest a reboot to be safe. Sometimes fgrlx settings don't want to take unless there is a reboot involved, and the nature of the beast so to speak.

    VA-API Files:

    Install in this order. If you try to install in any other order it should throw an error.


    Mplayer Compile and Install:

    Before starting please note. If you are using the nightly stable or tree builds of MythTV you will encounter your package manager wanting to remove MythTV. The reason being is MythTV is using a new VDAPU library and MPlayer needs the old one to have it's dependencies met. I am currently trying to get it to work around this, but to little success. If you want to compile your own you will have to let it remove the newer MythTV, or I do have two pre-compiled versions of MPlayer that I made before switching to the nightly builds of MythTV 0.22.

    One is a strict MPlayer without GUI, the other is compiled for a the GUI and because of it buggy as all hell. They have been compiled for X86_64 on an AMD AM2 based processor but should in theory run on any X86_64 system. I have created a tarred bziped file of them. It is too big to include here, but if there is enough interest I will find a place to setup a link to from here. Message me or post here if you you like me to include a link to them.


    To build your own:

    1. $ sudo apt-get build-dep mplayer
    2. Extract the bzip2 file containing MPlayer and enter the extracted directory.
    3. $ ./checkout-patch-build.sh

    Let it build MPlayer. It could take a few for the compiling of MPlayer. If you smoke, now would be a good time to go have one. It took on my AM2 Dual Core less then 10 minutes, about a cigarette to be honest, and that was applying the patches besides the compile.

    This is just mplayer, no gmplayer is compiled with the script. It is best for use with keyboard shortcuts and / or Lirc on the note of controls. Remember though this version of Mplayer was given to us through the generosity of the VA-API XvBA interface and it's developer so don't be going awwwww man or complaining.

    To start this VA-API enabled Mplayer for Testing:

    (*Below was taken from the readme word for word)
    $ cd mplayer-vaapi
    $ ./mplayer -vo vaapi -va vaapi <URI>

    <URI> can be a pathname or an URL.

    For OpenGL rendering:
    $ ./mplayer -vo vaapi:gl -va vaapi <URI>

    For OpenGL rendering with reflection effect:
    $ ./mplayer -vo vaapi:gl:reflect -va vaapi <URI>

    The reflect option is as it sounds, and kinda trippy..lol.

    It provides a mirrored copy of the file you are playng inside the MPlayer window.

    Test MPlayer at this point with an MPEG4 stream such as AVC1, WM3 aka WM9, or VC1. It uses either Xv and GL rendering, Regardless of which renderer you choose, everything should be working for you beautifully on the note of hardware acceleration. I personally find the picture quality a little bit better using the openGL renderer and it is absolutely tear free besides. Plus it actually uses a bit less processor on my system then Xv, go figure.

    You can compile this version of MPlayer to use the GUI, but will have to go into the directory yourself to do so. In order to do this, you need to either manually patch the source or let the script run to do it and make the default MPlayer that it does.

    Then go into the directory, and do a make clean after the script has completed. You can do the make-config, make, etc yourself now. Remember you will have to pass the options to MPlayer for it to compile with VA-API support.

    This is how you would do it:
    $ ./configure --enable-vaapi --disable-vdpau

    Then you need to configure the GUI and OSD for it:
    $ ./configure --enable-gui --enable-menu

    Finally Compile it:
    $ make

    If you are satisfied with how it is working and want to install it:
    *Remember this is experimental and I will not take responsibility for doing this. You will need to have the packaged version of MPlayer removed to do so as well.

    $ make install

    Please Note:

    There is a patch for VLC to use the VA-API library. It has not been mainstreamed into the code at this point. If you were to want VLC you need to get this patch, apply it, and compile your own copy of it. I do not have the patch or the source code for VLC linked here. You can go to the VideoLan website for it.

    I would like to setup a VA-API PPA for 9.10 and other releases as well. If someone wants to build packages of compiled versions of MPlayer in 32bit or 64bit, VLC, etc., message me here and I will get it all setup. Ubuntu really needs to have one easy setup repository for doing this.

    At this Point:

    Now your system is ready to have your video applications configured, in the case of this guide MythTV and Mplayer primarily. In order to do so properly lets look at what we have done up till this point and also what has been added to the fgrlx driver but not widely documented. It will all start to click with seeing everything listed here.


    Hardware Decoding / Acceleration:

    MPEG1&2 Decoding and Acceleration:
    It is little known that as of Catalyst Control Center 9.10, maybe even before this release of it, AMD re-enabled hardware decoding of these streams through the AVIVO now UVD interface using XvMC not XvBA. It works very well, and for the most part is fully compatible with the VIA implementation that nVidia also supports in their older GPU's. HD MPEG2 streams decode on my system use almost no processor and only 30% of the GPU at peak hits to it decoding, heavy action scenes are an example, but the core is keeping itself at the minimum clocking when under 30% load. This is using MythTV, which was itself using the processors at around 10% combined on a dual core AM2.

    This capability is only available on HD4xxx and higher GPU's from what some members out here are finding out. This may change at some point though and dependent on AMD supporting it through their proprietary driver. If someone on a GPU prior to the HD4xxx's tries this and it is a success let me know or post it here so this section can be corrected.

    MPEG4, AVC, WM3 aka WM9, and VC1 Decoding and Acceleration:
    Even though "experimental", you now have hardware accelerated decoding of MPEG4 based streams. Personally I have found the results to be far superior then ffmpeg decoding with no artifacts, not had one crash using it so far, and would not consider this to be experimental myself at this point, but who am I to argue.

    Update January 29, 2010:

    I have currently tested the hardware decoding with a variety of "non-supported" formats. I have tried the old Windows hacked DiVX 3 along with the legal version 5 encoded files and they playback flawless. They do have a tendency to tax the GPU a little, especially DiVX 3, but regardless play very well for me. I have also tried ffmpeg and Xvid encoded videos with great success as well. From my experience, I will say with relative safety that it will play nearly all MPEG4 formats.


    No More Tearing:

    Making the changes you have to your xorg.conf and Catalyst Control Center should now have tearing as a thing of the past. For Xv rendering it is substantially reduced to nearly non existent levels. You may on a rare occasion see a tear or line cutting through the picture, usually in very high speed movement, but not what it was before then.

    OpenGL, whether with or without the use of XvBA hardware decoding and acceleration, will be absolutely 100% tear free. With the settings of Catalyst Control Center, the picture quality should be better then Xv as well. You may have to increase the brightness settings a little though. This is from my experience of course, and your's may vary.

    With the update of this guide, you are now presented with choices in rendering using MythTV owning an AMD GPU finally. We have never been able to properly run OpenGL rendering with MythTV and I have seen posts to this extent going back several years.

    No offense meant to the MythTV developers, but they have never truly addressed the owners of ATI / AMD GPU's. We are like the red headed stepchildren of the MythTV community of users. While the favorite son, nVidia, has received all of your love with us over in the corner, neglected, even ridiculed and made fun of.

    When MythTV 0.22 was in development, the VA-API which would have benefited a large number of GPU's including both AMD and nVidia was neglected, yet VDAPU wasn't. This limited hardware acceleration of MPEG4 to only nVidia. That is to extent proof to this favoritism and being the red headed stepchild. This lead me to rebel like us red headed stepchildren tend to do and find my own solution, and I did eventually.


    No More Pulling Your Hair Out:

    Watching video without tearing, until now using AMD GPU's has been a pull your hair out, and want to scream situation. The distributions should help minimize this, and help it from not happening offering compiled binaries of these drivers for use. Yet they don't. These are settings I provided for the xorg.conf are common to nearly all AMD graphics using proprietary drivers, especially HD4xxx and higher. The other settings in the Catalyst Control Center can be set I am sure to default to what I have found to be optimal assuming detection of the GPU is done correctly. If not a pop up windows saying hey you have this driver installed and these settings should be made to not encounter tearing, etc, would be nice.

    The MythTV developer's focus on nVida to an extent hasn't help with hair pulling. There is little to no documentation on getting the most out of AMD graphics with MythTV from them, yet there is post after post on many forums asking for solutions and help. Then at least in my experience, when going out actively searching for a solution or a suggestion to improve playback on the MythTV IRC channels instead of anything constructive I am told to go out and purchase an nVida card far inferior to my AMD and nearly costing the same. How is that a solution?

    So to save you from pulling your hair out, I did instead. I jokingly say to some it is why I began buzzing my head down. Because my hairline couldn't take much more of dealing with getting MythTV and it was the only way to keep the hair I still got..lol.

    Now it is time that we have all the components to put them all together and have them play nice.

    Putting it all Together

    It is time to setup MythTV and MPlayer. The way described here does not replace the existing install of MPlayer you have. Where this software is considered experimental I deemed it best to create a bin directory in the user's home directory, and then call it like any other application from a modification to the bashrc script for the account being used. Lets see how everything goes together.

    Getting MPlayer to Work with Shortcuts and by Calling it Directly:

    We now need to setup this version of MPlayer to be able to be called by command line by name and also by shortcuts without providing paths.

    Create a directory called bin in your home directory as follows:

    ~$ mkdir /home/{username)/bin

    Now move your compiled MPlayer directory into the bin directory you just created:

    You can do this but need to have the name change if directly in bin, otherwise the symbolic link won't work properly. The other options would be to set it inside another directory. Then there will be no issue. That is how I actually did mine.

    ~$ mv /home/{username}/{directory where you extracted the whole archive}/mplayer-vaapi-20100114/mplayer-vaapi /bin/mplayer

    Now we need to symlink mplayer and gmplayer if you compiled a graphics enabled version to be executable the way we want. You will need to make 3 symlinks for this to work properly. One of these symlinks is needed if only using MPlayer created by the script.

    All these commands are assuming that you are in the bin directory you created.

    Needed Symlink:
    ln -s mplayer-vaapi /mplayer/mplayer

    Optional gmplayer Symlinks:
    ln -s /mplayer/gmplayer /mplayer/mplayer

    ln -s gmplayer-vaapi /mplayer/gmplayer
    *This one can also link directly to the mplayer binary file itself as well. I figured this way it is consistent.

    Now we need to make it so when you are in a terminal or click on a shortcut bash knows what to do. You need to have your bin directory declared in one of two files. It can be declared locally or globally in bashrc. If you declare it globally, regardless the account you are in, you should create a bin directory for it, even if there is nothing in it at all.

    Declaring in Bash Locally:

    To Open the File:

    $ gedit ~/.bashrc

    $ kate ~/.bashrc

    Declaring in Bash Globally:


    $ su gedit /etc/bash.bashrc

    $ su kate /etc/bash.bashrc

    Add the Following at the Bottom of bashrc:

    PATH=$PATH:~/bin
    export PATH

    Log out or reboot. If declaring globally, to be safe I would reboot. Honestly I would just reboot regardless. Now you should be able to call Mplayer and GMplayer by the names of the symlinks that you created. To test it open up a terminal and try it.

    Example (If gmplayer config was done before making the binaries)
    $ gmplayer-vaapi

    If you want to try MPlayer (This example uses the openGL renderer. I had an issue with the bottom of the video cut off in full screen my self):
    $ mplayer-vaapi -vo vaapi:gl -va vaapi <URI>

    To create shortcuts, refer to your desktop's documentation.

    Setup of MythTV 0.22:

    MythTV in my opinion, is one of the best HTPC applications out there. It is not only very powerful, It is very flexible. It allows for you to configure a lot of parameters to try to get the best out of your setup. In particular we will be looking at the features associated with its decoding and playback capabilities, such as the actual decoder choices, deinterlacers, and renderers. Those are the only ones really of concern for this tutorial.

    Before we start, I want to state that because of the lack of knowledge that AMD had reinstated XvMC decoding in their drivers there are some deinterlacing issues that were there for all the x2/2x deinterlacers in version .021. They have since been corrected in Xv and OpenGL rendering with 0.22, just not with XvMC with the it's releases.

    MythTV also, as of the release of version 0.22 does not support as stated, the VA-API natively. I have searched to see if there has been a patched version made, but no luck on it. I may have found a patch for the source code though. As I said I would like to setup a PPA for all of this. If someone would like to compile a version that includes support for the VA-API interface I can point you in the right direction to that possible patch and we can go from there.

    If it turns out not to be a patch for it, and someone has MythTV coding experience that wants to get this working, you can modify the code and I will include it in the PPA.

    Now lets get into the settings of MythTV.

    First off you are going to have to make some decisions at this point. These are going to be based off of personal preference, and your hardware beyond the AMD video cards this guide has been written for. If your system is slower processor wise, you are going to have to compromise obviously.

    For example, I have also found a bug in OpenGL rendering with MythTV on all levels that has me making compromises, but now it is workable, not perfect, but workable. I can not get it to render properly with menus at all using the OpenGL renderer for them. It is not the distortion bug they have corrected. It is rendering on the note of placement of windows. This could be a drawing issue with OpenGL and MythTV in relation to AMD because they are the only application using OpenGL that I have seen this happen.

    The ew windows you go into remain under the one you are on, at least it appears to be like that. My solution to get to the next window is to switch to a terminal and then go back to my desktop session using Ctrl+Fn1 then Ctrl+Fn7. That is how I manage to go in to switch back to Qt rendering for menus.

    This issue happens when you are using the Xv or other render options too with OpenGL menus it does not matter. Then with the OpenGL rendering and Qt for menus it will happen without the additions to the xorg.conf I added to it recently. What happens is the guide is rendered once if you are lucky then it does not get to be on top again at all unless you exit Live TV and then it is sketchy on seeing it again without a full restart of MythTV. You can also do the same terminal switch workaround I use with the menus to it.

    I am also finding the One Field deinterlacer for XvMC renderer to be nasty when it comes to standard definition cable coming off the firewire port on my cable box. It is all pixelated and rough looking. You would think that the same would be true for high definition 4:3 as well, but it is not. It actually looks very watchable. As is high definition 16:9.

    Knowing that, you may and probably will encounter these types of issues, here are my settings that I have come to tweaking things. Remember my system is more then capable of handling a heavy of load. It is an AM2 Athlon X2 5.4GHz (2.7GHz per core), 2GB of ram, with a Sapphire HD4670 sporting 1GB GDDR3. If you are working with a less powerful system these settings probably won't work the best for you. I am providing them as a baseline for you to go by.

    MythTV Rendering Settings:

    Here you are going to have to make a choice. If the system is under high demand say acting as both a frontend and backend with multiple connections, then you will probably want to consider the use of XvMC for MPEG2 decoding. If not, then with how OpenGL provides absolute tear free watching, you should consider it. So you may want to take a moment now, think about these types of considerations, and decide which route you will want to go. Personally the system I am using for this guide is used strictly as a frontend in regards to MythTV, so I run OpenGL and software decoding through ffmpeg for MPEG2 decoding off my cable box and ATSC/QAM tuner.

    Now you can setup multiple decoder profiles with MythTV and this can be very helpful, or it can lead to the proverbially shooting yourself in the foot. You just need to make sure that you think first and not just go oh okay this should work. There are a couple of different profiles we are going to setup for MythTV in this guide, lets look at them.

    On your frontend you are now going to start it and go into the settings of MythTV.

    Utilities/Setup>Setup>TV Settings>Playback

    Screen 1:

    • Check off picture controls
      This will allow for you to make color corrections if necessary.

    • Optionally you can check Enable OpenGL vertical Sync for timing, but it may conflict with what we have set otherwise and cause the picture to get jittery even though it is supposed to stop jitter.


    Screen 2:

    Skip it. It does not pertain to what we are doing here.

    Screen 3:

    • Current Playback Profile I have set to High Quality where I tend to watch a majority of my programming and videos in HD.
    • You should now see four playback profiles. The first two are your primary choices and the second two are the fall backs so to speak. If the video's format does not match the first two it will use the second two.
    • You are now at the point where you should have decided on how you are going to have MythTV render video. We are going to setup MythTV according to what you have decided. Below are two examples of changes to make. The first is for setting up MythTV to playback using ffmpeg for decoding and OpenGL for rendering. The other example is for setting up MythTV to use hardware decoding for MPEG2. Please note, I have depreciated the value of XvMC in this guide, but it is still relevant for those of you looking for a hardware decoding solution.
    • You can mix and match these decoder profiles to suit your needs as well. Decoding of MPEG2 HD content you may want to set to use hardware decoding because of overhead, no worries you can do that.
    • Changes to Playback Profiles OpenGL Rendering:
      • If rez is >= 1920x1080 (Ranked 1)
        • Decoder leave at Standard.
        • Video Renderer Set to: OpenGL
        • OSD Renderer Set to: OpenGL2
        • Next Screen (Deinterlacers)
          • Primary Deinterlacer Set to: Bob(2x,HW)
          • Fallback Deinterlacer Set to: Linear Blend(HW)

        • Click Finish.
          *Your primary profile for 1080p/i has now been created. Now to create a profile for standard definition through to 1080p/i.

      • If rez is >= 0x0 (Ranked 2)
        • Decoder leave at Standard.
        • Video Renderer Set to: OpenGL
        • OSD Renderer Set to: OpenGL2
        • Next Screen (Deinterlacers)
          • Primary Deinterlacer Set to: Bob(2x,HW)
            *You may notice occasionally some slight interlacing on standard definition content using this deinterlacer, but the picture quality out weighs this.
          • Fallback Deinterlacer Set to: Linear Blend(HW)

        • Click Finish.
          *Your primary profile for standard definition up through 1080p/i has been created.

      • If rez is >= 1920x1080 (Ranked 3)
        • Decoder leave at Standard.
        • Video Renderer Set to: xv-blit
        • OSD Renderer Set to: softblend
        • Next Screen (Deinterlacers)
          • Primary Deinterlacer Set to: Greedy HighMotion(2x)
          • Fallback Deinterlacer Set to: Greedy HighMotion

        • Click Finish.
          *Your fallback profile for 1080p/i has now been created. Now to create a profile for standard definition through to 1080p/i.


      • If rez is >= 0x0 (Ranked 4)
        • Decoder leave at Standard.
        • Video Renderer Set to: xv-blit
        • OSD Renderer Set to: softblend
        • Next Screen (Deinterlacers)
          • Primary Deinterlacer Set to: Greedy HighMotion(2x)
          • Fallback Deinterlacer Set to: Greedy HighMotion

        • Click Finish.
          *Your fallback profile for standard definition up through 1080p/i has been created.


    • Changes to Plaback Profiles for XvMC:
      *Note these changes are presented separate because they have been depreciated in this guide to some extent, but are still pertinent and useful. It looking to lower overall system load these are the settings to consider. An example would be rendering HD MPEG2. The fallback decoders have been seet to use Xv in this example of settings but the settings for OpenGL can be substituted in their place.

      • If rez is >= 1920x1080 (Ranked 1)
        • Decoder change to VIA XvMC
          I noticed a difference between standard XvMC and VIA XvMC so you might want to try both and judge it yourself.

        • Next Screen (Deinterlacers)
          I had Issues with the Bob x2 deinterlacer under XvMC where it would render 2 pictures, one on top the other. Picture looks good on 1080p display using these settings. If sending to a television you may want to set to none and let the television do deinterlacing where it will probably produce better results.


          • Primary Deinterlacer set to One Field
          • Fallback Deinterlacer set to One Field




      • If rez is >= 0x0 (Ranked 2)
        • Decoder change to VIA XvMC
          I noticed a difference between standard XvMC and VIA XvMC so you might want to try both and judge it yourself. You might want to leave this one set to standard if you watch a lot of standard definition television and choose through the deinterlacers for Xv rendering because it gets extremely pixelated using One Field. If sending to a television you may want to set to none and let the television do deinterlacing where it will probably produce better results.

        • Next Screen (Deinterlacers)
          I had Issues with the Bob x2 deinterlacer under XvMC where it would render 2 pictures, one on top the other.


          • Primary Deinterlacer set to One Field
          • Fallback Deinterlacer set to One Field


      • If rez is >= 1920x1080 (Ranked 3)
        Without this profile the internal player for MythTV is only capable of rendering MPEG2, technically the second ranked one if set to standard will correct that, but we are not using it on standard in the setup. This is only useful if you are using standard as the number 2 profile and I would still set the others as well to be safe.


        • Decoder leave at Standard.
          • Video Renderer Set to: xv-blit
          • Next Screen:
            • Primary Deinterlacer Set to: Greedy High Motion (2x)
            • Fallback Deinterlacer Set to: Greedy High Motion



      • If rez is >= 0x0 (Ranked 4)
        • Decoder Leave at Standard


          • Video Renderer Set to: xv-blit
          • Next Screen:
            • Primary Deinterlacer Set to: Greedy High Motion (2x)
            • Fallback Deinterlacer Set to: Greedy High Motion





    Exit out of these options by clicking finish when complete.


    Now that we have MythTV setup for optimal playback, and we have a version of MPlayer that takes advantage of hardware acceleration, lets make them play nice together.

    MythTV and our Version of MPlayer Playing Nice Together:

    This is pretty easy to accomplish, and MPlayer has been the default player in previous versions of MythTV along with as of version 0.22 the alternative player by default. This is true at least with Ubuntu variants.

    We now need to change some settings in another part of MythTV. If you are still in the settings for television, back out a couple of screen to the main part of MythTV setup. From there you want to migrate to video player settings.

    From the main menu:

    Utilities/Setup>Setup>Media Settings>Video Settings>Player Settings

    We are going to change Alternate Player, not the primary one. You are probably asking why. Simply, it is easy to have a video start playing with the alternate player, this is still experimental and may not support all of your files, and I am not going to have a bunch of people say I told them to make it the primary if they encounter issues or it doesn't play a file..lol.


    Under Player Settings Change the Alternate Player to:

    mplayer-vaapi -channels 6 -fs -cache 8192 -vo vaapi:gl -va vaapi

    The above is assuming you have a 5.1 speaker system setup on your computer using the -channels 6 switch and if you are accessing any of your files over the network on a mounted NFS or Samba share, add the switch -cache 8192. This is so you don't have audio and video syncing issues. It is also assuming you use Alsa's default output.

    That is pretty much it. If you are using PulseAudio and have it all setup, now whether you open a video with a 2.0 or 5.1 audio track, all of your speakers will work.

    If you are using Alsa and don't want to have to change any settings on your device out in the video player alternate player settings, for like up-mixing, I am sorry to say there is no way around it currently except to manually specify a unique player for the file under metadata settings and tell it to pass the sound to the device you created for upmixing.


    That is pretty much it for setting this up. To use the MPlayer that you have created in MythTV, when on a video in the media library click i on the keyboard or info on your remote. If you then select play it gives the choice of using the default or alternate player, choose alternate and away MPlayer goes. Nothing could be simpler on the note of being able to pick and choose when you want to use the benefits of XvBA.

    Now we need to setup our other players. I have found that the OpenGL renderers tend to look better and reproduce better playback. It is tear free afterall. This means other players can benefit from the tweaks as well. Lets get into those.

    Other Video Players:

    Go into the settings on these other video players like VLC, Xine, etc, and select OpenGL or OpenGL2 for rendering. That is pretty much it. You can use the Xv rendering, but I noticed with all of the settings as they are from the tweaking, the quality is much better for me including absolutely fluid and and flawless playback.

    At the End of it All

    I hope that someone finds this guide useful and is thankful for it, not taking it for granted. I spent a lot of time researching from multiple outlets, many untold hours actually, and decided to share my experience and knowledge in this arena. I didn't want to see anyone go through what I have looking everywhere for answers and loose time that could be better spent, like with family enjoying the HTPC. In doing so, I spent several days working on this guide besides.

    If you find it useful all I ask is for you to take a second and say thank you by leaving a post in this thread. I would also like for you to let the others know if you do how it is working for you, good, bad, or otherwise. This way others will get your opinions, and also you might find settings that others could find useful, maybe even me. I still haven't tried every combination.

    I hope this becomes a sticky here as well so it is easy to gain access to by other Ubuntu users and other Linux users in general so they can get the most out of their AMD HD4xxx and HD5xxx series video cards.

    Enjoy
    Sports Car Guy
    Last edited by sports.car.guy; February 2nd, 2010 at 01:00 AM. Reason: Performed an Update to the Guide.

  2. #2
    Join Date
    Jan 2010
    Beans
    188
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Ot

    I just found one issue I am trying to figure a solution out with. For some reason using XvMC when watching an ISO backup, a legal one mind you, and also a DVD from disc, there are major audio syncing issues. This appears to be a kink in the chain so to speak.

    I am looking online for a solution like passing to the internal player to use the standard Xv and then what to deinterlace with in the settings for DVD player.

    If you know a solution let me know make a post and I will edit the guide to reflect it. I will do that if and when I find it as well.

  3. #3
    Join Date
    Dec 2009
    Beans
    10

    Re: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Ot

    My goodness. I can imagine how many hours you had spent writing the good stuff above for the benefit of everyone!!

    Very quickly, i'm using Ubuntu 9.10 (64bit), Intel DP35DP, Nvidia 8600GT, Q6600 CPU. Using VLC with H264 decoding set to "all", i can play m2ts file from my Sony cam (HDR-CX520E) relatively smooth but not as good as playing directly from the cam to HDTV or with windows media player 12 in windows7 which is clear, crispy and smooth. The VLC playback is not smooth, sometimes with artifacts and very blur when i pan the camera quickly.
    According to several good forumers who tried the video i posted http://www.mediafire.com/file/jdjthekzlj5/00003.MTS , the problem lies with Ubuntu, VLC and the AVCHD codec which my current rig could not make it (procrastinating to switch to win7 now).

    At first, i was thinking to change my Nvidia 8600 to ATI 5000 series and that's why i bumped into your good thread while researching. Your posting would absolutely help me if i change to ATI card. But before that, can you please help me confirm that you could play my video file in your rig and see whether the playback is smooth or not with the optimising done. Thanks in advance.

  4. #4
    Join Date
    Jan 2010
    Beans
    188
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Ot

    Quote Originally Posted by lenkiatleong View Post
    My goodness. I can imagine how many hours you had spent writing the good stuff above for the benefit of everyone!!

    Very quickly, i'm using Ubuntu 9.10 (64bit), Intel DP35DP, Nvidia 8600GT, Q6600 CPU. Using VLC with H264 decoding set to "all", i can play m2ts file from my Sony cam (HDR-CX520E) relatively smooth but not as good as playing directly from the cam to HDTV or with windows media player 12 in windows7 which is clear, crispy and smooth. The VLC playback is not smooth, sometimes with artifacts and very blur when i pan the camera quickly.
    According to several good forumers who tried the video i posted http://www.mediafire.com/file/jdjthekzlj5/00003.MTS , the problem lies with Ubuntu, VLC and the AVCHD codec which my current rig could not make it (procrastinating to switch to win7 now).

    At first, i was thinking to change my Nvidia 8600 to ATI 5000 series and that's why i bumped into your good thread while researching. Your posting would absolutely help me if i change to ATI card. But before that, can you please help me confirm that you could play my video file in your rig and see whether the playback is smooth or not with the optimising done. Thanks in advance.

    I just checked it out using both VLC and the modified Mplayer. Under Xv rendering in VLC it tore a little, but not badly. Using OpenGL with VLC no go. Using the modified MPlayer, there were some syncing issues with both Xv and OpenGL. The syncing issues could be a couple things though with MPlayer.

    The state of the code and support for the actual MPEG data inside the container file could be why. Not all MPEG4 is fully supported through the VA-API for XvBA or the cache for MPlayer needs to be cranked up. Well checking again it looks like it is maxing the GPU, but I think that is the state of the code and supporting the MPEG4 data. If VLC can play it using the CPU and Xv, then offloading to the video card shouldn't have the issues it did.

    Sad part is even though each company licenses H264 we will say, it doesn't stop them from messing with it and causing compatibility issues when it is a standard. I am betting once the code matures hardware accelerated playback will work on my system and your clip flawless.

    Also take into account the HD4xxx and HD5xxx series are a little different. I am betting the HD5xxx would do better with it.

    I have tested it on 15 GB Blueray backups and not had one problem at all.

    This is now got me wondering on if it is the format of the H264 itself.

  5. #5
    Join Date
    Dec 2009
    Beans
    10

    Re: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Ot

    Quote Originally Posted by sports.car.guy View Post
    I just checked it out using both VLC and the modified Mplayer. Under Xv rendering in VLC it tore a little, but not badly. Using OpenGL with VLC no go. Using the modified MPlayer, there were some syncing issues with both Xv and OpenGL. The syncing issues could be a couple things though with MPlayer.

    The state of the code and support for the actual MPEG data inside the container file could be why. Not all MPEG4 is fully supported through the VA-API for XvBA or the cache for MPlayer needs to be cranked up. Well checking again it looks like it is maxing the GPU, but I think that is the state of the code and supporting the MPEG4 data. If VLC can play it using the CPU and Xv, then offloading to the video card shouldn't have the issues it did.

    Sad part is even though each company licenses H264 we will say, it doesn't stop them from messing with it and causing compatibility issues when it is a standard. I am betting once the code matures hardware accelerated playback will work on my system and your clip flawless.

    Also take into account the HD4xxx and HD5xxx series are a little different. I am betting the HD5xxx would do better with it.

    I have tested it on 15 GB Blueray backups and not had one problem at all.

    This is now got me wondering on if it is the format of the H264 itself.
    Thanks for trying out my video clip. Its quite confirm that VLC in Ubuntu/Windows did not play AVCHD as well as WMP12 in Win7. WMP12 is quite awesome. You can try it.

    Its good to know that you could run bluray backups well in Ubuntu. This is the next thing i am trying out. Still waiting for bluray drive price to come down. I reckon that you are using MPlayer. Did VLC works with your bluray? Can any media player stream Dolby TrueHD or DTS HD MA to your AV receiver? I'm looking for ATI 5000 series card to do this but i have yet to purchase any. Still researching....

    My ultimate aim is use Ubuntu as HTPC to stream video/audio via hdmi to AV receiver that supports all codecs available today. I am now half way there, i.e., using VLC to stream lower grade Dolby/DTS 5.1 via optical port. Would be good to hear your comment on how to achieve this with ATI card.

  6. #6
    Join Date
    Feb 2009
    Beans
    124

    Re: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Ot

    Hi before i say anything !thankyou! for this great thread and putting all this time for all the ubuntu'ers to benefit and i want to ask couple of questions here

    1. I have onboard ATI HD4200 graphics so does it have the HD acceleration you are talking about?

    2. I have tried the propriety drivers before and had issues with compiz and also video playback. Compiz used to crash every now and then(that maybe due to improper uninstallation of nvidia drivers)

    3. Switched to opensource Drivers no issues at all except very poor 3D performance as its in experiment mode.

    Now should i give this tut a try?

  7. #7
    Join Date
    Jan 2010
    Beans
    188
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Ot

    Quote Originally Posted by lenkiatleong View Post
    Thanks for trying out my video clip. Its quite confirm that VLC in Ubuntu/Windows did not play AVCHD as well as WMP12 in Win7. WMP12 is quite awesome. You can try it.

    Its good to know that you could run bluray backups well in Ubuntu. This is the next thing i am trying out. Still waiting for bluray drive price to come down. I reckon that you are using MPlayer. Did VLC works with your bluray? Can any media player stream Dolby TrueHD or DTS HD MA to your AV receiver? I'm looking for ATI 5000 series card to do this but i have yet to purchase any. Still researching....

    My ultimate aim is use Ubuntu as HTPC to stream video/audio via hdmi to AV receiver that supports all codecs available today. I am now half way there, i.e., using VLC to stream lower grade Dolby/DTS 5.1 via optical port. Would be good to hear your comment on how to achieve this with ATI card.
    I haven't used Windows in quite some time and I would put money that WMP12 has stolen code from Media Player Classic or MPC Home Cinema. That is what Microsoft does. It is a fact and was proven that Gates gave the order to steal the TCP/IP stack from BSD for Win2k and up. They couldn't get their in house one to work properly.

    Someone for the open source community noticed some of it's calls in memory looked familiar and proceeded to reverse engineer it to confirm before a decompile. He wanted to make sure he wasn't doing something illegal just in case it was close but no cigar. He was more then confident it was and did the decompile.

    Gates and Microsoft freaked when it came out. They got caught and had the balls to try to get this guy arrested and all this other stuff for theft when they stole the TCP/IP stack. That was when they couldn't get him to shut up about it and he was letting the world know. They never paid the BSD community for use and till this day use the TCP/IP stack they stole in Windows without giving the credit BSD licensing requires.

    If you think WMP 12 is fast, check out the original Media Player Classic or the Home Cinema Edition. It has always been feature rich, more so then WMP and with so much of a smaller footprint memory and processor wise.

  8. #8
    Join Date
    Jan 2010
    Beans
    188
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Ot

    Quote Originally Posted by n3had View Post
    Hi before i say anything !thankyou! for this great thread and putting all this time for all the ubuntu'ers to benefit and i want to ask couple of questions here
    You're welcome.

    After going through what I went through I figured this could be something of help to others out here. There are still a few things to iron quirk wise. I did an update to this system last night, and since an occasional slight tear appeared with rendering through Xv and Mac Quartz Accelerated that was not there. It isn't really noticeable unless I am looking for it, which I am now..lol.

    I am going to see what the libraries were that got updated and try a rollback. I finished this post, which I tested for a couple weeks, not one tear or hiccup before writing this post, and then I said to myself hey this system needs an update. Oh yeah, now I am trying to figure out which non X related library is the culprit.

    1. I have onboard ATI HD4200 graphics so does it have the HD acceleration you are talking about?
    The onboard HD 4200, according to what I have read online supports at least UVD 2 if not UVD 2.2. I believe the 785G is UVD 2.0, which is perfectly fine for using XvBA through the VA-API. It should be compatible with XvMC as well.

    What I am getting at is, yes it definitely should.

    2. I have tried the propriety drivers before and had issues with compiz and also video playback. Compiz used to crash every now and then(that maybe due to improper uninstallation of nvidia drivers)

    It sounds like it could be an issue like you are talking about. I have read about the on board GPU's and they are usually pretty stable. On the note of Compiz, why? It is just eye candy that truly does not add any functionality, while consuming unnecessary resources. There might be a quirk or two but people have it running the fglrx driver with composting. Look at this thread and if you install the proprietary drivers follow my suggestion with this guide and install the newest drivers from AMD's website.

    3. Switched to opensource Drivers no issues at all except very poor 3D performance as its in experiment mode.

    Now should i give this tut a try?
    I don't think you will encounter hell on earth or anything if you were to try this guide. As long as you back up your xorg.conf before you change over to AMD's proprietary drivers, so you can just switch it out if you has issues, no harm no foul. I am sure you will notice a big jump in its performance using the VA-API to XvBA interface.

    Honestly when I watched my first HD content in AVC MPEG4 after the tweaks on MPlayer with VA-API and it was absolutely flawless and visually pristine I was like a little kid on Christmas. It was a whole new experience with my HD4670 using hardware decode.

    Give it a shot. I am sure a lot of other users with the HD4200 on board GPU would be interested in knowing how it performs. Reading about some of the things people encountered on prior drivers, I would use Catalyst Control Center 12 and it's Hotfix and deal with the watermark in the bottom right corner for a couple weeks because I have read that Catalyst Control Center is supposed to be coming out around the end of this month, beginning of next.

    Good Luck

  9. #9
    Join Date
    Jan 2010
    Beans
    188
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Ot

    An Update:

    I just performed some more testing with MPlayer using the VA-API on different MPEG4 streams, ones that are not supported, like the old hacked DiVX Windows codec. They played and well actually for the most part. A few it seems had some issue and choked the GPU. It is hit or miss. So sort of supported at the moment..lol.

    One thing I did notice is the improvements going through the hardware are very visually quantifiable. I was beyond surprised. I was experimenting with Kdenlive because i needed to reinstall my MythTV server and wanted to get to watch what was on it for TV episodes. I needed to play catch up and decided to try out the hardware decoding and acceleration.

    Kdenlive uses ffmpeg for encoding, as would MythTV, MPlayer normally, Xine and it's derivatives, along with VLC I believe for decoding. Encoding video no matter what I did, there would be vertical lines, kind of like visual artifacts in it. On playback I did notice with VLC they were not as visible then the others. Well, hardware XvBA through the VA-API puts VLC to shame on image quality. The lines are even less pronounced then VLC.

    The only time they were really were at all noticeable was during very dark, almost pitch black scenes. I am really impressed with the quality.

    On another note to do with the XvBA interface. For some reason I want to say that it exposes the Mac accelerated driver to the hardware more. Even though there is no ability in MythTV to add a de-interlace profile, the picture seemed to have, at least partially, de-interlacing done on it.

    Since installing the VA-API and XvBA interface for it, I haven't really messed with the Mac accelerated driver really. I decided to last night a little. It appeared to be de-interlacing only when necessary. It was weird. Not quite fluid transitions from interlaced and de-interlaced. I figure it is because exposing the hardware capabilities, which is still under development. There is a type of de-interlacing that does just this, but I can't remember the name of it, another reason I am thinking it might be the case.

    I also tried messing with every conceivable setting and configuration I could think of to get my MythTV frontend to get along with OpenGL for at least rendering and well no luck. I spent a lot of time googling it as well.

    Any help would be appreciated by me and I am sure others using this thread to get their AMD HD 4xxx and 5xxx cards working at optimal.

    Additional Note:

    I tried to get help in the MythTV-users IRC channel with our GL rendering problems. One flat out told me to get an nVidia who I guess is a registered member of the MythTV community, a regular, and no one else cared to actually help solve the issues. They were like well that is AMD for you. Now that is not right when no where on MythTV's site does it say hey we will only like you in our community if you got nVidia, otherwise you're on your own.

    If someone on the MythTV project could get back to me on this set of OpenGL drawing issues and see what we can do to fix it, the community at large who are now looking at AMD cards from when they were exclusively in Windows land, or it came on the mother board I am sure would appreciate it. Or they could be like me an idiot with brand loyalty..lol.

    I like underdogs.. I rooted for the Patriots in the 86 Super Bowl if that gives you a clue..

    Yeah we sure did bury the Bears..lmao
    Last edited by sports.car.guy; January 21st, 2010 at 07:18 AM.

  10. #10
    Join Date
    Jan 2010
    Beans
    14

    Re: AMD HD Series Graphics Guide: Optimizing Video Playback for MythTV, Mplayer, & Ot

    Will this mess up my suspend capability (i.e., are you still able to suspend your machine)? Thanks.

Page 1 of 6 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •