VLC exhibits blockiness on h264 seeking

Bug #1512993 reported by Saverio Miroddi
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
vlc (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

When I seek h264 movies, block artifacts will show, up to the next (I believe) I-frame. This was not happening on 14.04.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: vlc 2.2.1-3
ProcVersionSignature: Ubuntu 4.2.0-16.19-generic 4.2.3
Uname: Linux 4.2.0-16-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl nvidia
ApportVersion: 2.19.1-0ubuntu4
Architecture: amd64
CurrentDesktop: XFCE
Date: Wed Nov 4 09:58:59 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-10-30 (4 days ago)
InstallationMedia: Xubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: vlc
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Saverio Miroddi (64kramsystem) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vlc (Ubuntu):
status: New → Confirmed
Revision history for this message
Behrang (behrangsa) wrote :

For me, under 15.10, with Intel Skylake Core i7 6700 and the Intel Graphics suite installed, the video plays back completely black. I can't see anything at all.

Kernel: 4.2.0-27-generic #32-Ubuntu SMP Fri Jan 22 04:49:08 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Desktop: Unity
VLC: 2.2.1

Revision history for this message
Simos Xenitellis  (simosx) wrote :

It looks like an issue specific to this class of videos.
Whether a video file is .avi or .mp4, it can have the audio/video compressed in different ways.
Since the test video is 190MB, you can post the video details. Install _ffmpeg_ and run _ffmpeg -i myvideo.avi_.

Here is the output:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Day 2-2016-01-27 20.31 Core Spring Training.mp4':
  Metadata:
    major_brand : mp42
    minor_version : 0
    compatible_brands: mp42isomavc1
    creation_time : 2016-01-27 17:44:23
  Duration: 02:08:51.78, start: 0.000000, bitrate: 206 kb/s
    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 64 kb/s (default)
    Metadata:
      handler_name : AAC stream handler
    Stream #0:1(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 141 kb/s, 5 fps, 5 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      handler_name : Citrix h264 stream handler
      encoder : AVC Coding

Here it says that the audio is compressed with AAC (VLC is fine with that) and the video is compressed with h.264 (by an encoder created by Citrix).

VLC (VLC media player 2.2.1 Terry Pratchett (Weatherwax) (revision 2.2.1-0-ga425c42)) did not work either for me; the audio was fine but no video.

I was able to play the video with mplayer2 (command line player, MPlayer2 2.0-728-g2c378c7-4build1 (C) 2000-2012 MPlayer Team) and ffplay (command line player, ffplay version 2.7.6-0ubuntu0.15.10.1 Copyright (c) 2003-2016 the FFmpeg developers). Both audio and video worked.

In addition, I managed to play the video in Totem (Ubuntu 15.10). Totem is based on gstreamer, so gstreamer is also fine.

Therefore, the problem is likely to be with VLC and not the graphic drivers.
If you disable _Accelerated video output_ in VLC, the video still does not play (audio is fine, but no output; just black).

Revision history for this message
Simos Xenitellis  (simosx) wrote :

Summary: the default video player in Ubuntu is Videos (the app "totem") and it can play this video just fine.

Still, it would be great if the problem in VLC gets fixed. VLC uses its own audio/video decoding software.
Videos (Totem) uses "gstreamer" and it works. Mplayer2 and ffplay use something based on ffmpeg and they work as well.

Changed in vlc (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Saverio Miroddi (64kramsystem) wrote :

I can reproduce it also on on 16.04 beta 1.

Revision history for this message
Brandon Snider (brandonsnider) wrote :

Does the problem still occur if you switch the video output module to XCB - Xvideo?

Revision history for this message
Saverio Miroddi (64kramsystem) wrote :

"Xvideo - XCB" doesn't even play, on my setup:

[00007fecd4002058] core video output error: video output creation failed
[00007fecc8f2dba8] core decoder error: failed to create video output

Revision history for this message
Brandon Snider (brandonsnider) wrote :

Do any of the other modules work? You could run vlc at the cli with -vvv and redirect to a file, which you could attach. For example: $vlc -vvv >> vlc_output

Revision history for this message
Brandon Snider (brandonsnider) wrote :

BTW, in Input/Codecs, please switch Hardware-accelerated decoding to "disable". This will change the decoder to FFMPEG-MT.

Revision history for this message
Saverio Miroddi (64kramsystem) wrote :

Gotcha! The problem is in the input. Once I disable the HW-accelerated decoding, I don't get any more blockiness.

Revision history for this message
Brandon Snider (brandonsnider) wrote :

can everyone having this problem please try playing the offending videos with:

$mpv --hwdec=vdpau --vo=vdpau

and

$mpv --hwdec=vdpau --vo=gl

You may have to install mpv. Also, verify that you have a package called libvdpau-va-gl1 installed. Report the results. Thanks.

Revision history for this message
Saverio Miroddi (64kramsystem) wrote :

Both:

$mpv --hwdec=vdpau --vo=vdpau
$mpv --hwdec=vdpau --vo=gl

yield blocky playback [on seeking], independently of libvdpau-va-gl being installed or not.

Executing mpv without the parameters above yields artifacts-free playback.

Revision history for this message
Saverio Miroddi (64kramsystem) wrote :

In reference to comment #13, note that I'm running from the daily build of 16.04.

Revision history for this message
Rémi Denis-Courmont (rdenis) wrote :

VLC 2.2.2 exhibits a known bug with VDPAU-VA-GL. Update to VLC 2.2.3 (or Debian's 2.2.2-5) if you use the later.

That being noted, if your problem exists with MPV, then that is some other bug. Something is wrong either in VAAPI hardware drivers, or in VDPAU-VA-GL. Please reassign.

Revision history for this message
Brandon Snider (brandonsnider) wrote :

Mary, could you please run this command, and post the results:
$ dpkg -s libvdpau-va-gl1 | grep Version

Revision history for this message
Saverio Miroddi (64kramsystem) wrote :

The libvdpau-va-gl1 version is 0.3.6-1.

Revision history for this message
Brandon Snider (brandonsnider) wrote :

Mary, can you run this command (requires mesa-utils to be installed)
$ glxinfo|grep "OpenGL renderer string"

Revision history for this message
Saverio Miroddi (64kramsystem) wrote :

There you go!:

    OpenGL renderer string: GeForce GTX 960/PCIe/SSE2

Revision history for this message
Brandon Snider (brandonsnider) wrote :

I think this is a regression in the Nvidia Vdpau driver between 352 and 361, or possibly 346 and 352. It's not a VLC problem because it also affects MPV.

The issue described in comments 3 and 4 is different, and is fixed in VLC 2.2.2-5, which will be synced to Ubuntu from Debian at some point. That issue is specific to Intel users.

Mary, can you check nvidia-settings to verify that you're on the 361.28 Nvidia driver? If not, you could try upgrading to it as the regression may have been fixed.

A workaround for both bugs is to use FFMPEG-MT and XCB instead of any GPU acceleration.

The Vdpau driver for Nvidia users is installed by the nvidia-xxx package, where xxx is the driver number. This bug should be changed from VLC to that package. Additionally, it is not confirmed, as it only, as far as we know, affects Mary.

Mary, there is a procedure Nvidia uses to report Linux bugs. They want you to do some things to gather information and test, and those are listed here: https://devtalk.nvidia.com/default/topic/523241/linux/if-you-have-a-problem-with-vdpau-and-or-mplayer-vdpau-please-read-this-first/

To actually report the bug, the instructions are here: https://devtalk.nvidia.com/default/topic/522835/linux/if-you-have-a-problem-please-read-this-first/

Revision history for this message
Saverio Miroddi (64kramsystem) wrote :

Thanks for the information!

Revision history for this message
Alex (axfelix) wrote :

I can duplicate this on Nvidia 364.15, also thought it was due to differences in VLC between 14.04 and 16.04, but perhaps not. However, mpv with vdpau works fine for me, no blockiness.

Revision history for this message
Alex (axfelix) wrote :

3.0 daily builds from the PPA do not have this problem (though they don't export menus properly in Unity), so I think it's safe to assume the version in Ubuntu sources is the issue.

Revision history for this message
Brandon Snider (brandonsnider) wrote :

Alex, if you play an h.264 video file using "mpv --hwdec=vdpau --vo=vdpau" it has no blockiness, and if you play the same file with VLC using vdpau as the hardware-accelerated decoder and the video output module, it has the same issue? If so, try playing the file with the output module set to xcb-xvideo and the decoder set to "disable". Does the playback work perfectly?

Revision history for this message
Alex (axfelix) wrote :

That's correct. VLC's vaapi and vdpau decoding seem broken in 16.04 but work fine in pure software mode. mpv's vdpau works without issue.

Revision history for this message
Stuart Gillies (gillies) wrote :

I had exactly this problem with blocky playback after I upgraded from 14.04 to 16.04. It affected all movie file types and any player that I tried. After reading this report I replaced the nvideo driver 361.42 by the previous version available (340.96) - and the problem went away completely.

By the way (and I don't know how to report this so if some kind soul could do the necessary that would be good): Additional Drivers in Software and Updates, when invoked, states that No additional Drivers are in use. This is clearly false much of the time, as when it has done a search it then reports those that are in use. It should say: I don't yet know if any additional drivers are in use - please wait while I check. Not a life-threatening bug I agree, but careless coding makes it look silly.

Revision history for this message
Sebastian Ramacher (s-ramacher) wrote :

Let's close this. Both bugs intermingled in this bug (nvidia driver bug and vlc bug before 2.2.3) were fixed.

Changed in vlc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.