mpv-player / mpv

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

Lots of dropped frames on upgrade to 0.35.0 #11040

Closed rogg closed 1 year ago

rogg commented 1 year ago

Important Information

Arch Linux: On upgrading from 0.34.1 to 0.35.0 I'm getting lots of dropped frames when software decoding. Tried Xorg vs Wayland, xf86-video-intel vs modesetting driver, and mesa vs mesa-amber, same issue. I ran git bisect and the problem seems to be caused by 2fc327f2fdd48f0cd58a4d4382a7aa57f3fabd77 by @philipl. It's an old i5-560m, so maybe that's why nobody has noticed this yet?

Log file

[cplayer] Command line options: '-v' '--no-config' '/home/arch/Videos/juddertest_60.mp4' [cplayer] mpv 0.35.0 Copyright © 2000-2022 mpv/MPlayer/mplayer2 projects [cplayer] built on UNKNOWN [cplayer] FFmpeg library versions: [cplayer] libavutil 57.28.100 [cplayer] libavcodec 59.37.100 [cplayer] libavformat 59.27.100 [cplayer] libswscale 6.7.100 [cplayer] libavfilter 8.44.100 [cplayer] libswresample 4.7.100 [cplayer] FFmpeg version: n5.1.2 [cplayer] [cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --disable-build-date --disable-caca [cplayer] List of enabled features: alsa asm av-channel-layout cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build dmabuf-interop-gl dmabuf-interop-pl dmabuf-wayland drm drm-is-kms dvbin dvdnav egl egl-drm egl-helpers egl-x11 ffmpeg ffnvcodec gbm gbm.h gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack javascript jpeg jpegxl lcms2 libarchive libass libavdevice libbluray libdl libm libmpv-shared libplacebo libplacebo-next librt linux-fstatfs linux-input-event-codes lua luajit memfd_create optimize pipewire plain-gl posix posix-or-mingw pthreads pulse rubberband rubberband-3 shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-libplacebo vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vector vt.h vulkan wayland wayland-protocols wayland-protocols-1-24 x11 xv zimg zlib [cplayer] Setting option 'v' = '' (flags = 8) [cplayer] Setting option 'config' = 'no' (flags = 8) [cplayer] Waiting for scripts... [osd/libass] libass API version: 0x1700000 [osd/libass] libass source: commit: 0.17.0-0-gbef4b43ef1882b77f789f611d9cd24271ccdd65b-dirty [osd/libass] Shaper: FriBidi 1.0.12 (SIMPLE) HarfBuzz-ng 6.0.0 (COMPLEX) [osd/libass] Setting up fonts... [osd/libass] Using font provider fontconfig [osd/libass] Done. [cplayer] Set property: shared-script-properties -> 1 [cplayer] Set property: shared-script-properties -> 1 [cplayer] Done loading scripts. [cplayer] Running hook: ytdl_hook/on_load [ytdl_hook] ytdl:// hook [ytdl_hook] not a ytdl:// url [cplayer] Set property: shared-script-properties -> 1 [ifo_dvdnav] Opening /home/arch/Videos/juddertest_60.mp4 [bdmv/bluray] Opening /home/arch/Videos/juddertest_60.mp4 [file] Opening /home/arch/Videos/juddertest_60.mp4 [demux] Trying demuxers for level=normal. [cplayer] Set property: shared-script-properties -> 1 [osd/libass] libass API version: 0x1700000 [osd/libass] libass source: commit: 0.17.0-0-gbef4b43ef1882b77f789f611d9cd24271ccdd65b-dirty [osd/libass] Shaper: FriBidi 1.0.12 (SIMPLE) HarfBuzz-ng 6.0.0 (COMPLEX) [osd/libass] Setting up fonts... [lavf] Found 'mov,mp4,m4a,3gp,3g2,mj2' at score=100 size=2048. [file] stream level seek from 131072 to 800151 [demux] Detected file format: mov,mp4,m4a,3gp,3g2,mj2 (libavformat) [cplayer] Opening done: /home/arch/Videos/juddertest_60.mp4 [osd/libass] Using font provider fontconfig [osd/libass] Done. [find_files] Loading external files in /home/arch/Videos/ [cplayer] Running hook: ytdl_hook/on_preloaded [lavf] select track 0 [cplayer] (+) Video --vid=1 (*) (h264 1920x1072 60.000fps) [vo/gpu] Probing for best GPU context. [vo/gpu/opengl] Initializing GPU context 'wayland' [vo/gpu/opengl] Initializing GPU context 'x11egl' [vo/gpu/x11] X11 opening display: :0 [vo/gpu/x11] Display 0 (LVDS-1): [0, 0, 1366, 768] @ 59.973124 FPS [vo/gpu/x11] Current display FPS: 59.973124 [vo/gpu/opengl] EGL_VERSION=1.4 [vo/gpu/opengl] EGL_VENDOR=Mesa Project (Amber) [vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES [vo/gpu/opengl] Trying to create Desktop OpenGL context. [vo/gpu/opengl] Choosing visual EGL config 0x3, visual ID 0x21 [vo/gpu/x11] The XPresent extension was found. [vo/gpu/x11] XPresent disabled. [vo/gpu/opengl] GL_VERSION='2.1 Mesa 21.3.9 Amber' [vo/gpu/opengl] Detected desktop OpenGL 2.1. [vo/gpu/opengl] GL_VENDOR='Intel Open Source Technology Center' [vo/gpu/opengl] GL_RENDERER='Mesa DRI Intel(R) HD Graphics (ILK)' [vo/gpu/opengl] GL_SHADING_LANGUAGE_VERSION='1.20' [vo/gpu/opengl] Loaded extension GL_ARB_map_buffer_range. [vo/gpu/opengl] Loaded extension GL_ARB_framebuffer_object. [vo/gpu/opengl] Loaded extension GL_ARB_vertex_array_object. [vo/gpu/opengl] Loaded extension GL_ARB_texture_rg. [vo/gpu/opengl] Loaded extension GL_ARB_texture_float. [vo/gpu/opengl] Loaded extension GL_ARB_sync. [vo/gpu/opengl] Loaded extension GL_ARB_invalidate_subdata. [vo/gpu/opengl] Loaded extension GL_ARB_get_program_binary. [vo/gpu/opengl] Loaded extension GL_ARB_buffer_storage. [vo/gpu/opengl] Loaded extension GL_ARB_arrays_of_arrays. [vo/gpu/opengl] Loaded extension GL_ARB_debug_output. [vo/gpu/opengl] Loaded extension GL_KHR_debug. [vo/gpu] Testing FBO format rgba16f [vo/gpu] Using FBO format rgba16f. [vo/gpu] Disabling HDR peak computation (one or more of the following is not supported: compute shaders=0, SSBO=0). [vo/gpu] No advanced processing required. Enabling dumb mode. [vo/gpu] Assuming 59.973124 FPS for display sync. [vd] Container reported FPS: 60.000000 [vd] Codec list: [vd] h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [vd] h264_v4l2m2m (h264) - V4L2 mem2mem H.264 decoder wrapper [vd] h264_qsv (h264) - H264 video (Intel Quick Sync Video acceleration) [vd] h264_cuvid (h264) - Nvidia CUVID H264 decoder [vd] Opening decoder h264 [vd] No hardware decoding requested. [vd] Using software decoding. [vd] Detected 4 logical cores. [vd] Requesting 5 threads for decoding. [vd] Selected codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10) [vf] User filter list: [vf] (empty) [cplayer] Starting playback... [file] stream level seek from 800210 to 47349 [vd] Using software decoding. [vd] Decoder format: 1920x1072 yuv420p bt.601/auto/auto/limited/auto CL=mpeg2/4/h264 [vf] [in] 1920x1072 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264 [vf] [userdeint] 1920x1072 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264 [vf] [userdeint] (disabled) [vf] [autorotate] 1920x1072 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264 [vf] [autorotate] (disabled) [vf] [convert] 1920x1072 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264 [vf] [convert] (disabled) [vf] [out] 1920x1072 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264 [cplayer] VO: [gpu] 1920x1072 yuv420p [cplayer] VO: Description: Shader-based GPU Renderer [vo/gpu] reconfig to 1920x1072 yuv420p bt.601/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264 [vo/gpu/x11] not waiting for MapNotify [vo/gpu] Resize: 1366x731 [vo/gpu] Window size: 1366x731 (Borders: l=0 t=0 r=0 b=0) [vo/gpu] Video source: 1920x1072 (1:1) [vo/gpu] Video display: (0, 0) 1920x1072 -> (28, 0) 1309x731 [vo/gpu] Video scale: 0.681771/0.681903 [vo/gpu] OSD borders: l=28 t=0 r=29 b=0 [vo/gpu] Video borders: l=28 t=0 r=29 b=0 [vo/gpu] Reported display depth: 8 [vo/gpu] Texture for plane 0: 1920x1072 [vo/gpu] Texture for plane 1: 960x536 [vo/gpu] Texture for plane 2: 960x536 [vo/gpu] Testing FBO format rgba16f [vo/gpu] Using FBO format rgba16f. [vo/gpu] No advanced processing required. Enabling dumb mode. [vo/gpu] DR enabled: yes [cplayer] first video frame after restart shown [cplayer] playback restart complete @ 0.033333, audio=eof, video=playing [vo/gpu/x11] Disabling screensaver. [cplayer] Set property: shared-script-properties -> 1 [statusline] V: 00:00:00 / 00:01:04 (0%) [cplayer] Set property: shared-script-properties -> 1 [cplayer] Set property: shared-script-properties -> 1 [statusline] V: 00:00:00 / 00:01:04 (0%) Dropped: 1 [vo/gpu] Resize: 1366x731 [vo/gpu] Window size: 1366x731 (Borders: l=0 t=0 r=0 b=0) [vo/gpu] Video source: 1920x1072 (1:1) [vo/gpu] Video display: (0, 0) 1920x1072 -> (28, 0) 1309x731 [vo/gpu] Video scale: 0.681771/0.681903 [vo/gpu] OSD borders: l=28 t=0 r=29 b=0 [vo/gpu] Video borders: l=28 t=0 r=29 b=0 [vo/gpu] Reported display depth: 8 [statusline] V: 00:00:07 / 00:01:04 (12%) Dropped: 293 [cplayer] EOF code: 5
[vo/gpu/x11] Enabling screensaver. [vf] dropping frame due to pin disconnect [cplayer] finished playback, success (reason 3) [cplayer] [cplayer] Exiting... (Quit) [cplayer] Set property: shared-script-properties -> 1

Sample files

It's very obvious with any video, but the one I used is http://www.oc-burner.de/ftp/Videos/juddertest/juddertest_60.mp4

CounterPillow commented 1 year ago

Duplicate of #10972

rogg commented 1 year ago

Yep, vd-lavc-dr=no fixed it. I've added a note about it to the Arch wiki.

On Thu, Dec 22, 2022, 23:52 Nicolas F. @.***> wrote:

Duplicate of #10972 https://github.com/mpv-player/mpv/issues/10972

— Reply to this email directly, view it on GitHub https://github.com/mpv-player/mpv/issues/11040#issuecomment-1363705454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANZ42DPL2TDIJ4QXHUKH73WOVK2HANCNFSM6AAAAAATHPRZCQ . You are receiving this because you authored the thread.Message ID: @.***>