7

During the last couple of months I have had major problems playing high-definition videos in Ubuntu. Generally it's 1080p videos that I have problems with, but I do recall having the same kind of problems with a 720p video a while back. This occurs on both my laptop (with an integrated Intel video chip) and my desktop (Nvidia Geforce 250GTS). It's strange, because I don't think I've had this problem in earlier versions of Ubuntu, and it works fine in Windows on the same machine(s).

The problems occur when trying to play a video that has been encoded to/with "avc1" in an mkv container. I'm not very knowledgeable when it comes to video codecs and such, but from what I've read, avc1 seems like a pretty old codec. How come I have problems with that, when Xvid works just fine?

Suggestions on how to fix this problem?

EDIT: So I've now tried all of the solutions proposed. None of them really worked, although some did lessen the choppiness. I even tried a 720p video using the same encoding, and that was also very choppy. Could someone explain to me why this just will not work, when I can play back other 1080p videos flawlessly?

6 Answers 6

4

You can boost your preformance on the machine with the Nvidia chip by enabling VDPAU, which offloads some of the video rendering to your GPU instead of the CPU.

Install the package libvdpau1 and try using Mplayer to play your video. You'll need to have recent proprietary Nvidia drivers too.

4
  • I don't have the absolute latest Nvidia drivers, as those require me to manually download and install binaries from Nvidia. But I do use the latest that's available in the Restricted Drivers dialog. I will try enabling VDPAU and see if that makes a difference. Aug 4, 2010 at 20:47
  • I installed VDPAU. Didn't make a difference. Aug 5, 2010 at 6:42
  • What software are you using to play videos? Some players need to be configured to utilize VDPAU. Aug 6, 2010 at 14:48
  • I've tried XBMC, Mplayer and VLC. Same result in all of them. Aug 6, 2010 at 19:55
3

Newer X drivers are often available from the xorg-edgers repository:

https://edge.launchpad.net/~xorg-edgers

However, be aware those are just snapshots of upstream code, and not supported by Ubuntu. They can sometimes have bugs and you might find it challenging to revert back to stock Ubuntu stuff, so only install them if you either feel very lucky, or you are skillful enough you can undo any damage they might cause.

2

When I play high-definition content (720p to 1080p) on my computer which I bought in 2006, it struggles sometimes. I use mplayer for this, and when it detects a slow rendering of the video, it hints me to use the following command to play the video:

mplayer -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all video-1080p.mkv

This is just enough for me, in the case of my desktop computer, to watch 1080p videos. I hope this might be helpful to you.

I'm not sure what all the options mean (haven't bothered to read the man page), but it seems like it's doing something right. :)

3
  • That is better, but it's still choppy. I find it odd that this particular video is so troublesome when I have no problem playing other 1080p videos - even on my underpowered laptop. Aug 5, 2010 at 9:08
  • Maybe this particular video just has a very inefficient encoding, and the data stream is very thick? Have you checked the bit rates out? Maybe the video and/or audio streams have higher bit rates than your other videos?
    – Victor
    Aug 6, 2010 at 15:12
  • Unfortunately I have since deleted the 720p video I had a problem with, so I can't do a proper comparison between an Xvid-encoded 720p video and an avc1-encoded 720p video. What I can tell you is that the 1080p avc1-encoded video that does give me trouble has a stream bitrate of roughly 7000kb/s (whatever that means). When I check it in mplayer, it says: "Bitrate: N/A". Aug 6, 2010 at 20:05
2

Try xbmc

I installed the latest nVidia drivers from the ubuntu repository along with the libvdpau1 package from a private package archive (nvidia-vdpau).

Whilst I have had no luck with playback in totem, VLC or mplayer, using xbmc works just fine and plays 720 and 1080p movies very well.

The xmbc packages I am using are in a private package archive. I used the following guide to install xbmc http://wiki.xbmc.org/?title=HOW-TO_install_XBMC_for_Linux_on_Ubuntu_with_a_minimal_installation_step-by-step

3
  • Tried it. Also choppy. About the same as running it in mplayer. Aug 6, 2010 at 9:28
  • Different codecs seem to play better or worse than others, so if this is just happening to a small sample of the videos you have, then perhaps they all have a common encoding...? Aug 6, 2010 at 11:22
  • Yes. It's the avc1 encoded ones that cause me trouble. I'm trying to understand why this particular encoding is causing me so much grief on a pretty mid range system, when it works fine in Windows on the same computer. Aug 6, 2010 at 20:14
0

I know I'm proposing just a workaround but... What about converting your video?

1
  • That's what I'm doing at the moment, but I'd really rather not - seeing as how a 1080p video at almost 8gb takes a fair bit of time and effort to convert. Mostly I'm just curious as to why I can't play back those files properly. In my past 4 years of Linux, have I just managed to avoid that encoding - as I have never had any problems with video playback before? Aug 5, 2010 at 11:27
0

You may not have any acceleration enabled in you xorg.conf based around your card.

Goto Terminal and type:

sudo service gdm stop

Login

Now type

sudo bash

(you may be asked to enter your password)

now type:

Xorg -configure

(Yes, the capital "X" is needed) Now type:

sudo mv xorg.conf.new /etc/X11/xorg.conf

and enter into GUI mode (with acceleration) by:

service gdm start

And you will have all the modules and drivers you need to have best performance with your card. Horay!

2
  • Nope. It seems pretty much the same. Aug 6, 2010 at 20:12
  • 1
    Can you tell me how to verify whether or not acceleration is already enabled? Aug 7, 2010 at 17:53

Not the answer you're looking for? Browse other questions tagged .