Questions tagged [mpv]

The [mpv] tag is for questions about programmatically interacting with the mpv media player or its C library.

mpv is a free, open source, and cross-platform media player. It is a fork of mplayer2 and MPlayer. It shares some features with the former projects while introducing many more.

mpv can be controlled via a command line interface and/or via a JSON-based IPC protocol. It also has a C API which makes it usable as a library.

92 questions
0
votes
1 answer

GLSurfaceView + libmpv only single color flickers on screen when playing videos

I'm facing a problem with GLSurfaceView + libmpv. After I studied some basics of OpenGL ES, I started implementing a video player on Android as follows: At first I used SurfaceView + default Android MediaPlayer class to play videos and it worked…
Virtroid
  • 43
  • 7
0
votes
1 answer

Wait for mpv command to finish before returning to main in C

I'm writing a small program in C on Linux and my intentions with it is to do the following: Display a menu Ask a user to enter a value Read the value and run the corresponding command Wait for the command to finish before breaking (returning to…
error404
  • 1
  • 2
0
votes
1 answer

Lua script for creating a folder according to artist metatag with mpv player on windows

I watn to make mpv player like itunes library which organizes media library according to the tags of the file. For start I want to make script for mpv player that creates a folder according to artist metatag. When i add this keybinding in input.conf…
0
votes
0 answers

What is the code to show cache time on mpv player?

I have write a line below in "mpv.conf": cache-secs=300 So when I move my mouse, OSD when show the current cache time like below. I want to know what is the code for the current cache time.So I can use a keybind to show the exactly readahead time…
0
votes
0 answers

Execute lua script in mvp from the terminal

I would like to use the ipc server in mvp. It does exactly what I need. But from my app I can't talk to sockets using echo. Thats why I am thinking about lua scripts. It seems that mpv autoload the lua scripts so they can be called by keystrokes o…
Nacho B
  • 1,573
  • 1
  • 12
  • 16
0
votes
1 answer

Jump by percentages (10%, 20%, 30%...) in MPV player, like on YouTube?

I'd like to reproduce this behavior: Pressing the number keys 1-9 would automatically skip ahead in the current video to the corresponding percentage of time. So pressing "4" would jump to the 40% mark of the video, regardless of specific time…
colorful-shirts
  • 238
  • 1
  • 8
0
votes
0 answers

VLC's video quality much worse than MPV's

For several sources the video quality produced by VLC is much worse than the one produced by mpv. It looks as if this is an issue regarding interlacing, but I am not sure. At least, playing around with options of the deinterlacing menu did not…
Max Görner
  • 674
  • 7
  • 16
0
votes
0 answers

Windows mpv won't open via ssh

I'm trying to run a bat from Linux via ssh to open a video in the mpv player on Windows 10: video.bat u/echo off mpv c:\video.mp4 pause If I run this .bat from the windows machine itself it runs it fine and opens the mpv player window and shows…
PlayerWet
  • 419
  • 5
  • 18
0
votes
0 answers

the mpv videoplayer does not go to the geometry position in ubuntu22.04

I want to run the mpv from a python3 program. In ubuntu21 the geometry worked perfect, in ubuntu22.04 it does no longer. The size of mpv window works correct, but geometry no more. I check it from terminal and this is the same (normal, because i…
user3367867
  • 565
  • 1
  • 7
  • 19
0
votes
0 answers

('mpv option does not exist', -5, (, b'stream-record', b'modules//radio_data/5170426825_1662195308.512175.ts'))

File "/usr/local/lib/python3.10/site-packages/mpv.py", line 550, in init mpv_set_option_string(self.handle, k.replace('', '-').encode('utf-8'), istr(v).encode('utf-8')) File "/usr/local/lib/python3.10/site-packages/mpv.py", line 102, in…
0
votes
1 answer

Command not executed on if statement being true

So I'm writing a simple program in Python that checks active window ID and in this program I have an if statement inside a while True loop that checks if the active window ID matches the expected window ID. Here's the code: import os,…
reallySmooll
  • 15
  • 1
  • 5
0
votes
1 answer

Importing mpv module in my python code gives error

I was trying using the mpv bindings for python but whenevery I try execute import mpv it gives the following error: Traceback (most recent call last): File "e:\Programming\Web2Desk\t1.py", line 1, in import mpv File…
0
votes
1 answer

How to draw button or widget upon QWidget using python-MPV on windows?

I use this library https://github.com/jaseg/python-mpv and PySide6 to embed MPV in container (QWidget) in python. I want to draw the button (or something else maybe qlabel for example?) over QWidget (embedded mpv) on top of player but how can I do…
MRX
  • 5
  • 4
0
votes
1 answer

How to make a keybind work unconditionally in mpv?

The keys 9 and 0 are, by default, volume- and volume+, respectively. I often use this stats screen to check filenames and such: Unfortunately, if I try to increase the volume too quickly after checking the filename, 0 instead changes the stats page…
mossymountain
  • 175
  • 1
  • 7
0
votes
0 answers

How to watch video without downloading (like mpv) using yt-dl python

I tried using How to to play videos from the web using Opencv and python and Is it possible to stream video from https:// (e.g. YouTube) into python with OpenCV? But didnt work This below worked os.system('mpv some_url') This uses mpv to play…
Devil Ishere
  • 185
  • 1
  • 13