GithubHelp home page GithubHelp logo

Comments (7)

ripose-jp avatar ripose-jp commented on June 22, 2024

I doubt it's a GPU bottleneck given the specs. Can you take a screenshot of the statistics of a video that lags your MacBook in both Memento and mpv playing at full resolution? You can show stats with Shift+I.

from memento.

Calvin-Xu avatar Calvin-Xu commented on June 22, 2024

After some testing I found this is not a Memento problem. After playing the identical video clip for about two minutes, mpv also started dropping frames.

Memento:
memento

mpv:
mpv

mpv produced the following stacktrace that I also got from Memento. I have never seem this before, but it looks to be caused by MacOS update and windowing/fullscreen related again. There is an issue already, mpv-player/mpv#11018, but nobody seem to mention dropped frames there, so maybe it is unrelated. After starting playback and fullscreening either Memento or mpv, I did not change window size of switch desktops; only let the videos play.

1   HIToolbox                           0x00007ff81183f726 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 102
2   HIToolbox                           0x00007ff81183f2b8 _ZN15MenuBarInstance14EnableAutoShowEv + 52
3   HIToolbox                           0x00007ff8117aecd7 _ZN15MenuBarInstance21UpdateAggregateUIModeE21MenuBarAnimationStylehhh + 1113
4   HIToolbox                           0x00007ff81183f173 _ZN15MenuBarInstance19SetFullScreenUIModeEjj + 175
5   AppKit                              0x00007ff80b3104b7 -[NSApplication _setPresentationOptions:instance:flags:] + 1145
6   AppKit                              0x00007ff80b165165 -[NSApplication _updateFullScreenPresentationOptionsForInstance:] + 582
7   CoreFoundation                      0x00007ff807e7f3f4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 137
8   CoreFoundation                      0x00007ff807f1943a ___CFXRegistrationPost_block_invoke + 88
9   CoreFoundation                      0x00007ff807f19389 _CFXRegistrationPost + 536
10  CoreFoundation                      0x00007ff807e52919 _CFXNotificationPost + 735
11  Foundation                          0x00007ff808c8cf2c -[NSNotificationCenter postNotificationName:object:userInfo:] + 82
12  AppKit                              0x00007ff80b310b28 spacesNotificationHandler + 119
13  SkyLight                            0x00007ff80caae74d _ZN12_GLOBAL__N_123notify_datagram_handlerEj15CGSDatagramTypePvmS1_ + 1030
14  SkyLight                            0x00007ff80cdc104a _ZN21CGSDatagramReadStream26dispatchMainQueueDatagramsEv + 202
15  SkyLight                            0x00007ff80cdc0f71 ___ZN21CGSDatagramReadStream15mainQueueWakeupEv_block_invoke + 18
16  libdispatch.dylib                   0x00007ff807c2d7fb _dispatch_call_block_and_release + 12
17  libdispatch.dylib                   0x00007ff807c2ea44 _dispatch_client_callout + 8
18  libdispatch.dylib                   0x00007ff807c3b7b9 _dispatch_main_queue_drain + 952
19  libdispatch.dylib                   0x00007ff807c3b3f3 _dispatch_main_queue_callback_4CF + 31
20  CoreFoundation                      0x00007ff807ec8610 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
21  CoreFoundation                      0x00007ff807e88b90 __CFRunLoopRun + 2454
22  CoreFoundation                      0x00007ff807e87b80 CFRunLoopRunSpecific + 560
23  HIToolbox                           0x00007ff8117cc766 RunCurrentEventLoopInMode + 292
24  HIToolbox                           0x00007ff8117cc576 ReceiveNextEventCommon + 679
25  HIToolbox                           0x00007ff8117cc2b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
26  AppKit                              0x00007ff80afd3f33 _DPSNextEvent + 909
27  AppKit                              0x00007ff80afd2db4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219
28  AppKit                              0x00007ff80afc53f7 -[NSApplication run] + 586
29  mpv                                 0x00000001005b69f5 cocoa_main + 757
30  dyld                                0x00007ff807a7b310 start + 2432
AV: 00:00:09 / 00:23:41 (1%) A-V:  0.001 DS: 2.380/12 Dropped: 32
[osd/libass] fontselect: Using default font family: (sans, 400, 0) -> /System/Library/Fonts/Helvetica.ttc, -1, Helvetica
[osd/libass] fontselect: Using default font family: (sans, 700, 0) -> /System/Library/Fonts/Helvetica.ttc, -1, Helvetica-Bold
AV: 00:00:43 / 00:23:41 (3%) A-V:  0.006 DS: 0.840/68 Dropped: 255
Audio device underrun detected.
AV: 00:00:46 / 00:23:41 (3%) A-V:  0.009 DS: 0.760/74 Dropped: 306
Audio device underrun detected.
AV: 00:00:51 / 00:23:41 (4%) A-V:  0.011 DS: 0.670/85 Dropped: 405
Audio device underrun detected.
AV: 00:00:54 / 00:23:41 (4%) A-V:  0.017 DS: 0.680/90 Dropped: 454
Audio device underrun detected.
1   HIToolbox                           0x00007ff8117cc0c2 _ZN15MenuBarInstance22RemoveAutoShowObserverEv + 30
2   HIToolbox                           0x00007ff8117aece3 _ZN15MenuBarInstance21UpdateAggregateUIModeE21MenuBarAnimationStylehhh + 1125
3   HIToolbox                           0x00007ff8117ae7a4 _ZN15MenuBarInstance16ForEachMenuBarDoEU13block_pointerFvPS_E + 46
4   HIToolbox                           0x00007ff8117ae762 SetSystemUIMode + 209
5   AppKit                              0x00007ff80b3104c3 -[NSApplication _setPresentationOptions:instance:flags:] + 1157
6   AppKit                              0x00007ff80b165185 -[NSApplication _updateFullScreenPresentationOptionsForInstance:] + 614
7   CoreFoundation                      0x00007ff807e7f3f4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 137
8   CoreFoundation                      0x00007ff807f1943a ___CFXRegistrationPost_block_invoke + 88
9   CoreFoundation                      0x00007ff807f19389 _CFXRegistrationPost + 536
10  CoreFoundation                      0x00007ff807e52919 _CFXNotificationPost + 735
11  Foundation                          0x00007ff808c8cf2c -[NSNotificationCenter postNotificationName:object:userInfo:] + 82
12  AppKit                              0x00007ff80b310b28 spacesNotificationHandler + 119
13  SkyLight                            0x00007ff80caae74d _ZN12_GLOBAL__N_123notify_datagram_handlerEj15CGSDatagramTypePvmS1_ + 1030
14  SkyLight                            0x00007ff80cdc104a _ZN21CGSDatagramReadStream26dispatchMainQueueDatagramsEv + 202
15  SkyLight                            0x00007ff80cdc0f71 ___ZN21CGSDatagramReadStream15mainQueueWakeupEv_block_invoke + 18
16  libdispatch.dylib                   0x00007ff807c2d7fb _dispatch_call_block_and_release + 12
17  libdispatch.dylib                   0x00007ff807c2ea44 _dispatch_client_callout + 8
18  libdispatch.dylib                   0x00007ff807c3b7b9 _dispatch_main_queue_drain + 952
19  libdispatch.dylib                   0x00007ff807c3b3f3 _dispatch_main_queue_callback_4CF + 31
20  CoreFoundation                      0x00007ff807ec8610 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
21  CoreFoundation                      0x00007ff807e88b90 __CFRunLoopRun + 2454
22  CoreFoundation                      0x00007ff807e87b80 CFRunLoopRunSpecific + 560
23  HIToolbox                           0x00007ff8117cc766 RunCurrentEventLoopInMode + 292
24  HIToolbox                           0x00007ff8117cc576 ReceiveNextEventCommon + 679
25  HIToolbox                           0x00007ff8117cc2b3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
26  AppKit                              0x00007ff80afd3f33 _DPSNextEvent + 909
27  AppKit                              0x00007ff80afd2db4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219
28  AppKit                              0x00007ff80afc53f7 -[NSApplication run] + 586
29  mpv                                 0x00000001005b69f5 cocoa_main + 757
30  dyld                                0x00007ff807a7b310 start + 243
➜ mpv -v
[cplayer] Command line options: '-v'
[cplayer] mpv 0.35.0 Copyright © 2000-2022 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Thu Nov 17 13:14:07 UTC 2022
[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: 5.1.2

from memento.

ripose-jp avatar ripose-jp commented on June 22, 2024

I've noticed the stacktrace as well when switching windows while Memento is fullscreened. It doesn't seem to cause any issues beyond spamming standard error. Since it's probably an mpv thing, I think it's best to just let them sort it out.

As for the dropped frames, I can think of a few possible causes.

  • Drivers for the 5500M are poorly optimized for OpenGL on macOS.
  • macOS is rendering Memento and mpv using your iGPU instead of the dGPU.
    • I am of the opinion that this shouldn't matter on a 2019 Intel laptop as either should be sufficient for 24 FPS at 4K.
  • There is some inefficiency in the mpv rendering pipeline.
    • I don't think this is likely because high resolutions would lead to dropped frames on other platforms.

I'm going to mark this as a can't fix and leave it open since the problem affects mpv as well. I also don't have the requisite hardware to recreate the issue.

from memento.

Calvin-Xu avatar Calvin-Xu commented on June 22, 2024

Just want to say after trying various other fixes I gave up and went with hwdec=no. No dropped frames so I can't really complain.

from memento.

ripose-jp avatar ripose-jp commented on June 22, 2024

Interesting. Memento enables hwdec=auto-safe in spite of the mpv docs advising hwdec=no. Did you override that with some other value in your mpv.conf or did you let Memento decide?

from memento.

Calvin-Xu avatar Calvin-Xu commented on June 22, 2024

I overrode it with hwdec=no in mpv.conf. Previously I had no entries touching this value.

On this note I might add that I did this after comparing playing the same video file in IINA (default config) and noticing that it was not using hardware decoding.

from memento.

ripose-jp avatar ripose-jp commented on June 22, 2024

Thanks for letting me know about the fix. I'm going to stop enabling hwdec by default and close this.

from memento.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.