• 2 Posts
  • 5 Comments
Joined 1 year ago
cake
Cake day: September 23rd, 2023

help-circle


  • 0WN3D@lemmy.cafeOPtoLinux@lemmy.mlMPV dropping frames and audio
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    Yea, it seems to be using 200% CPU. But I have vo=gpu though, so I’d thought the GPU would’ve taken some of the load.

    If I am strapped for CPU resources, how do I make it so that MPV buffer or something instead of dropping the audio when this happens? Cause it is strange the even though the visuals are acceptable, it is the audio that fails before the video




  • yea, this is pretty close to what I’m looking for.

    The only missing piece is the ability to define the overload methods on the bool

    something like

    @overload
    def foo(return_more: True) -> (Data, Data)
    
    @overload
    def foo(return_more: False) -> Data
    

    But I don’t think such constructs are possible? I know it is possible in Typescript to define the types using constants, but I don’t suppose Python allows for this?

    EDIT: At first, when I tried the above, the typechecker said Literal[True] was not expected and I thought it was not possible. But after experimenting some, I figured out that it is actually possible. Added my solution to the OP

    Thanks for the tip!