Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-25 Thread David Haller
Hello,

On Mon, 24 Oct 2016, Michael Mol wrote:
>On Saturday, October 22, 2016 05:28:22 AM David Haller wrote:
>> And I've IIRC used plain 'x11' (or was it 'xv'?) for a very long time.
>
>Unless things have changed massively in the last 3-4 years, you almost 
>certainly were using xv without really knowing about it. With just 'x11', 
>you're forced into using software scaling instead of hardware scaling, which 
>massively slows things down. And hardware scaling has been a feature of 
>essentially every video card since, I dunno, 1994 or earlier? And the xv 
>extension has been available since 1991...

That was with Matrox Mystique 4 MB from 1996 and XFree86 3.3.6.

$ grep 'vo=' Backup/.../.mplayer/config:vo=x11

I tried xv, and I guess it did not work as well as x11 ;)

-dnh

-- 
lp1 on fire
-- One of the more obfuscated kernel messages



Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-24 Thread Michael Mol
On Saturday, October 22, 2016 05:28:22 AM David Haller wrote:
> Hello,
> 
> On Fri, 21 Oct 2016, Behrouz Khosravi wrote:
> >> $ mplayer foo.mp4 | grep '^VO: '
> >> VO: [gl] ...
> >> $ mpv  foo.mp4 | grep '^VO: '
> >> VO: [opengl]
> >> 
> >> See 'mplayer -vo help' and 'mpv -vo help'.
> >
> >Thanks. It seems that mplayer is using "xv" and mpv uses "opengl-hq". mpv
> >work ok with "xv" but quality degrades a little, or at least I think that
> >it does.
> 
> Are you sure? Albeit, I'm not familiar with mpv.
> 
> Try 'opengl', 'opengl-old'... But 'xv' should be just as good. Maybe
> there's some filter (deblocking/deringing/denoise) active with one but
> not with 'xv'.
> 
> And I've IIRC used plain 'x11' (or was it 'xv'?) for a very long time.

Unless things have changed massively in the last 3-4 years, you almost 
certainly were using xv without really knowing about it. With just 'x11', 
you're forced into using software scaling instead of hardware scaling, which 
massively slows things down. And hardware scaling has been a feature of 
essentially every video card since, I dunno, 1994 or earlier? And the xv 
extension has been available since 1991...

-- 
:wq

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-22 Thread Behrouz Khosravi



Try 'opengl', 'opengl-old'... But 'xv' should be just as good. Maybe
there's some filter (deblocking/deringing/denoise) active with one but
not with 'xv'.

And I've IIRC used plain 'x11' (or was it 'xv'?) for a very long time.

Try benchmarking yourself a bit, after you've found a setting where no
tearing occurs. Seems mpv has scrapped that benchmarking code of
mplayer though.

$ mplayer -ss 20:00 -endpos 10 -benchmark -vo x11 foo.mkv
BENCHMARKs: VC:   0.910s VO:   1.792s A:   0.043s Sys:   5.272s =8.017s
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo xv foo.mkv
BENCHMARKs: VC:   1.076s VO:   0.147s A:   0.048s Sys:   6.746s =8.018s
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo gl foo.mkv
BENCHMARKs: VC:   1.117s VO:   0.251s A:   0.045s Sys:   6.604s =8.018s
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo gl2 foo.mkv
BENCHMARKs: VC:   0.929s VO:   0.746s A:   0.040s Sys:   6.307s =8.021s
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo vdpau foo.mkv
BENCHMARKs: VC:   1.161s VO:   0.204s A:   0.071s Sys:   6.582s =8.018s

Look at the 'VO: ...s' column. You'd probably need longer tests for
significant results.

But, as mpv is based on the mplayer code, I guess you can "port" the
results of each "-vo" to mpv with some educated guesses, and 'gl'
(mpv: 'opengl'?) seems best ... ;)

BTW: Why not just use mplayer? What does mpv offer that mplayer doesn't?

BTW2:
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo vdpau -vc ffh264vdpau foo.mkv
[just errors and some sound]
$ midentify foo.mkv | grep CODEC
ID_VIDEO_CODEC=ffh264
ID_AUDIO_CODEC=ffac3

Which is why I don't use vdpau ;)

HTH,
-dnh, firmly sticking to the original mplayer, and using mencoder
 on a regular basis



well the thing with quality is not important. I is negligible ( without 
xv option, video seems a little brighter) However it is not important. 
Good thing is that I realized what mplayer was doing for default which 
mpv wasnt.
Anyway I can get what mplayer was offering, with mpv now, so there is no 
need to change.




Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-22 Thread David Haller
Hello,

On Fri, 21 Oct 2016, Behrouz Khosravi wrote:
>> $ mplayer foo.mp4 | grep '^VO: '
>> VO: [gl] ...
>> $ mpv  foo.mp4 | grep '^VO: '
>> VO: [opengl]
>> 
>> See 'mplayer -vo help' and 'mpv -vo help'.
>
>Thanks. It seems that mplayer is using "xv" and mpv uses "opengl-hq". mpv
>work ok with "xv" but quality degrades a little, or at least I think that it
>does.

Are you sure? Albeit, I'm not familiar with mpv.

Try 'opengl', 'opengl-old'... But 'xv' should be just as good. Maybe
there's some filter (deblocking/deringing/denoise) active with one but
not with 'xv'.

And I've IIRC used plain 'x11' (or was it 'xv'?) for a very long time.

Try benchmarking yourself a bit, after you've found a setting where no
tearing occurs. Seems mpv has scrapped that benchmarking code of
mplayer though.

$ mplayer -ss 20:00 -endpos 10 -benchmark -vo x11 foo.mkv
BENCHMARKs: VC:   0.910s VO:   1.792s A:   0.043s Sys:   5.272s =8.017s
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo xv foo.mkv
BENCHMARKs: VC:   1.076s VO:   0.147s A:   0.048s Sys:   6.746s =8.018s
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo gl foo.mkv
BENCHMARKs: VC:   1.117s VO:   0.251s A:   0.045s Sys:   6.604s =8.018s
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo gl2 foo.mkv
BENCHMARKs: VC:   0.929s VO:   0.746s A:   0.040s Sys:   6.307s =8.021s
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo vdpau foo.mkv
BENCHMARKs: VC:   1.161s VO:   0.204s A:   0.071s Sys:   6.582s =8.018s

Look at the 'VO: ...s' column. You'd probably need longer tests for
significant results.

But, as mpv is based on the mplayer code, I guess you can "port" the
results of each "-vo" to mpv with some educated guesses, and 'gl'
(mpv: 'opengl'?) seems best ... ;)

BTW: Why not just use mplayer? What does mpv offer that mplayer doesn't?

BTW2:
$ mplayer -ss 20:00 -endpos 10 -benchmark -vo vdpau -vc ffh264vdpau foo.mkv
[just errors and some sound]
$ midentify foo.mkv | grep CODEC
ID_VIDEO_CODEC=ffh264
ID_AUDIO_CODEC=ffac3

Which is why I don't use vdpau ;)

HTH,
-dnh, firmly sticking to the original mplayer, and using mencoder
on a regular basis

-- 
"Airplane travel is nature's way of making you look like your
passport photo."   -- Al Gore



Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-21 Thread Behrouz Khosravi



$ mplayer foo.mp4 | grep '^VO: '
VO: [gl] ...
$ mpv  foo.mp4 | grep '^VO: '
VO: [opengl]

See 'mplayer -vo help' and 'mpv -vo help'.

HTH,
-dnh



Thanks. It seems that mplayer is using "xv" and mpv uses "opengl-hq". 
mpv work ok with "xv" but quality degrades a little, or at least I think 
that it does.




Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-21 Thread David Haller
Hello,

On Thu, 20 Oct 2016, Behrouz Khosravi wrote:
>You could test different video output drivers and also hardware decoding.
[..]
>> vo=vdpau:deint=-3,opengl-hq:scale=spline36,xv
[..]
>I tried testing some options in config file, but it didnt help.

Why not check what output-driver you use with mplayer and then use
that with mpv too. E.g.:

$ mplayer foo.mp4 | grep '^VO: '
VO: [gl] ...
$ mpv  foo.mp4 | grep '^VO: '
VO: [opengl]

See 'mplayer -vo help' and 'mpv -vo help'.

HTH,
-dnh

-- 
Well, merry frelling christmas!-- Aeryn Sun, Farscape - 4x13 - Terra Firma



Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-20 Thread Behrouz Khosravi

You could test different video output drivers and also hardware decoding.

If you use deinterlace you can also try to tune it's values.

This my mpv config file:

vo=vdpau:deint=-3,opengl-hq:scale=spline36,xv
hwdec=vdpau
audio-device='alsa/iec958:CARD=SB,DEV=0'
audio-channels=auto

P.S.: Sorry for the many replies. I better should turn on my mind
before posting.

--
Regards
wabe



Thanks for the response. Actually my laptop has a nvidia chip which I 
have tured off and I'm using the intel integrated chip.


I tried testing some options in config file, but it didnt help.

I guess I should stick to mplayer instead of mpv.

Thanks
Behrouz



Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-19 Thread wabe
Behrouz Khosravi  wrote:

> Hello everyone. Mpv has horizontal screen tearing(not very serious
> though) while playing video while
> 
> mplayer does not. I have tried some configs which I found on the net
> but nothing removes this issue.
> 
> Mpv docs even says that tearing problems are probably not related to
> software but driver and such, but
> 
> it seems that this is mpv's problem. any idea about how to solve this
> issue? Thanks.

You could test different video output drivers and also hardware decoding.
If you use deinterlace you can also try to tune it's values.

This my mpv config file:

vo=vdpau:deint=-3,opengl-hq:scale=spline36,xv
hwdec=vdpau
audio-device='alsa/iec958:CARD=SB,DEV=0'
audio-channels=auto

P.S.: Sorry for the many replies. I better should turn on my mind 
before posting.

--
Regards
wabe



Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-19 Thread wabe
wabe  wrote:

> In the logfile you can see that I'm using a kernel parameter
> "radeon.dpm=1". Without this parameter I had performance problems
> with my GPU in the past.

I should give some explanation about this parameter. 
It enables an older power management mechanism in the kernel that
gives better performance with my GPU than the newer one.

With radeon.dpm=1 I can use a script in /etc/local.d/ that contains
this line:

echo "performance" > /sys/class/drm/card0/device/power_dpm_state

Positive effect is, that desktop/window operations and also video 
playback are much smoother.
Negative side effect is, that the power consumption of my GPU and
also its temperature is a bit higher than with the default settings.

If I don't use radeon.dpm=1 it is also possible to manually set
a GPU scheduler:

echo "profile" > /sys/class/drm/card0/device/power_method
echo "high" > /sys/class/drm/card0/device/power_profile

But as I already mentioned, performance isn't as good as with the
older power management.

However I checked this out many months ago. Maybe it isn't relevant
anymore. 

--
Regards
wabe



Re: [gentoo-user] screen tearing with mpv but not mplayer

2016-10-19 Thread wabe
Behrouz Khosravi  wrote:

> Hello everyone. Mpv has horizontal screen tearing(not very serious
> though) while playing video while
> 
> mplayer does not. I have tried some configs which I found on the net
> but nothing removes this issue.
> 
> Mpv docs even says that tearing problems are probably not related to
> software but driver and such, but

My GPU is a Radeon R7 250E. Screen resolution is 3840x2160@60Hz 24bpp. 

I had tearing with every player before I used the "TearFree" option 
in my xorg.conf. It contains only a device section, nothing else:

$ cat /etc/X11/xorg.conf

Section "Device"
  Identifier"ATI-Card"
  Driver"radeon"
  Option"TearFree"  "on"
  Option"ShadowPrimary" "off"
EndSection

If you also use a Radeon GPU you can try to enable the TearFree option.
Since I've enabled this option I have no tearing problems anymore.

If you don't use a Radeon GPU then you should find out if there is a 
similar option for your GPU.

Attached is my Xorg logfile (some non important stuff removed). 
In the logfile you can see that I'm using a kernel parameter "radeon.dpm=1". 
Without this parameter I had performance problems with my GPU in the past. 
To be honest, I don't know if the performance problem I encountered still 
exist without this parameter. Maybe it has been fixed in the meantime.

BTW: I'm using x11-base/xorg-server-1.18.4 and 
x11-drivers/xf86-video-ati-7.7.1.

> it seems that this is mpv's problem. any idea about how to solve this
> issue? Thanks.
> 
> [I] media-video/mpv
> Installed versions:  0.20.0(02:34:27 PM
> 10/19/2016)(X alsa cli drm egl enca encode iconv jpeg lcms libass
> libmpv lua luajit opengl pulseaudio rubberband uchardet vaapi vdpau
> wayland xscreensaver xv -aqua -archive -bluray -cdda -coreaudio -doc
> -dvb -dvd -gbm -jack -libav -libcaca -libguess -openal -oss
> -raspberry-pi -samba -sdl -selinux -test -v4l -vf-dlopen -xinerama
> -zsh-completion)

I don't think that it is important but for the sake of completeness
these are the USE flags for mpv (0.9.2-r1) on my system:

X alsa bluray bs2b cli doc-pdf dvd enca encode iconv jack jpeg ladspa 
lcms libass libmpv lua luajit opengl oss sdl vaapi vdpau xscreensaver xv 

--
Regards
wabe[27.726] 
X.Org X Server 1.18.4
Release Date: 2016-07-19
[27.726] X Protocol Version 11, Revision 0
[27.726] Build Operating System: Linux 4.4.2-hardened-v02 x86_64 Gentoo
[27.726] Current Operating System: Linux hal9000 4.7.6-hardened-v01 #2 SMP Wed Oct 19 20:32:26 CEST 2016 x86_64
[27.726] Kernel command line: root=/dev/sda2 radeon.modeset=1 net.ifnames=0 radeon.dpm=1
[27.726] Build Date: 18 September 2016  12:05:58AM
[27.726]  
[27.726] Current version of pixman: 0.34.0
[27.726] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[27.726] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[27.726] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Oct 19 20:34:15 2016
[27.732] (==) Using config file: "/etc/X11/xorg.conf"
[27.732] (==) Using config directory: "/etc/X11/xorg.conf.d"
[27.732] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[27.733] (==) No Layout section.  Using the first Screen section.
[27.733] (==) No screen section available. Using defaults.
[27.733] (**) |-->Screen "Default Screen Section" (0)
[27.733] (**) |   |-->Monitor ""
[27.734] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[27.734] (**) |   |-->Device "ATI-Card"
[27.734] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[27.734] (==) Automatically adding devices
[27.734] (==) Automatically enabling devices
[27.734] (==) Automatically adding GPU devices
[27.735] (==) Max clients allowed: 256, resource mask: 0x1f
[27.742] (==) FontPath set to:
	/usr/share/fonts/misc/,
	/usr/share/fonts/TTF/,
	/usr/share/fonts/OTF/,
	/usr/share/fonts/Type1/,
	/usr/share/fonts/100dpi/,
	/usr/share/fonts/75dpi/
[27.742] (==) ModulePath set to "/usr/lib64/xorg/modules"
[27.742] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[27.742] (II) Loader magic: 0x7af99629c80
[27.742] (II) Module ABI versions:
[27.742] 	X.Org ANSI C Emulation: 0.4
[27.742] 	X.Org Video Driver: 20.0
[27.742] 	X.Org XInput driver : 22.1
[27.742] 	X.Org Server Extension : 9.0
[27.743] (II) xfree86: Adding drm device (/dev/dri/card0)
[27.744] (II) xfree86: Adding drm device (/dev/dri/card1)
[27.747] (--) PCI:*(0:1:0:0) 1002:683f:174b:a001 rev 0, Mem @ 0xd000/268435456, 0xfdf8/262144, I/O @ 

[gentoo-user] screen tearing with mpv but not mplayer

2016-10-19 Thread Behrouz Khosravi
Hello everyone. Mpv has horizontal screen tearing(not very serious 
though) while playing video while


mplayer does not. I have tried some configs which I found on the net but 
nothing removes this issue.


Mpv docs even says that tearing problems are probably not related to 
software but driver and such, but


it seems that this is mpv's problem. any idea about how to solve this 
issue? Thanks.


[I] media-video/mpv
 Available versions:  0.9.2-r1 ~0.18.0-r1 (~)0.20.0 ** {+X 
+alsa aqua archive bluray bs2b cdda cdio +cli coreaudio doc doc-pdf drm 
dvb (+)dvd (+)egl +enca encode gbm +iconv jack jpeg ladspa lcms +libass 
libav libcaca libguess libmpv (+)lua luajit openal +opengl oss 
pulseaudio pvr raspberry-pi rubberband samba (-)sdl selinux test 
(+)uchardet v4l vaapi vdpau vf-dlopen wayland xinerama +xscreensaver 
(+)xv zsh-completion}
 Installed versions:  0.20.0(02:34:27 PM 10/19/2016)(X alsa cli drm 
egl enca encode iconv jpeg lcms libass libmpv lua luajit opengl 
pulseaudio rubberband uchardet vaapi vdpau wayland xscreensaver xv -aqua 
-archive -bluray -cdda -coreaudio -doc -dvb -dvd -gbm -jack -libav 
-libcaca -libguess -openal -oss -raspberry-pi -samba -sdl -selinux -test 
-v4l -vf-dlopen -xinerama -zsh-completion)



[I] media-video/mplayer
 Available versions:  1.2_pre20150214-r1^d ~1.2-r2^d 1.2.1^d 
[M]~1.3.0^d [M]**^d {+X a52 aalib +alsa altivec aqua bidi bl bluray 
bs2b cddb +cdio cdparanoia cpudetection debug dga directfb doc dts dv 
dvb +dvd +dvdnav +enca +encode faac faad fbcon ftp ggi gif gsm +iconv 
ipv6 jack joystick jpeg jpeg2k ladspa +libass libcaca libmpeg2 lirc live 
lzo mad md5sum mng mp3 nas +network nut openal opengl +osdmenu oss png 
pnm pulseaudio pvr radio rar rtc rtmp samba sdl selinux +shm speex tga 
theora toolame tremor +truetype twolame +unicode v4l vcd vdpau vidix 
vorbis x264 xanim xinerama +xscreensaver +xv xvid xvmc yuv4mpeg zoran 
CPU_FLAGS_X86="3dnow 3dnowext +mmx mmxext sse sse2 ssse3" KERNEL="linux" 
VIDEO_CARDS="mga s3virge tdfx"}
 Installed versions:  1.2.1(10:46:46 AM 10/17/2016)(X alsa cdio dvd 
dvdnav enca encode iconv ipv6 jpeg libass mp3 network opengl osdmenu png 
pulseaudio shm truetype unicode vorbis xscreensaver xv -a52 -aalib 
-altivec -aqua -bidi -bl -bluray -bs2b -cddb -cdparanoia -cpudetection 
-debug -dga -directfb -doc -dts -dv -dvb -faac -faad -fbcon -ftp -ggi 
-gif -gsm -jack -joystick -jpeg2k -ladspa -libcaca -libmpeg2 -lirc -live 
-lzo -mad -md5sum -mng -nas -nut -openal -oss -pnm -pvr -radio -rar -rtc 
-rtmp -samba -sdl -selinux -speex -tga -theora -toolame -tremor -twolame 
-v4l -vcd -vdpau -vidix -x264 -xanim -xinerama -xvid -xvmc -yuv4mpeg 
-zoran CPU_FLAGS_X86="mmx mmxext sse sse2 ssse3 -3dnow -3dnowext" 
KERNEL="linux" VIDEO_CARDS="-mga -s3virge -tdfx")


[I] media-video/ffmpeg
 Available versions:  2.8.6(0/54.56.56)^d ~2.8.7(0/54.56.56)^d 
~2.8.8(0/54.56.56)^d [M]~3.1.3(0/55.57.57)^d [M]**(0/55.57.57)^d {X 
aac aacplus alsa altivec amr amrenc armv5te armv6 armv6t2 armvfp bluray 
bs2b +bzip2 cdio celt chromaprint cpudetection debug doc ebur128 +encode 
examples faac fdk flite fontconfig frei0r fribidi gcrypt gme gmp gnutls 
+gpl gsm +hardcoded-tables +iconv iec61883 ieee1394 jack jpeg2k kvazaar 
ladspa libass libcaca libilbc libressl librtmp libsoxr libv4l lzma 
mipsdspr1 mipsdspr2 mipsfpu mmal modplug mp3 neon +network nvenc openal 
opengl openh264 openssl opus oss pic +postproc pulseaudio quvi 
rubberband samba schroedinger sdl snappy speex ssh static-libs test 
theora +threads truetype twolame v4l vaapi vdpau vorbis vpx wavpack webp 
x264 x265 xcb xvid zimg +zlib zvbi ABI_MIPS="n32 n64 o32" ABI_PPC="32 
64" ABI_S390="32 64" ABI_X86="32 64 x32" CPU_FLAGS_X86="3dnow 3dnowext 
aes avx avx2 fma3 fma4 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 xop" 
FFTOOLS="+aviocat +cws2fws +ffescape +ffeval +ffhash +fourcc2pixfmt 
+graph2dot +ismindex +pktdumper +qt-faststart +sidxindex +trasher"}
 Installed versions:  2.8.6(02:23:21 AM 10/18/2016)(X aac alsa 
bzip2 cdio cpudetection encode fontconfig gpl hardcoded-tables iconv mp3 
network opengl opus postproc pulseaudio sdl threads truetype v4l vaapi 
vdpau vorbis vpx webp x264 x265 xcb xvid zlib -aacplus -altivec -amr 
-amrenc -armv5te -armv6 -armv6t2 -armvfp -bluray -bs2b -celt -debug -doc 
-examples -faac -fdk -flite -frei0r -fribidi -gme -gnutls -gsm -iec61883 
-ieee1394 -jack -jpeg2k -ladspa -libass -libcaca -libressl -librtmp 
-libsoxr -libv4l -lzma -mipsdspr1 -mipsdspr2 -mipsfpu -modplug -neon 
-openal -openssl -oss -pic -quvi -samba -schroedinger -snappy -speex 
-ssh -static-libs -test -theora -twolame -wavpack -zvbi ABI_MIPS="-n32 
-n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" 
CPU_FLAGS_X86="avx mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow 
-3dnowext -avx2 -fma3 -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape 
ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart 
sidxindex trasher")