mpv.net | mpv.net is a modern media player | Video Utils library

 by   stax76 C# Version: v5.8.0.0 License: GPL-2.0

kandi X-RAY | mpv.net Summary

mpv.net is a C# library typically used in Video, Video Utils applications. mpv.net has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has medium support. You can download it from GitHub.
mpv.net is a modern media player for Windows based on the popular [mpv] player.
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        mpv.net has a medium active ecosystem.
                        summary
                        It has 1270 star(s) with 99 fork(s). There are 41 watchers for this library.
                        summary
                        There were 1 major release(s) in the last 12 months.
                        summary
                        There are 60 open issues and 302 have been closed. On average issues are closed in 74 days. There are no pull requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of mpv.net is v5.8.0.0
                        mpv.net Support
                          Best in #Video Utils
                            Average in #Video Utils
                            mpv.net Support
                              Best in #Video Utils
                                Average in #Video Utils

                                  kandi-Quality Quality

                                    summary
                                    mpv.net has 0 bugs and 0 code smells.
                                    mpv.net Quality
                                      Best in #Video Utils
                                        Average in #Video Utils
                                        mpv.net Quality
                                          Best in #Video Utils
                                            Average in #Video Utils

                                              kandi-Security Security

                                                summary
                                                mpv.net has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                mpv.net code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                mpv.net Security
                                                  Best in #Video Utils
                                                    Average in #Video Utils
                                                    mpv.net Security
                                                      Best in #Video Utils
                                                        Average in #Video Utils

                                                          kandi-License License

                                                            summary
                                                            mpv.net is licensed under the GPL-2.0 License. This license is Strong Copyleft.
                                                            summary
                                                            Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.
                                                            mpv.net License
                                                              Best in #Video Utils
                                                                Average in #Video Utils
                                                                mpv.net License
                                                                  Best in #Video Utils
                                                                    Average in #Video Utils

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        mpv.net releases are available to install and integrate.
                                                                        summary
                                                                        It has 44 lines of code, 0 functions and 79 files.
                                                                        summary
                                                                        It has low code complexity. Code complexity directly impacts maintainability of the code.
                                                                        mpv.net Reuse
                                                                          Best in #Video Utils
                                                                            Average in #Video Utils
                                                                            mpv.net Reuse
                                                                              Best in #Video Utils
                                                                                Average in #Video Utils
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
                                                                                  Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
                                                                                  Get all kandi verified functions for this library.
                                                                                  Get all kandi verified functions for this library.

                                                                                  mpv.net Key Features

                                                                                  High degree of mpv compatibility, almost all mpv features are available
                                                                                  Customizable context menu defined in the same file as the key bindings
                                                                                  Config dialog
                                                                                  Shorcut key editor
                                                                                  Global hotkeys
                                                                                  Many features like the config editor and shortcut key editor are fully searchable
                                                                                  Configuration files that are easy to read and edit
                                                                                  Command palette to quickly find commands and keys
                                                                                  Modern graphical user interface with customizable color themes
                                                                                  Extension API for .NET languages (C#, VB.NET and F#)
                                                                                  Scripting API for C#, Lua, JavaScript and PowerShell
                                                                                  JSON IPC to control the player with a external programs
                                                                                  On Screen Controler (OSC, play control buttons) with modern flat design
                                                                                  Command Line Interface
                                                                                  Started from a terminal status and debug output is printed on the terminal
                                                                                  DXVA2 video decoding acceleration
                                                                                  Video output capable of features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more
                                                                                  Browser extensions to start mpv.net from the browser
                                                                                  Fast seek performance
                                                                                  Fast startup performance
                                                                                  Usable as video player, audio player and image viewer with a wide range of supported formats
                                                                                  Built-in decoders, no external codecs have to be installed
                                                                                  Setup as x64 installer, portable and Chocolatey
                                                                                  Build-in media streaming (requires youtube-dl being installed)
                                                                                  File associations can be created by the setup and from the player
                                                                                  External audio and subtitle files can be loaded manually or automatically
                                                                                  Screenshot feature
                                                                                  File history feature to log time and filename
                                                                                  Watch later feature to save the position
                                                                                  Files can be enqueued from File Explorer
                                                                                  Update check and update routine

                                                                                  mpv.net Examples and Code Snippets

                                                                                  No Code Snippets are available at this moment for mpv.net.
                                                                                  Community Discussions

                                                                                  Trending Discussions on mpv.net

                                                                                  Keybinding does not work in python-mpv when using it together with pyside6
                                                                                  chevron right

                                                                                  QUESTION

                                                                                  Keybinding does not work in python-mpv when using it together with pyside6
                                                                                  Asked 2022-Feb-23 at 18:13

                                                                                  I use the library https://github.com/jaseg/python-mpv to control the mpv player, but when using it together with pyside6, keybindings do not work (player doesn't accept input totally). What am I doing wrong? or is it impossible to use them when embedding in pyside6? (If I run the player with the same arguments without embedding, everything works fine)

                                                                                  import os
                                                                                  os.add_dll_directory(os.getcwd())
                                                                                  import mpv
                                                                                  from PySide6.QtWidgets import *
                                                                                  from PySide6.QtCore import *
                                                                                  mpvfolderpath = f"mpv.net/portable_config/"
                                                                                  import sys
                                                                                  class Test(QMainWindow):
                                                                                      def __init__(self, parent=None):
                                                                                          super().__init__(parent)
                                                                                          self.container = QWidget(self)
                                                                                          self.setCentralWidget(self.container)
                                                                                          self.container.setAttribute(Qt.WA_DontCreateNativeAncestors)
                                                                                          self.container.setAttribute(Qt.WA_NativeWindow)
                                                                                          player = mpv.MPV(wid=str(int(self.container.winId())),
                                                                                                           vo="gpu",  # You may not need this
                                                                                                           log_handler=print,
                                                                                                           loglevel='debug',
                                                                                                           input_default_bindings=True,
                                                                                                           input_vo_keyboard=True)
                                                                                  
                                                                                          @player.on_key_press('f')
                                                                                          def my_f_binding():
                                                                                              print("f работает!")
                                                                                          player.play('test.mp4')
                                                                                  
                                                                                  app = QApplication(sys.argv)
                                                                                  
                                                                                  # This is necessary since PyQT stomps over the locale settings needed by libmpv.
                                                                                  # This needs to happen after importing PyQT before creating the first mpv.MPV instance.
                                                                                  import locale
                                                                                  locale.setlocale(locale.LC_NUMERIC, 'C')
                                                                                  win = Test()
                                                                                  win.show()
                                                                                  sys.exit(app.exec_())
                                                                                  

                                                                                  ANSWER

                                                                                  Answered 2022-Feb-23 at 18:13

                                                                                  If the keyboard is not handled (which, in my tests, only happened when the mouse is not hovering the video), the key events are propagated to the Qt window. This means that we can handle those events in the keyPressEvent() override and then create a proper mpv command, which is already mapped to the keypress() function. Obviously, a reference to the player must exist, so you need to make it an instance attribute.

                                                                                  For standard literal keys, it's usually enough to use the event's text(), but for other keys such as arrows you need to map the event with mpv's key names. Using a dictionary is certainly simpler:

                                                                                  MpvKeys = {
                                                                                      Qt.Key.Key_Backspace:   'BS', 
                                                                                      Qt.Key.Key_PageUp:      'PGUP', 
                                                                                      Qt.Key.Key_PageDown:    'PGDWN', 
                                                                                      Qt.Key.Key_Home:        'HOME', 
                                                                                      Qt.Key.Key_End:         'END', 
                                                                                      Qt.Key.Key_Left:        'LEFT', 
                                                                                      Qt.Key.Key_Up:          'UP', 
                                                                                      Qt.Key.Key_Right:       'RIGHT', 
                                                                                      Qt.Key.Key_Down:        'DOWN', 
                                                                                      # ...
                                                                                  }
                                                                                  
                                                                                  class Test(QMainWindow):
                                                                                      def __init__(self, parent=None):
                                                                                          # ...
                                                                                          self.player = mpv.MPV(...)
                                                                                  
                                                                                      def keyPressEvent(self, event):
                                                                                          # look up for the key in our mapping, otherwise use the event's text
                                                                                          key = MpvKeys.get(event.key(), event.text())
                                                                                          self.player.keypress(key)
                                                                                  

                                                                                  Note: in my tests I had to use the vo='x11' flag to have a properly embedded window, and osc=True is also required to use the native OSD.

                                                                                  Source https://stackoverflow.com/questions/71238511

                                                                                  Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                  Vulnerabilities

                                                                                  No vulnerabilities reported

                                                                                  Install mpv.net

                                                                                  You can download it from GitHub.

                                                                                  Support

                                                                                  [Support section of the manual.](docs/Manual.md#support).
                                                                                  Find more information at:
                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit
                                                                                  CLONE
                                                                                • HTTPS

                                                                                  https://github.com/stax76/mpv.net.git

                                                                                • CLI

                                                                                  gh repo clone stax76/mpv.net

                                                                                • sshUrl

                                                                                  git@github.com:stax76/mpv.net.git

                                                                                • Share this Page

                                                                                  share link

                                                                                  Explore Related Topics

                                                                                  Consider Popular Video Utils Libraries

                                                                                  obs-studio

                                                                                  by obsproject

                                                                                  video.js

                                                                                  by videojs

                                                                                  ijkplayer

                                                                                  by bilibili

                                                                                  FFmpeg

                                                                                  by FFmpeg

                                                                                  iina

                                                                                  by iina

                                                                                  Try Top Libraries by stax76

                                                                                  Everything.NET

                                                                                  by stax76C#

                                                                                  MediaInfo.NET

                                                                                  by stax76C#

                                                                                  Get-MediaInfo

                                                                                  by stax76PowerShell

                                                                                  run-hidden

                                                                                  by stax76C#

                                                                                  Compare Video Utils Libraries with Highest Support

                                                                                  obs-studio

                                                                                  by obsproject

                                                                                  video.js

                                                                                  by videojs

                                                                                  bigbluebutton

                                                                                  by bigbluebutton

                                                                                  mpv

                                                                                  by mpv-player

                                                                                  jitsi-meet

                                                                                  by jitsi

                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit