Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

siikamiika/mpv-python-ipc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mpv-python-ipc

A cross-platform alternative to JSON IPC.

Uses a hack with the lua event client-message. Sending script_binding some_command to stdin with input-file=/dev/stdin triggers a client-message, that gets some_command in arguments. That's where we put stuff like get_property.

Usage

from mpv_python_ipc import MpvProcess


mp = MpvProcess()
print(mp.get_property("idle"))

Note

Named pipe IPC support has been added to mpv master. This project will probably eventually switch to using it and JSON IPC instead of the ugly hack it currently uses.

Update: --input-file=/dev/stdin support was removed from mpv. Use Python MPV JSONIPC instead.

How to port existing code: https://github.com/siikamiika/scripts/commit/4809a5a9b85b2e2a1cea1f0680c4a793d3b655a2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published