21

After upgrading from Ubuntu 14.04 to 16.04 I immediately noticed an issue whereby VLC now shows terrible video when you skip around, which only appears to fix itself after a few seconds, which I am guessing when it next meets a keyframe. This can be shown in the screenshot below:

enter image description here

I have tried the following to resolve the issue:

  • Using VLC's stable ppa to get a later verison of VLC (VLC media player 2.2.4 Weatherwax)
  • Changing from nvidia driver 361.42 to 340.96 (which didn't work so I switched back, I made sure to reboot each time). I also tried the X.Org X server - Nouveau driver.
  • Trying various outputs from Automatic to X11 Video Output XCB, and OpenGL GLX video output (XCB).
  • Changing the Hardware-accelerated decoding from Automatic to Disable (under the Input/Codecs tab)
  • Disabling all but my primary monitor.

I notice that if I pause the video, skip to any location, wait a second or two, and then play, the video will be fine. I just need VLC to wait until it is ready instead of trying to plow on immediately with the audio and trying to get the video to sync up.

Other media players like mpv media player just work in this regard, but I noticed mpv media player doesn't allow me to skip to the next video for some reason which is why I'm going back to trying to fix VLC.

Update June 4th 2016

I just installed Xubuntu on my netbook and VLC works on there perfectly well. I tried both VLC 2.2.2 and 2.2.4 from the PPA. This issue looks like its Ubuntu Desktop specific or to do with the fact that my desktop monitor runs through an Nvidia GPU (but have tested using nouveau drivers).

Another thing I noticed is that streaming media from a remote host on the same network using an NFS share makes the problem far more noticeable.

Update 8th June 2016

I have uploaded a youtube video trying to demonstrate the change in behaviour where the audio never stops playing as you skip around, but the video will be "paused" and then kick in as pixelated before eventually sorting itself out. Normally both the audio and video would kick in together once the player is ready and there would be no video pixelation as shown here in this video of Xubuntu 16.04 using VLC.

Update 9th June 2016

It appears that videos I record using Kazam screen caster are not affected which led me to believe it was some proprietary codec or something. I revisited the decoding menu and found that only this option worked on a local file (I still had pixelation issues on the same video when it was loaded from an NFS folder but maybe that is yet another different issue?).

enter image description here

I am guessing that the DRM option is the important point here as VA-API via X11 did not work (and neither did "disable" or any of the others). I would now be keen to figure out what I need to do when I'm loading the vidoes from an NFS. Increasing the stream output muxer caching didn't fix it.

Final Update - It's an Nvidia Issue (9th June 2016)

This is definitely an Nvidia graphics card related issue (haven't tested AMD). After noticing that VA-API with DRM didn't work on my work computer (which is also running Ubuntu 16.04 with an Nvidia Graphics card), when I got home I tried installing xubuntu to test that theory. That didn't do the trick. After that I unplugged my Nvidia graphics card and am now using the integrated intel graphics (on i5-4670K) which is working brilliantly on "automatic" and even on files loaded from the NFS.

Normally I would post this as the answer, but I don't think many others would be happy with it. I hope that maybe someone will have a solution whereby I can plug in my graphics card again, but I think the reality is we need to wait for an update to the kernel and/or better proprietary drivers from Nvidia. What amazes me is that having the card in and using the opensource nouveau drivers, or switching off hardware acceleration doesn't work.

Programster
  • 5,871
  • I actually have the same probelm, would love to see if anyone knows of a fix :-) – Jonas Czech May 29 '16 at 18:10
  • @JonasCz on the computer which you have the issue, does it use an nvidia display adapter? – Programster Jun 04 '16 at 03:41
  • No, various computers, with Intel and Radeon graphics cards. I'm using Ubuntu Mate. Perhaps it's because I stream most of my media over slow wifi. – Jonas Czech Jun 04 '16 at 06:30
  • @JonasCz can you read my latest update and tell me if you are able to see the issue with that Gravity sample video or not. – Programster Jun 04 '16 at 13:47
  • I'll try it this evening when I get home. Most of my media is encoded with mpeg-2, I'll see if I can reproduce with other formats too. I kind of thought there was a setting in VLC to toggle "fast seeking" or something like that, which I believe changes this behaviour, however I can't find it. Worth noting that this happens for me not only under 16.04, but under older Mint and ubuntu also. – Jonas Czech Jun 04 '16 at 14:01
  • nvm, I got the same issue on the first computer using the same video. – Programster Jun 04 '16 at 19:43
  • @JonasCz I find it interesting that this issue affects both ubuntu desktop and ubuntu mate but not xubuntu, which makes me think it might be related to compiz. Are you running mate with compiz for handling your windows? Refer here: https://ubuntu-mate.community/t/solved-image-tearing-image-error-in-vlc/1658 – Programster Jun 08 '16 at 15:34
  • Yes, I'm using Compiz on all my computers, although it's version 0.8.8, from the pre-gnome 3 days, a few years old now (it's got better performance and supports emerald window decorator). I don't think it's got anything to do with compiz though, I'm more thinking it's either a change in VLC (new version), or a bug, or maybe an obscure setting in VLC. Maybe time for a bug report ? For me, it's also not that much of an issue. But I'll start a bounty on this question, maybe someone else has other ideas. – Jonas Czech Jun 08 '16 at 18:07
  • Oh, I see you're just added a bounty - we'll see if anyone else has any other ideas. – Jonas Czech Jun 08 '16 at 18:12
  • @JonasCz fingers crossed! – Programster Jun 08 '16 at 18:13
  • Does your netbook have an SSD? Could this have something to do with thedata seek times on a spinning-platter hard drive? – Nick Weinberg Jun 08 '16 at 18:41
  • @NickWeinberg all my computers are running SSDs. I have tested all with local files and running off the NFS. NFS makes the issue easier to trigger but it only affects ubuntu desktop and not the netbook running xubuntu. There is a blatently difference in the behaviour though. On Ubuntu desktop, the audio will keep playing immediatley after you skip around and the video will eventually kick in and start out pixelated. On xubuntu though, the audio and video are "paused" for a while whilst it "thinks" and will then kick in perfectly together as is expected. – Programster Jun 08 '16 at 20:35
  • I have linked a youtube video in the latest update of the post, showing the behaviour I am talking about – Programster Jun 08 '16 at 20:46
  • To be clear, is the video playback behavior different on your different computers when playing the exact same video file, copied to the computer's local hard drive? (my apologies if you've already answered this and I overlooked it) – Nick Weinberg Jun 08 '16 at 22:20
  • I have experienced very similar artifacting in VLC, but I have noticed it in Windows 10 when watching back gameplay footage at 2x or higher speeds, sometimes even at 1.5x speed. It seems to yield similar results in Ubuntu on a different computer. If this is from local video files, I'd look at what codec it's using, which can be found using avprobe as explained here, and possibly try out some different containers/codecs and see if those make a difference. – Stephen Kendall Jun 08 '16 at 22:29
  • @NickWeinberg I have tested on 2 towers running Ubuntu desktop that both had the same issue, and an xubuntu netbook and that xubuntu virtualbox instance in the youtube video, both of which didnt have the issue. I tested all with both using the NFS and local files. This appears to be ubuntu desktop specific. I am not playing at 2.x or higher speeds. Yes, I have tested with the same file but this seems to be the case across all video files. – Programster Jun 09 '16 at 05:40
  • @NickWeinberg are you using Ubuntu desktop and unable to reproduce the issue? I've not managed to install ubuntu desktop 16.04 once and have this work. Please note that this is fine in ubuntu 14.04 – Programster Jun 09 '16 at 05:41
  • @NickWeinberg - just posted an interesting update. Maybe two different issues? – Programster Jun 09 '16 at 06:13

6 Answers6

8

I had the same annoying issue on KDE Neon (ubuntu 16.04) with nvidia graphics (GTX 1050). I am using the nvidia drivers 375.82. To resolve this issue I had to change two vlc settings:

  1. Video Settings --> Output --> X11 video output (XCB)
  2. Codecs --> Hardware accelerated decoding --> VA-API video decoder via DRM

The second setting is needed to skip through some proprietary files likewmv. As far as I have tested, vlc is now working as before without the nvidia graphics card.

jdz
  • 81
  • This was already suggested in these two answers: https://askubuntu.com/questions/778933/vlc-pixelated-video-when-skipping/819588#819588 and https://askubuntu.com/questions/778933/vlc-pixelated-video-when-skipping/849498#849498 – karel Sep 03 '17 at 10:49
  • 1
    This worked for me on nvidia drivers 384. – Lucas Penney Nov 07 '17 at 04:36
  • WARNING: my computer crashed when following through with this advice. Be careful... – Lost Crotchet Apr 11 '20 at 11:07
6

Update 19th October 2016

I noticed that my Nvidia module was recompiled during an update today, so I rebooted and tested this again. It looks like the issue has now been fixed. For reference, I am running the driver version 367.57 on an Nvidia GTX 970.


Original Answer

TL;DR

sudo apt-get purge nvidia-* -y
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update && sudo apt-get dist-upgrade -y

The critical point here is that installing the drivers PPA results in the libcuda1-361 libxnvctrl0 packages being upgraded which resolves the issue. I also found that I had issues with lots of the nvidia drivers so the safest thing to do is go back to the opensource driver. I have had some success with the nvidia-340 driver though.

Full Description

Ok somehow I managed to resolve the situation by accident

Firstly I installed the drivers ppa:

sudo add-apt-repository ppa:graphics-drivers/ppa

Then I purged the existing nvida drivers

sudo apt-get purge nvidia-*

enter image description here

Then I installed the 364 drivers.

sudo apt-get update
sudo apt-get install nvidia-364 -y

After rebooting, I was unable to log into Ubuntu desktop but could log into Xubuntu desktop from previous testing. This would work long enough for me to see that the video playback worked perfectly, but within a few minutes my computer would lock up and would require hard rebooting. After doing this a few times I purged the nvidia drivers again:

sudo apt-get purge nvidia-*

I no longer have the nvidia binary drivers installed and am on the Nouveau driver but the video playback is working and my computer doesn't lock up!

Programster
  • 5,871
  • Any way to get nvidia binaries working with video? I want them for 3D graphics. I only got nvidia cos their binaries benched better than AMD for gaming (and video) damnit! xD Now they're screwed up? Nooooooo – pd12 Aug 27 '16 at 11:45
  • For me the key was switching back to Nouveau after the all the purges and updates. Thanks man! – VM4 Apr 08 '17 at 19:01
4

I was able to get mine working with nvidia-367 and nvidia-370 drivers by selecting the VLC Settings > Video > Output as "X11 video output (XCB)" instead of "VDPAU output" which had the lag when skipping. All the (XCB) options worked for me with nvidia-367 including "X11 video output (XCB)" -(didn't work on nvidia-370) and "OpenGL GLX video output (XCB)" -(OpenGL GLX worked after reboot after upgrading to nvidia-370).

List of Video Outputs I have

Basically all the XCB options worked well (skipping, speeds), Color ASCII art worked as normal, the OpenGL (non GLX/XCB) ones aligned to the bottom left but skipped well. ASCII art (black and white) worked OK but couldn't be resized. The others didn't display stuff to screen.

Will think about updating to nvidia-370 as it just came out recently.

pd12
  • 1,379
  • upgrading to 367.44 now to test. If you don't hear back from me, it's because it has made my system unstable. I had that with a few of the drivers on ubuntu 16.04 previously. – Programster Sep 01 '16 at 18:37
  • well upgrading to 367.44 and setting video output to OpenGL hasn't resolved the issue for me on the Geforce GTX 970, but at least it's a later driver and system seems stable. – Programster Sep 01 '16 at 18:46
0

Have the same problem with VLC in Unity 14.04, it started very recently, probably caused by regular apt upgrades, but I didn't pinpoint it. Choppy playback in VLC, vertical sync issues, video hangs for a few seconds while skipping ahead. I have an Nvidia card in my Dell laptop. I checked other options like the HDMI cable (using an external monitor), but eventually narrowed it down to VLC.

My (lazy) solution is switching to built in Totem player called "Videos" in Unity. It seems to have all the codecs and the basic features. No problems right now. I'll deal with this later or wait for updates.

R0bb3d
  • 1
0

Had the same issue on Lenovo notebook with discrete nvidia video card and Ubuntu 16.04. Solved by choosing integrated Intel HD in nvidia-settings tool. So the solution (if you have nvidia drivers installed) is to run nvidia-settings and choose integrated Intel HD video card

0

I have had the same problem on a Debian Jessie, Nvidia 950 GC with backports Nvidia drivers, and VLC 2.2.4. The update to 367.44-3 version of the nvidia drivers switched the problem.

The solution I found : switching material decoding to "VA-API via DRM". It now works fine.

Hope this can help someone.

  • Hmm. I'm not sure this answer belongs here since it may not work on Ubuntu, but please expand it with details of how to do what you suggest - where would I apply this setting? – Zanna Nov 15 '16 at 14:18