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
14
votes
3 answers

Pause programmatically video player mpv

I would like to know if there is a way to send a message to a running process on linux ? For example, is it possible to programmatically "pause" a video launched with mpv.
bob dylan
  • 989
  • 2
  • 10
  • 26
11
votes
3 answers

MPV player time format HH:MM:SS or HH:MM:SS:mmm

does anybody know, if it is possible to set default displayed time format including milliseconds in mpv.conf ? Now I need click on time to switch to millisecnds, because option ,,timems'' from manual https://mpv.io/manual/master/ doesn't…
user2432166
  • 151
  • 1
  • 8
6
votes
3 answers

Get full path of currently playing file in mpv

Is there a way to get the full path of the currently playing file from mpv, after mpv has been launched? I saw this question but it doesn't show how to get properties, just how send commands. Edit: by 'get the full path', I mean from…
Sean Breckenridge
  • 1,932
  • 16
  • 26
5
votes
2 answers

mpv doesn't recognise ytdl_path as a key

I'm trying to use yt-dlp rather than youtube-dl due to the bottlenecking on download speeds in youtube-dl but I can't get it to work. My mpv.conf file looks like: script-opts=ytdl_hook-ytdl_path=/usr/local/bin/yt-dlp When trying to get mpv to run I…
tcotts
  • 170
  • 1
  • 10
5
votes
0 answers

Get raw video frames from MPV (callback or render to specific memory address)

There is mpv player which is a fork of old MPlayer. It can be built as library and has API to render video frames to many video outputs such as OpenGL surface, Direct3D, SDL and others. I am trying to use this library in my current project to decode…
serg.v.gusev
  • 501
  • 4
  • 13
4
votes
1 answer

Formatting fzf multi-select output for mpv

The following works: # play file1 and then file 2: mpv "file1" "file 2" # use fzf to select a file and play that file: mpv "$(fdfind . /path/to/Music | fzf)" Now fzf -m allows for multi-select. However the following doesn't work: mpv "$(fdfind .…
Inspired_Blue
  • 2,308
  • 3
  • 15
  • 21
4
votes
1 answer

Calling unmanaged function which takes a pointer to pointer parameter

I am trying to call a function in C from my .Net Core application. To dive right in, the C function comes from libmpv render.h and the head of the functions looks like this: int mpv_render_context_create(mpv_render_context **res, mpv_handle *mpv,…
J.Paravicini
  • 882
  • 12
  • 39
4
votes
0 answers

Qt video playback with libmpv makes QtWebEngine jquery content unsmooth - Ubuntu

I have a project that uses libmpv with the opengl widget (as per the examples that come with libmpv) along with a QtWebEngine widget that displays information, graphics and animations (a scrolling ticker for example). I found that of the video…
themusicalduck
  • 105
  • 1
  • 7
3
votes
1 answer

How do you load MPV Lua scripts with the C Plugin?

After realizing it is nearly impossible to find help on getting keybindings to work with the C plugin in MPV (Possible to allow key bindings with MPV C API when no video (GUI) is being shown?), I decided to learn some Lua to help with the cause.…
Netsu
  • 1,399
  • 1
  • 7
  • 18
3
votes
1 answer

How can I set the default playback speed in mpv?

I want my mpv player to start with a default speed of 1.33. Is there a way to achieve it? How can I configure mpv to always start with a default playback speed of, say 1.5, 1.33, etc.?
Barun Ghosh
  • 61
  • 2
  • 7
3
votes
0 answers

mpv linux changing video window size

I'm streaming video using mpv on my ubuntu using this command line mpv http://myserverUrl:1234 --input-ipc-server=/tmp/mpvsocket -v --geometry=400x320+20+30 It is streaming the video and I managed to stop using echo '{ "command": ["set_property",…
jen1982
  • 67
  • 2
  • 11
3
votes
0 answers

Qt5 overlaying widgets over a native window widget

In an application I'm writing for Linux, I have a QWidget backed by a native window (video, rendered to via libmpv) on which I want to overlay another (transparent) QWidget, which will be used for drawing over the video. I tried placing them both…
sagara
  • 31
  • 2
2
votes
1 answer

How to get `mpv --stream-record` to use icecast title as file name?

Is it possible to get mpv to dump a stream to separate files based on the current icy-title value when using --stream-record with an icecast stream? man mpv only mentions using a fixed file name with --record-file, --stream-record --dump-cache. If…
ccpizza
  • 28,968
  • 18
  • 162
  • 169
2
votes
1 answer

How to set the playback speed in MPV through the command line

How would you set the playback speed to a specific value in MPV using the builtin command line of MPV? EDIT: I'm not talking about the --speed argument when launching the program through the terminal.
Yiannis128
  • 138
  • 1
  • 2
  • 9
2
votes
0 answers

mpv restart RTP stream after server stops and starts

I have a local server that starts two GStreamer pipelines to my computer, but it needs to stop and start the streams occasionally. I am using a lavfi-complex to stack the streams as well. When the server stops the stream and starts again (to the…
zih301
  • 115
  • 1
  • 2
  • 7
1
2 3 4 5 6 7