mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.14k stars 2.89k forks source link

Bad performance #9790

Closed ZaxonXP closed 2 years ago

ZaxonXP commented 2 years ago

Important Information

Provide following Information:

Reproduction steps

I compiled the mpv with the following options:

Setting top to                           : /home/user/Software/zzz_temp/mpv/mpv-master 
Setting out to                           : /home/user/Software/zzz_temp/mpv/mpv-master/build 
Checking for waf version in 1.8.4-2.1.0  : ok 
Checking for program 'cc'                : /usr/bin/cc 
Checking for program 'pkg-config'        : /usr/bin/pkg-config 
Checking for program 'ar'                : /usr/bin/ar 
Checking for program 'rst2html'          : /usr/bin/rst2html 
Checking for program 'rst2man'           : /usr/bin/rst2man 
Checking for program 'rst2pdf'           : /usr/bin/rst2pdf 
Checking for program 'windres'           : not found 
Checking for program 'perl'              : /usr/bin/perl 
Checking for 'gcc' (C compiler)          : /usr/bin/cc 
Detected target OS:                      : os-linux 
Checking for compiler flags -std=c11     : yes 
Checking for compiler flags -Werror -Werror=implicit-function-declaration : yes 
Checking for compiler flags -Werror -Wno-error=deprecated-declarations    : yes 
Checking for compiler flags -Werror -Wno-error=unused-function            : yes 
Checking for compiler flags -Werror -Wempty-body                          : yes 
Checking for compiler flags -Werror -Wdisabled-optimization               : yes 
Checking for compiler flags -Werror -Wstrict-prototypes                   : yes 
Checking for compiler flags -Werror -Wno-format-zero-length               : yes 
Checking for compiler flags -Werror -Werror=format-security               : yes 
Checking for compiler flags -Werror -Wno-redundant-decls                  : yes 
Checking for compiler flags -Werror -Wvla                                 : yes 
Checking for compiler flags -Werror -Wno-format-truncation                : yes 
Checking for compiler flags -Werror -Wimplicit-fallthrough                : yes 
Checking for compiler flags -Werror -fno-math-errno                       : yes 
Checking for LGPL (version 2.1 or later) build                            : disabled 
Checking for GPL (version 2 or later) build                               : yes 
Checking for mpv CLI player                                               : yes 
Checking for shared library                                               : disabled 
Checking for static library                                               : disabled 
Checking for static build                                                 : disabled 
Checking for whether to include binary compile time                       : yes 
Checking for whether to optimize                                          : yes 
Checking for whether to compile-in debugging information                  : yes 
Checking for unit tests (development only)                                : disabled 
Checking for enable ta leak report by default (development only)          : disabled 
Checking for manpage generation                                           : yes 
Checking for html manual generation                                       : disabled 
Checking for pdf manual generation                                        : disabled 
Checking for dynamic loader                                               : yes 
Checking for C plugins                                                    : yes 
Checking for inline assembly (currently without effect)                   : yes 
Checking for GCC vector instructions                                      : yes 
Checking for generate a clang compilation database                        : disabled 
Checking for static Swift linking                                         : disabled 
Checking for compiler support for noexecstack                             : yes 
Checking for linker support for --nxcompat --no-seh --dynamicbase         : no 
Checking for -lm                                                          : yes 
Checking for MinGW                                                        : os-win32 not found 
Checking for POSIX environment                                            : yes 
Checking for Android environment                                          : no 
Checking for tvOS environment                                             : no 
Checking for Android EGL support                                          : android not found 
Checking for development environment                                      : yes 
Checking for macOS Swift build tools                                      : os-darwin not found 
Checking for Universal Windows Platform                                   : disabled 
Checking for win32 desktop APIs                                           : os-win32 not found 
Checking for internal pthread wrapper for win32 (Vista+)                  : posix found 
Checking for POSIX threads                                                : yes 
Checking for pthread runtime debugging wrappers                           : disabled 
Checking for C11 stdatomic.h                                              : yes 
Checking for linking with -lrt                                            : yes 
Checking for iconv                                                        : yes 
Checking for w32/dos paths                                                : os-win32 not found 
Checking for glob() POSIX support                                         : yes 
Checking for glob() win32 replacement                                     : posix found 
Checking for any glob() support                                           : yes 
Checking for vt.h                                                         : yes 
Checking for consio.h                                                     : vt.h found 
Checking for gbm.h                                                        : yes 
Checking for GLIBC API for setting thread name                            : yes 
Checking for OSX API for setting thread name                              : glibc-thread-name found 
Checking for BSD API for setting thread name                              : glibc-thread-name found 
Checking for BSD's fstatfs()                                              : no 
Checking for Linux's fstatfs()                                            : yes 
Checking for Linux's input-event-codes.h                                  : yes 
Checking for Lua                                                          : yes (version found: lua51) 
Checking for Javascript (MuJS backend)                                    : yes 
Checking for SSA/ASS support                                              : yes 
Checking for zlib                                                         : yes 
Checking for Bluray support                                               : yes 
Checking for dvdnav support                                               : disabled 
Checking for cdda support (libcdio)                                       : disabled 
Checking for uchardet support                                             : yes 
Checking for librubberband support                                        : yes 
Checking for libzimg support (high quality software scaler)               : yes 
Checking for LCMS2 support                                                : yes 
Checking for VapourSynth filter bridge                                    : yes 
Checking for libarchive wrapper for reading zip files and more            : yes 
Checking for DVB input module                                             : disabled 
Checking for SDL2                                                         : disabled 
Checking for SDL2 gamepad input                                           : sdl2 not found 
Checking for FFmpeg library                                               : yes 
Checking for libavdevice                                                  : yes 
Checking for SDL2 audio output                                            : sdl2 not found 
Checking for OSSv4 audio output                                           : no 
Checking for PipeWire audio output                                        : yes 
Checking for sndio audio input/output                                     : disabled 
Checking for PulseAudio audio output                                      : yes 
Checking for JACK audio output                                            : yes 
Checking for OpenAL audio output                                          : disabled 
Checking for OpenSL ES audio output                                       : no 
Checking for ALSA audio output                                            : yes 
Checking for CoreAudio audio output                                       : no 
Checking for AudioUnit output for iOS                                     : no 
Checking for WASAPI audio output                                          : os-win32 not found 
Checking for SDL2 video output                                            : sdl2 not found 
Checking for Cocoa                                                        : no 
Checking for DRM                                                          : yes 
Checking for GBM                                                          : yes 
Checking for wayland-scanner                                              : yes 
Checking for wayland-protocols                                            : yes 
Checking for Wayland                                                      : yes 
Checking for Linux's memfd_create()                                       : yes 
Checking for X11                                                          : yes 
Checking for Xv video output                                              : yes 
Checking for OpenGL Cocoa Backend                                         : cocoa not found 
Checking for OpenGL X11/GLX (deprecated/legacy)                           : disabled 
Checking for Raspberry Pi support                                         : disabled 
Checking for EGL 1.4                                                      : yes 
Checking for OpenGL X11 EGL Backend                                       : yes 
Checking for OpenGL DRM EGL Backend                                       : yes 
Checking for OpenGL Wayland Backend                                       : yes 
Checking for OpenGL Win32 Backend                                         : win32-desktop not found 
Checking for OpenGL/DirectX Interop Backend                               : gl-win32 not found 
Checking for OpenGL ANGLE headers                                         : os-win32 not found 
Checking for OpenGL Win32 ANGLE Library                                   : egl-angle not found 
Checking for OpenGL Win32 ANGLE Backend                                   : egl-angle not found 
Checking for VDPAU acceleration                                           : yes 
Checking for VDPAU with OpenGL/X11                                        : gl-x11 not found 
Checking for VAAPI acceleration                                           : yes 
Checking for VAAPI (X11 support)                                          : yes 
Checking for VAAPI (Wayland support)                                      : yes 
Checking for VAAPI (DRM/EGL support)                                      : yes 
Checking for VAAPI EGL on X11                                             : yes 
Checking for VAAPI EGL                                                    : yes 
Checking for CACA                                                         : yes 
Checking for JPEG support                                                 : yes 
Checking for Direct3D support                                             : win32-desktop not found 
Checking for libshaderc SPIR-V compiler (shared library)                  : no ('shaderc' not found) 
Checking for libshaderc SPIR-V compiler (static library)                  : no ('shaderc_static' not found) 
Checking for libshaderc SPIR-V compiler                                   : shaderc-shared not found 
Checking for SPIRV-Cross SPIR-V shader converter (shared library)         : no ('spirv-cross-c-shared' not found) 
Checking for SPIRV-Cross SPIR-V shader converter (static library)         : no ('spirv-cross' not found) 
Checking for SPIRV-Cross SPIR-V shader converter                          : spirv-cross-shared not found 
Checking for Direct3D 11 video output                                     : win32-desktop not found 
Checking for iOS OpenGL ES hardware decoding interop support              : no 
Checking for OpenGL without platform-specific code (e.g. for libmpv)      : libmpv-shared not found 
Checking for OpenGL context support                                       : yes 
Checking for libplacebo support                                           : yes 
Checking for libplacebo v4.170+, needed for vo_gpu_next                   : no 
Checking for Vulkan context support                                       : yes 
Checking for VAAPI Vulkan                                                 : yes 
Checking for EGL helper functions                                         : yes 
Checking for Sixel                                                        : yes 
Checking for libavcodec videotoolbox hwaccel                              : gl-cocoa not found 
Checking for Videotoolbox with OpenGL                                     : gl-cocoa not found 
Checking for D3D11VA hwaccel                                              : os-win32 not found 
Checking for DXVA2 hwaccel                                                : d3d-hwaccel not found 
Checking for OpenGL/DirectX Interop Backend DXVA2 interop                 : gl-dxinterop not found 
Checking for CUDA Headers and dynamic loader                              : yes 
Checking for CUDA acceleration                                            : yes 
Checking for CUDA with graphics interop                                   : yes 
Checking for Raspberry Pi MMAL hwaccel                                    : rpi not found 
Checking for w32 executable                                               : os-win32 not found 
Checking for macOS Touch Bar support                                      : cocoa not found 
Checking for macOS 10.11 SDK Features                                     : cocoa not found 
Checking for macOS 10.12.2 SDK Features                                   : cocoa not found 
Checking for macOS 10.14 SDK Features                                     : cocoa not found 
Checking for macOS Media Player support                                   : macos-10-12-2-features not found 
Checking for macOS libmpv backend                                         : cocoa not found 
Writing configuration header:                                             : config.h 
'configure' finished successfully (5.666s)

Expected behavior

The video will be played smoothly.

Actual behavior

Video plays with very low frame rate with many frames dropped.

When I tried to play the same video file with the debian repo version of mpv I reproduced the issue with following command: mpv --opengl-es=no K7iwGuBuJPo.mp4 and when I use yes then the playback is smooth (this is not the case with the git build version). The git build version does not use the --opengl-es option.

How I can make to work or is this a bug?

Log file

output.txt

Sample files

https://user-images.githubusercontent.com/6058640/151550353-4bdda4c3-386a-4a62-a3ad-a2ccb316581f.mp4

The source was taken from the Youtube

CounterPillow commented 2 years ago

Try with --vd-lavc-dr=no

ZaxonXP commented 2 years ago

@CounterPillow : This is fixing my issue. Looks like I need to add it to the config. Thanks!

CounterPillow commented 2 years ago

Yeah, this is a quirk with really low end Intel chips where directly decoding into the GPU buffer is somehow slower than an additional copy.

What CPU is this?

ZaxonXP commented 2 years ago
 *-cpu
      product: Intel(R) Pentium(R) CPU N4200 @ 1.10GHz
      vendor: Intel Corp.
      physical id: 1
      bus info: cpu@0
      size: 2286MHz
      capacity: 2500MHz
      width: 64 bits