Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

no tear-free with uxa? or codec issue? N4000 [Solved]

Need help with peripherals or devices?
Post Reply
Message
Author
tpprynn
Posts: 132
Joined: 2011-04-11 18:09

no tear-free with uxa? or codec issue? N4000 [Solved]

#1 Post by tpprynn »

While I'm not completely satisfied with the graphics on a Lenovo laptop I have, I've bought another laptop with similar chips and the same apparent issue.

I use Debian 10 64 bit LXDE. There is stuttering in mpv and SMPlayer, though less in SMPlayer. There's none in mplayer. If I remove these lines from my xorg.conf things seem improved stutter-wise but of course then there's tearing. I have also tried commenting out the odd line as below. Is there anything I can change? Is there a line I can put in an mpv config file to make it use a different driver module? (Pardon my inexact terminology but hopefully you know what I mean.) Tear-free doesn't work with uxa instead of sna in line 5.

Is it a codec issue? A 1.3gb avi plays smoothly, in mpv, but a 740mb mkv doesn't. My Debian install was from the iso with all the nonfree stuff added.

Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"
Option "AccelMethod" "sna"
#Option "TripleBuffer" "true"
EndSection

The chip is an Intel N4000.

I didn't have this issue with Xfce, I think, with the vsync feature in its compositing being involved. But I have really become a big fan of LXDE, partly because I have a fussy eye that prefers simplicity and a lack of visual glitches that come of gtk being in flux - signs of the latter are minimal with LXDE.

I have the feeling it's a codec matter.

Thanks for any ideas.
Last edited by tpprynn on 2020-01-01 18:01, edited 3 times in total.

tpprynn
Posts: 132
Joined: 2011-04-11 18:09

Re: no tear-free with uxa? or codec issue?

#2 Post by tpprynn »

I can see this is probably a cpu matter now. mpv uses 99%, mplayer 25-35%. But is that a symptom of something else? I had thought mpv was included with LXDE Debian as it was a bit basic. And as I say, the avi was fine.

I transcoded part of the mkv file to mp4 which didn't remove the stuttering, so that suggests it's at least not purely a codec issue?

I knew it was not a fast computer when I bought it, but obviously you try to find and optimise the limits.

mplayer is pretty great but I'm still getting my head round how to operate it. If mpv can perform better I'd still be interested in a solution.

Thanks.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: no tear-free with uxa? or codec issue?

#3 Post by Head_on_a_Stick »

I think mpv uses vo=gpu by default but you could try it anyway, that should give the best performance.
deadbang

tpprynn
Posts: 132
Joined: 2011-04-11 18:09

Re: no tear-free with uxa? or codec issue?

#4 Post by tpprynn »

No luck there I'm afraid. I'll settle with mplayer for now but will look here for other later suggestions.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: no tear-free with uxa? or codec issue?

#5 Post by stevepusser »

Mplayer shouldn't be able to use less CPU for a given video than mpv, unless mpv is somehow misconfigured...

How about in VLC or QMPlay2 players?

How old is the GPU? Newer Intel GPUs can use va-api hardware acceleration to take advantage of the GPU's built-in hardware for video decoding. Install vainfo and i965-va-driver, then run "vainfo" in a terminal to see what codecs are supported. For example, this 2018 Coffe Lake 8th-gen GPU reports (with a backported libva):

Code: Select all

$ vainfo
libva info: VA-API version 1.5.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.5 (libva 2.4.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Coffee Lake - 2.3.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
So it supports MPEG2, h.264, h.265 (HEVC), vp8, and vp9. Not bad.
MX Linux packager and developer

tpprynn
Posts: 132
Joined: 2011-04-11 18:09

Re: no tear-free with uxa? or codec issue?

#6 Post by tpprynn »

The output was practically the same as the one you quoted.

Just installed VLC and it works perfectly too, with no more cpu use than mplayer, and no messages about dropped frames.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: no tear-free with uxa? or codec issue?

#7 Post by Head_on_a_Stick »

What if you set mpv to use VAAPI instead?

For example:

Code: Select all

mpv --vo=vaapi --hwdec=vaapi example.mp4
There is also --hwdec=vaapi-copy, which will copy the video to RAM before playing it, but that won't work for all GPUs.
deadbang

tpprynn
Posts: 132
Joined: 2011-04-11 18:09

Re: no tear-free with uxa? or codec issue?

#8 Post by tpprynn »

Oh thank you. Perfect! That first option is spot-on and the CPU use is down to under 15%. No stuttering when seeking through the video either.

(The second option there works also, for the benefit of anyone looking in here later.)

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: no tear-free with uxa? or codec issue? N4000 [Solved]

#9 Post by stevepusser »

I'm pretty sure VLC tries to use hardware acceleration by default, set to "Automatic" in Input/Codecs settings. If it does, you can see lines similar to this, using an Intel GPU, with a sample 4K h.264 movie trailer when running vlc from a terminal:

Code: Select all

$ vlc Elysium_trailer_1-4K-HDTN\(4ksamples.com\).mp4
....
libva info: VA-API version 1.5.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
[00007f7588d715b0] avcodec decoder: Using Intel i965 driver for Intel(R) Coffee Lake - 2.3.0 for hardware decoding
MX Linux packager and developer

Post Reply