Howto: Enable Kodi / XBMC smoothvideo playback
[alert color=”C7645F” icon=”fa-align-right” title=”This is a legacy article“]
This is a legacy article which does not meet some of our quality standards. While it may contain useful information, is retained here for legacy reasons only.[/alert]
** 7 March 2010 – Updated for latest version of XBMC live (9.11-live-repack)**
Yes, so it took me a while to get round to it, sorry about that, beenbusy with parts of my life that don’t include computers! So basically, I’ve just edited the original article and modified for the latest version of XBMC. This now also includes how to update xbmc to latest nvidia drivers to get rid of that terribly embarrassing issue whereby they released xbmc with vdpau issues!
So, please read on to see the original article with new xbmc specifc changes added and old xbmc changes removed. If you notice any errors (I did this in a rush), please let me know and I’ll update.
** 13 March 2010 – This update seems to break some of the power management stuff, it does otherwise work so if that doesn’t worry you, please continue, but if you rely on that, please be aware that I haven’t yet fixed this problem. **
**End of updates**
So you’ve no doubt ended up here because you’re absolutely sick of trying to eliminate video jutter when watching your much loved content. While this is most obvious in panning scenes, it’s also obvious in many other motion scenes. Caused by a fairly complicated case of mismatching refresh rates between your video card and screen along with the frame drops caused by the average system trying to compensate for it, this is really quite a pain. In absolutely typical fashion, it’s the XBMC folk that have been first to fix this. No idea why others are so much less attentive to the real issues!
I posted that this was available a while back, but only got round to installing and testing it this morning. Let me tell you, I’m impressed! All the content that I tried played remarkably smooth, like I’ve not seen in an extremely long time. So if you want nice panning scenes that are smooth as butter and in the process eliminate video jutter forever, read on.
Install XBMC Live 9.11-live-repack
** If you’re going to completely wipe and reinstall an existing installation, don’t forget to export your video library and re-import it later, might save you quite a bit of bandwidth and time!
Install XBMC Live in hard disk mode (not removable disk mode
Choose your password and don’t forget it
Login and begin preparation
Once booted, press CTRL-ALT-F2 to get a console screen (Alternatively you could ssh into the box via linux or via PuTTy on Windows so you can just copy and paste out of this guide)
type $ sudo passwd root to set the root password
type $ su and your new root password
Add upgrade repositories to configuration file
Add the SVN repository (or the stable ones if you wish) from wattazoum at http://www.xbmc.org/forum/showthread.php?t=33327
Note for svn on XBMC Live 9.11-live-repack you will use Ubuntu Karmic packages.
as root:
(You have to use pico in Ubuntu (what XBMC live is based on) because they’ve screwed up their implementation of vi so bad you’ll tear your hair out trying to use it).
# pico /etc/apt/sources.list.d/xbmc.list.list
(You will probably have a few lines in there already with a # in front of them). Two of them are the same as you want to add, but you may as well just copy and paste the below over the top of the whole lot:
deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ karmic main deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/ karmic main deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main deb-src http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main deb http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu karmic main deb-src http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu karmic main Press Ctrl X, press Y, then press Enter to save your changes. Note The xbmc addons don't appear to have a ppa for karmic any longer. I think this is now included as part of the xbmc menu and is therefore no longer needed.
The 1st and 2nd entries are the standard entries that come with XBMC, the 3rd and 4th entries are to get the NVIDIA driver with the latest version of libvdpau, the 5th and 6th entries are to get the latest SVN version of xbmc.
Add repository GPA keys
Import the GPA keys (don’t copy the # when you’re pasting into your terminal window!)
*Update* – No matter what I do, wordpress converts two – – into one – so when you copy the below three lines make sure there is two dashes before recv-keys and keyserver not one 🙂
# apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 64234534
# apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 318C7509
# apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 40618B66
# apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 91E7EE5E
You get an error about no public key unless you do the following after the above:
gpg –keyserver keyserver.ubuntu.com –recv 1DABDBB4CEC06767 && gpg –export –armor 1DABDBB4CEC06767 | sudo apt-key add – && sudo aptitude update
Download list of latest repository updates
# apt-get update
Upgrade and install to the latest repository updates
#apt-get upgrade
(This now seems to only update to the latest base packages first)
create an account for the tvheadend administrator (i chose username of administrator and a password)
You get the following message: After installation Tvheadend can be accessed via HTTP on port 9981. From this machine you can point your web-browser to http://localhost:9981/
Update to latest NVIDIA Drivers
In my experience the above stuffs up your nvidia setup, so now that you have the repositories listed above, go ahead and update nvidia drivers like this:
# nvidia-installer –update -a -f
It’s actually downloading the latest stable driver (currently 190.53) direct from nvidia. Eventually, you’ll get an ‘uncompressing’ message and a whole lot of dots!
Then do:
Upgrade your current XBMC to latest svn
apt-get install xbmc-live This will install latest xbmc against latest nvidia drivers.
# reboot
You’re ready to go!
How to set the smoothvideo options in Kodi / XBMC and eliminate video Jutter forever!
- Go to Settings Menu and scroll down to Player Menu. Change Render Method to VDPAU if you have a supported NVIDIA card (trust me this is worth it, 24GB 1080p video uses only 5% CPU on a 8600GT!) Yes you read right, that’s an 8 in 8600.
- You may as well set High quality software upscaling to Enabled for SD content, but this is optional
- Click the Radio Button next to Sync playback to display.
- Go to Settings, Settings, Screen and set the vertical blank sync to Always Enabled
There are three options for syncing the playback. I suggest you find a scene you know causes jitter and try each one. You’ll be impressed with all of them, but some are more perfect than others. Personally, I’ve found the Video Clock (Resample Audio) with resample quality set to high to give the best results. To check what it’s doing with a particular setup, press the letter ‘o’ on the keyboard during playback. You’ll see information regarding skipped frames, speedups etc. For the official blurb see below:
The official Blurb:
How does it work?
Usually video is referenced to the system clock, but with a little magic a clock can be made with information from the videocard, this makes sure every frame is presented right after a vblank. Also because the clock can now be controlled, the speed can be changed a little so the fps of the video playing matches the refreshrate.
What about audio?
Audio has to stay in sync, this can either be done by resampling, skipping/duplicating packets, or adjusting the clock if it gets out of sync too far.
Resampling has the advantage that the speed of the video can be changed considerably, so 24 fps can be sped up to 25 fps to play at PAL speed.
The disadvantage of resampling is that it doesn’t work with passthrough, and there is a slight loss of audio quality.
Skipping/duplicating audiopackets has no loss of audio quality, but the speed of the video can only be changed a little to avoid doing a skip/duplication too often, most of the time it’s inaudible, but it can produce a very audible click.
Adjusting the clock has the best audioquality, but some extra video jitter can occur, also the speed of the video can’t change much, as the audio will sync the clock more often the more the speed of the video is changed.
Maintenance
To check for future updates just repeat the last three steps, ie, apt-get update, apt-get upgrade and if there was anything there reboot to be safe 🙂
Nice side effects of following this guide
- You will now have little icons at the bottom of the library view showing you what kind of content each file is (ie 1080p, SD, h264, DTS etc etc). Really nice so you know what is high def and what is not.
- Your library will work better and detect more content correctly
- Your menus will activate more quickly and seem more responsive
- You have an option in Settings/General to extract the metadata information from files
- You have a new option under Settings/Settings/Screensave to enable and set powersaving to a timeframe
- You have some nice new options under Settings/Skin Settings (Present in left hand menu bar)
Bugs and annoyances
The only bug I’ve found so far is one that causes any content with DTS audio tracks to not play the audio when downsampling to analog. This was working before upgrading XBMC so I’m sure that it can be made to work again. This may not affect those with HDMI digital out, but I don’t yet use that.
Screenshots of some of the new settings you get
<Screenshots Missing – Update>
Thanks for reading, hope it helped someone somewhere!
There’s a thread here if you’re interested in more information or have a problem.
Hi man..
What whent wrong if after final reboot insatllation logs to console and asks for login and password and nothing after that..?
What sort of graphics card do you have? Did you stick to this guide or add a few other bits and pieces?
Hi,
I have the same issue as Mark, after I followed the guide carefully, I end up with the console 🙁
I have an nVidia ION motherboard.
Best regards,
Christian
Well, I’m jealous about the NVIDIA ION 🙂 OK, what nvidia driver does you system say you’re running and what version of XBMC does your system say you have. The builds of XBMC are possibly still going through some issues at the moment as they merge all the code between platforms. Or it could be something else. A bit of info may help me.
Hi,
well it seems like is was an invalid entry in xorg.config. This driver version doesn’t like the extensions section.
/Christian
Wow, thanks for pointing that out! Hopefully it will help the next passer by. 🙂
Hello, thanks for this useful guide! I only have a problem using XBMC live and it’s that i can’t get navigation sounds when playing music or movies and i don’t have digital audio passthrough… can anyone post the asoundrc file with a working config for digital out?
Thankyou for your guide, I used it last Month shortly after you wrote it to upgrade my XBMC live install on an ION machine, everything worked great….until I updated today…
Then I went to play some (SD xvid) tv, it wont play it over 12fps I have tried about 30 different xvid sd avi’s and it is the same
Whats interesting is that it plays fine (full frames etc) when I go into the file mode and its just playing in the little box down the bottom.
HD (1080p mkv) works fine
I have played around with the “upsample” settings and the audio sync settings and cant seem to fix it (all the different things I have tried either do nothing, result in no video being displayed or reboot xbmc)
….so
any idea what might be happening?
or any idea how to downgrade to whatever was the last version I had (would have been 9.10.2 I guess)
Yes, you can downgrade. You probably want 9.04.2+svn22290-jaunty1 if you can get it. Be aware that there is lot’s going on with the code at the moment, so breakage is quite possible. But with the downgrade there should be little risk trying it out. Quick Steps:
sudo apt-get remove xbmc
cd /var/cache/apt/archives/
ls xbmc-common* (to see which was the latest version i had prior to 22290, i had 22240)
sudo dpkg -i xbmc-common_9.04.2+svn22240-jaunty1_i386.deb xbmc-skin-pm3-hd_9.04.2+svn22240-jaunty1_i386.deb xbmc-web-pm3_9.04.2+svn22240-jaunty1_i386.deb
sudo reboot
The above steps were taken from: http://blog.xbmc.org/forum/showthread.php?t=56664&page=14
You may want to browse there if you need more info.
thanks, I went through the process. the latest i had before was svn22528 … seems to work fine so I wont complain!
Cheers
Thanks for posting this. Any reason this wouldn’t work on a USB thumb drive?
I’m getting a few errors. First, the commands to add the repository GPA keys don’t seem to work. apt-get update complains about missing keys, but I found a different command that seems to take care of it.
The big problem is that while executing sudo apt-get upgrade I get the following error:
Processing triggers for initramfs-tools …
update-initramfs: Generating /boot/initrd.img-2.6.28-11-generic
touch: cannot touch `/boot/initrd.img-2.6.28-11-generic.new’: No such file or directory
/usr/sbin/mkinitramfs: 323: cannot create : Directory nonexistent
update-initramfs: failed for /boot/initrd.img-2.6.28-11-generic
dpkg: subprocess post-installation script returned error exit status 1
E: Directory ‘/var/log/apt/’ missing
E: Sub-process /usr/bin/dpkg returned an error code (2)
Any idea what would cause that?
Thanks in advance for your help.
Nevermind. I created a /boot/ directory and then everything sorted itself out.
Thanks again for posting the instructions.
Well, I guess I just learnt something new 🙂
Thanks!
Thank you so much for sharing this! i noticed a small typo in adding the GPA keys:
# apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 64234534
# apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 318C7509
# apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 40618B66
Then it worked!
Jitter gone and now XBMC will not crash after clicking on the sound icon.
Thank you. Alex
Thanks for pointing that out 🙂 I think maybe I typed it up in openoffice and it autocorrected the — to just one -. Fixed.
Thanks!
THANK YOU!
This is honestly the best help I’ve found on this subject. I think this should be in the official wiki or at minimum a sticky on the official XBMC forum!
:):):):)
Judging by the number of hits I get, I’m guessing you’re probably not alone on that one! 🙂 A bit of a blinding oversight on their part, anyways, they make great software which I’m extremely grateful to have, I don’t mind writing a bit of a doc every now and then. I see the latest update includes options for the new vdpau spec already around vdpau hardware upscaling. And they’ve added vdpau colour lab correction or something. These guys never sleep!
@Spencer: Where did you create the /boot/ directory? and was this all you did different to get the guide working on a USB stick?
Perfect.
There is no other word for it. For the past 3 days I have been screwing around with different installs (windows xp + xbmc, ubuntu desktop + xbmc, xbmclive, boxee etc…) and this howto helped me get a minimum system just as I wanted. Only thing I would note is I used the following lines for each apt-key retrieval:
sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 64234534
as the ones you posted didn’t work for me. Now I have a more recent build and it does fantastic work with both Aeon and Transparency! … Just a patter of figuring out which of those two skins I prefer. Well anyway, thanks again for making this such a easy process (once I found the page that is :-p).
Ron
Thanks! 🙂
This didnt work for me, 1080p is still not smooth, it runs with 17-20 fps … 720p is not a problem.
I have the zotac ion dual core 330, having problems with 1080p from the beginning.
tried almost everything, ended at your site and hopefully re-installed xbmclive and updated to latest version r23946.
this is making me angry and sad, i just want to watch 1080p, why is this so a great problem ? is it a driver issue from nvidia maybe ?
Well, iam back on one older relase of xbmc 9.0.4.1 r 20654. The 1080p movies are watchable, not 100% smooth, but a framelost occurs not that often that is hurts too much and i have almost 24fps …. not perfect but ill wait for other solutions, maybe in the next major release 9.10 from xbmc. thanks for sharing your experience with xbmc.
Oh no! This is the first case I’ve heard I think, plus I kinda want an ION! 🙂 I presume you have tuned on VDPAU so I guess the question is what codec is in the 1080p content you have using? I don’t think VDPAU accelerates the VC-1 codec so that could be the problem. Try pressing the O letter on your keyboard and it should say whether the NVIDIA card is decoding it, or the CPU. And let me know if you fix it cause I want an ION 😉
I just wanted to say thanks for the great tutorial and the follow-up fix.
I had gotten my xbmc Live install all upgraded as per your tutorial, but was still having issues with VPDAU and 1080P playback. It appeared that VPDAU wasn’t even working, as cpu was about 50-70% on both my cores, and I was dropping frames like crazy.
But the fix you posted yesterday about downgrading worked perfectly for me, and now everything runs smooth.
Thanks much!
Yeah, I thought that might help someone, plus it gives a way of fixing future issues. Thanks for the compliment.
Good tutor… thanks
Great tutorial. And thanks for keeping it updated.
Tried following the downgrade instruction but the URL doesn’t appear valid anymore. Get a 404 error. Could the latest Chamelot release broken the URL path?
Yeah, I think there are only a certain amount of days that the files are kept there for. I think between 30 and 60 so as time goes on it will drop off the end. But you can easily choose any set from: https://launchpad.net/~team-xbmc-svn/+archive/ppa/+builds?build_state=built and use those. It might be worth trying the latest builds again now anyway since XBMC is now in beta for the new version. I haven’t had time to try the latest yet, but if you have, I would be grateful if you could let me know if it’s still broken so I can save time 🙂
Thanks for the guide, but are there similar instructions for getting smooth playback for XBMC on Windows? I’m having a stuttering issue with an Atom/ION combo board in Win7 using XBMC, but the movies play just fine on the same machine with a regular media player (e.g. MPC)
Hmmmm. What version of XBMC are you running? I presume you’re not running SVN? Therefore, I presume this is not just panning scene jutter rather a general performance related jutter? Originally I thought that the windows version of XBMC also benefited from the VDPAU/CUDA as it runs well on my windows machine, however one of the developers assured me this is not the case and I then realised there was no option for this in the display driver selection within xbmc. My expectation is that considering there is no hardware acceleration it would be one of the following: 1 Performance of your machine (though not likely since you say other media players are OK), 2 selection of display driver within XBMC (try changing it, it’s easy), 3 something funny with the version of the NVIDIA driver you’re running (try changing this too) or 4 the actual version of XBMC if you’re running SVN. The SVN builds can be a bit hit and miss at times. Also, you could try using an SVN version if you are not currently running SVN. There’s at least one page that provides a big history of SVN for windows in zip files that you can use.
Hopefully something there helps 🙂
I believe this is the answer to your question:
Windows XBMC doesn’t take advantage of VDPAU. You can however edit XBMC to launch MPC-HC (Media Player Classic – Home Cinema)MPC-HC will utilize the GPU acceleration from the ION platform.
See this thread for more information: http://www.avsforum.com/avs-vb/showthread.php?t=1185529
oops…that was meant as a reply to Pedram.
I tried both the 9.04 stable and 9.11 alpha.
It’s general playback stutter throughout the movie. At first I thought it was the specific video file and that it was encoded with 5.1 profile, but the fact that it plays fine through MPC, and that I tried another movie and it stuttered less, and I tried yet another movie and it didn’t stutter at all, and all were encoded using 5.1 profile, makes me think it’s not just an issue with 5.1 profile encodes.
I tried all the different settings for render (Auto-detect, software, advanced shaders, basic shaders) and none helped. I even tried the feature to auto adjust refresh rate, but that didn’t help either (presumably because it’s not a refresh issue since lots fames are being dropped).
The confusing thing is that if I press “o” to see the stats output, the CPU usage is only about 50-60%, but the frame rate is about 16-17fps.
I would try a different display driver, but I’m already using the latest chipset from the manufacturer (Zotac).
Something tells me I might have to wait until video hardware acceleration is properly built into XBMC, or I might have to try the Linux version :-(. Not that Linux is that bad, but I’ve already gone through the hassle of trying to get XBMC working, I don’t want the added potential hassle of getting a new OS working.
Thanks for the tip. I had also considered that, but I presume it will exit XBMC to launch the external player (or at least switch the focus), so I’d fall back on that if I absolutely can’t get the movies to play smoothly within XBMC since having to switch into another external program ruins the experience a bit :-).
Hmmm, strange. Is this a media center pc only? If so, don’t fret about linux, just pop in the live disk and you’ll have the whole thing installed in under 10 minutes. On the windows front there’s another angle. I believe that XBMC on windows includes all the codecs as part of the package though I’m not entirely sure so would pay to check. Maybe you’re using a completely different video decoder and perhaps that video decoder is accellerated? What format file are you actually playing? That may help. Also pop in the xbmc live cd and run xbmc off that (without formatting any hard drive etc) and see if it runs ok in that. Then you’ll both see how easy the linux is and test if it’s going to work at the same time.
I think I may try the Live CD to see how that works out.
My reservations about Linux are that the machine is mainly a HTPC, but I also use it for other things like downloading (using various clients/protocols) and I have a network share set up on it and also remote desktop into it from my other Windows machine, and so I’m not sure how to set that all up as easily with Linux as I would with Windows.
I also tried overclocking the Atom N330 chip from 1.6GHz to 2 GHz and that helped a lot. Still some dropped frames, but not as bad as before :-).
Thanks for the helpful comments.
Oh, and in answer to your questions I think the other media player (MPC) and/or codec (ffdshow installed with k-lite) probably uses hardware acceleration so that’s why it plays fine.
And the file type is a MKV file encoded in h.264 format at 720p resolution. I didn’t dare try a 1080p file 🙂
Aha! I don’t think I recall you saying it was an atom. These machines as far as I know are supposed to play video with video hardware acceleration only! Well, at least any h264 codec takes quite a bit of CPU. Considering XBMC doesn’t support video acceleration under windows and an atom is quite a low spec cpu in terms of grunt you’re really only left with 2 or 3 options. Use something other than XBMC in Windows, wait until XBMC supports hardware acceleration under windows or switch to linux version of XBMC. I’ve also read the media portal might support CUDA somehow so you might want to take a look at that.
You can set the linux version to do some of those other things, but it’s not entirely possible with the live version since it doesn’t have a full desktop manager. In fact this is why the live system on linux is so good as a media centre (it doesn’t load anything it doesn’t need, minimising use of system resources). My advise would be to minismise your htpc and point it back at another machine, rather than the reverse.
Hi marshalleq,
Brilliant guide. Still in the process of doing it, but looking forward to reporting how I get on.
One thing…how do you know which dependencies are required?
Thanks,
Gareth
Thanks, um, dependencies for what exactly? In any case it’s probably actually better at the moment to go to xbmc.org and download the lastest alpha of XBMC. I’m running it and its quite stable. No major issues that I’ve found and it will include all the updates in this guide.
Thanks, what did you expect the url to be? Shorter?
Since I overclocked the CPU it’s not as much of a problem (only on some movies), but I think I’ll wait and hope that the Windows version will support hardware acceleration soon. If not I’ll try out the Linux version. Thanks for the help.
I’m frequently searching for new informations in the WWW about this issue. Thx!
Great idea, thanks for this tip!
Can’t you wrap the code portion in a code tag so that wordpress doesn’t convert the two hypen into a single em dash?
It’ll make it easier for people to copy and paste your code.
Thanks
Hello,
Finally I see someone aware of the “video jutter” problem.
As I already installed Ubuntu 9.10 + XBMC Camelot (latest version). The “video jutter” still here in the new XBMC version. May I know how to follow your guide. As I am too new to linux. THX
Oh dear, I’ve been on holiday and I was hoping they’d fixed that. Unbelievable, I’d say the chances of that being fixed in the download are slim. Looks like there’s a reason to look at svn again 🙁 I haven’t got the latest installed yet, can you log a bug with them in case we’re early enough to get it fixed in the public version?
I followed your guide successfully with no errors. However now my suspend and shutdown is completely broken. If I do a shutdown or suspend from Confluence Gui, the screen just blinks black for second. I am running a Acer Revo 3610 and the xbmc live 9.11 repack. Prior to these directions shutdown and reboot worked fine. I even added the “echo USB0 > /proc/acpi/wakeup” to my rc.local file. And was able to suspend and wake from my MCE remote. But now it just doesn’t work either from the gui nor the remote. Another thing I noticed that the reboot no longer reboots my revo, it just relaunches XBMC. And exit no longer functions properly. Exit used to take me X and give me a login prompt. Now it’s just a black screen witha cursor. It’s sad because I feel that there is an increase in performance, but all these other issues are a dealbreaker. Any help would be appreciated.
Hmmm, I can confirm this is happening to mine, but only since I checked after your comment as I just use the power button on the front which nicely shuts it down. I guess that’s why they call it svn. The real question is which part of the update is causing this, ie kernel, xbmc etc. I’ll have a look into it, thanks for letting me know!
can confirm… any solutions yet?
Try this to allow you to post two minus signs.
Erm..the “Upgrade and install to the latest repository updates” section talk about tvheadend but seems to be missing some instructions. copy/paste error?
ps. Most importantly: Thanks for the guide, worked a treat 🙂
i am getting errors when i try to put in the GPA keys, particularly the second and third ones. the first and last ones seem to be working. also the long command string that follows doesn’t work for me so i can’t progress beyond that point.
i am a complete linux n00b – installed live yesterday and that’s the first time i’ve ever tried to use it so please be gentle.
Did you post a single dash or a double one? I remember wordpress automatically changed them to something so try doing two instead of one.
hey thanks for your reply. yeah i definitely used double dashes, i just pressed up on my keyboard and replaced the string of numbers at the end so the rest of the command was exactly the same for each one…
I’d suggest switching the repository stuff over to the “add-apt-repository” command. Adds the repo and gpg key stuff all in one shot.
I’m also getting the same error when trying to add the keys 🙁 can you check this is still a valid install?
hi every person,
I identified marshalleq.wordpress.com after previous months and I’m very excited much to commence participating. I are basically lurking for the last month but figured I would be joining and sign up.
I am from Spain so please forgave my speaking english[url=http://splatestnews.info/].[/url][url=http://sesmartthoughts.info/].[/url][url=http://lalatesttrends.info/forum].[/url]