3

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!

A.M.
  • 997
  • 5
  • 16
  • 24
  • 1. 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. Aug 03 '13 at 22:34
  • 1. Probably 2. Codec: H264 - MPEG-4 AVC (part10) (avc1), 1280x546, 23.976215 FPS, Planar 4:2:0 YUV 3. I tried to play it at work on Intel Core i7 3770K's integrated GPU. 4. Every single 1080p or 720p video I tried has same tearing problems... –  Aug 04 '13 at 03:16

2 Answers2

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
  • 358
  • 1
  • 6
  • GPU acceleration cannot be enabled/disabled. Please take a look at the new screenshot in **UPD1** –  Aug 04 '13 at 03:10
  • 1
    Yep, its screen tearing. Enabling V-Sync will help. – Keltari Aug 04 '13 at 03:17
  • How can I find out if it's enabled? `glxgears` outputs this: `300 frames in 5.0 seconds = 59.903 FPS` –  Aug 04 '13 at 03:30
  • 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 :) –  Aug 04 '13 at 03:53
  • I enabled VSync, nothing changed... :( –  Aug 04 '13 at 04:03
  • 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 Aug 04 '13 at 04:37
  • Actually it didn't work in VLC, but works flowlessly in mplayer with `-vo xv:adaptor=0`! Thanks everybody, I guess it settles that... –  Aug 04 '13 at 04:54
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.

Pang
  • 937
  • 1
  • 9
  • 12
TSJNachos117
  • 321
  • 3
  • 10
  • 1. 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. 2. At home I'm using `Advanced Micro Devices [AMD] nee ATI RC410M [Mobility Radeon Xpress 200M]` VGA. 3. At work I'm using `Intel Core i7 3770K integrated GPU`. The problem is that I haven't had these troubles on Win7... :( –  Aug 04 '13 at 03:23