Video playback shows fault lines where it looks like parts of two frames are being spliced together (edit: called "tearing")

3

1

I'm using Gentoo Linux with 3.8.13 x86 kernel at home and 3.10.4 x86_64 kernel at work.

When I'm watching 720p or 1080p HD .mkv containing a H264 MPEG-4 video in full screen mode (VLC, mplayer) I'm frequently seeing strange lines, that are little bit annoying. They appear as I guess on key frames.

Here's a screenshot. Because it's impossible to describe the issue. Take a look at Obi-Wan's forehead: enter image description here

I already tried to enable deinterlacing with Yadif and Yadif 2x as suggested on various forums around the Internet, but it didn't help.

I'm using CONFIG_HZ_1000=y in my kernel config, and I tried with CONFIG_HZ_100=y, it doesn't seem to make any difference.

Any help greatly appreciated!

UPD1: GPU acceleration cannot be enabled or disabled: enter image description here

UPD2: No luck with VSync enabled:

xrandr -q --verbose | grep 1280x800
LVDS connected 1280x800+0+0 (0x1e1) normal (normal left inverted right x axis y axis) 331mm x 207mm
  1280x800 (0x54)   71.0MHz -HSync -VSync +preferred
  1280x800_60.00 (0x1e1)   83.5MHz -HSync +VSync *current

UPD3: After enabling VSync, I changed video output in VLC to OpenGL GLX (XCB).

Now everything works flawlessly!

Thanks a lot to everybody who helped, and I hope this will help anyone facing the same problem!

user157378

Posted 2013-08-03T21:28:38.960

Reputation:

>

  • It seems unlikely that those are keyframes. They should be anything but keyframes. 2. What is the video codec? That is more important than the fact that it is a .mkv. 3. Have you played this on another device to check it?
  • < – A.M. – 2013-08-03T22:34:51.353

    >

  • Probably
  • Codec: H264 - MPEG-4 AVC (part10) (avc1), 1280x546, 23.976215 FPS, Planar 4:2:0 YUV
  • I tried to play it at work on Intel Core i7 3770K's integrated GPU.
  • Every single 1080p or 720p video I tried has same tearing problems...
  • < – None – 2013-08-04T03:16:00.717

    Answers

    1

    It looks like vertical tearing to me, which means that your GPU is pumping out frames faster than the screen can display them. This is typically a more common issue with games and other interactive things, since video playback typically has V-sync enabled.

    If you're using GPU acceleration in VLC, try turning it off ("Inputs and Codecs" tab in Preferences, there's a "GPU Acceleration" checkbox) and see if it makes a difference.

    You can also try forcing V-sync driver-side and see if that makes a difference.

    Robert Rouhani

    Posted 2013-08-03T21:28:38.960

    Reputation: 323

    GPU acceleration cannot be enabled/disabled. Please take a look at the new screenshot in UPD1 – None – 2013-08-04T03:10:49.380

    1Yep, its screen tearing. Enabling V-Sync will help. – Keltari – 2013-08-04T03:17:56.377

    How can I find out if it's enabled? glxgears outputs this: 300 frames in 5.0 seconds = 59.903 FPS – None – 2013-08-04T03:30:47.833

    Well I see now... xrandr -q --verbose | grep 1280x800 outputs LVDS connected 1280x800+0+0 (0x54) normal (normal left inverted right x axis y axis) 331mm x 207mm 1280x800 (0x54) 71.0MHz -HSync -VSync *current +preferred. Now I need to find out how to enable it :) – None – 2013-08-04T03:53:27.237

    I enabled VSync, nothing changed... :( – None – 2013-08-04T04:03:30.173

    Hmm, looking at the screenshot closer, it looks like they aren't straight tear lines, they're square blocks of the video starting at the top left and moving to the bottom right. So it may not be related to hardware V-Sync, but the issue is most likely still something related to the updating and rendering not being in sync, maybe at a codec level or elsewhere, which sadly isn't my strong suit. – Robert Rouhani – 2013-08-04T04:37:46.330

    Actually it didn't work in VLC, but works flowlessly in mplayer with -vo xv:adaptor=0! Thanks everybody, I guess it settles that... – None – 2013-08-04T04:54:17.987

    0

    This doesn't look like an issue with any specific frame. Rather, it's probably your video card being too overwhelmed to display the video without lagging. Do you notice more tearing with higher-resolution videos? More pixels means more work for your hardware. High framerates can cause also more work, as it has less time to process all those tiny pixels in a given frame.

    You should try experimenting with different Video Output drivers. IDK about VLC, but Mplayer does best with XV. If you and use XV with so-called "adaptors", that may help improve your performance even further (eg, -vo xv:adaptor=0). If you still experience tearing, you can try using software scaling to reduce the resolution (-vf-add scale=720), if you have a fast CPU.

    If all of the above fails, your GPU probably just plain isn't fast enough for HD video. You could try buying a newer, faster model. Or, you could probably use a video converter program, such as FFMpeg, to convert the video at a lower resolution. If you don't like command-lines, you could also use XMedia-Recode (a Windows-based GUI), as it works quite well with WINE. The homepage is in German, but you can download it from Video Help, if you feel more comfortable getting it from an English site. Either way, XMR will work in English.

    TSJNachos117

    Posted 2013-08-03T21:28:38.960

    Reputation: 291

    >

  • Tried launching mplayer with -vo xv:adaptor=0 first - same thing, then I tried with -vo xv:adaptor=0 -vf-add scale=720 - no difference.
  • At home I'm using Advanced Micro Devices [AMD] nee ATI RC410M [Mobility Radeon Xpress 200M] VGA.
  • At work I'm using Intel Core i7 3770K integrated GPU.
  • The problem is that I haven't had these troubles on Win7... :( – None – 2013-08-04T03:23:31.410