-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upcoming mpv release is incompatible due to API change #261
Comments
Thanks for letting us know @wiiaboo I have had an initial look at https://github.com/mpv-player/mpv/blob/master/DOCS/man/ipc.rst and it looks like moving to input-ipc-server would require moving to JSON and might also involve having to work around some UTF-8 quirks and might have some additional issues working on Windows, so not a straightforward switch from one command line option to another. Ideally we would want any change to be done in a way which maintained backwards compatibility with mpv >= 0.6.2 (which as per https://syncplay.pl/guide/install/ is the earliest version of mpv we say we support). |
I don't think it's sane to still support that old an mpv. At that point, still supporting mplayer/mplayer2 makes as much sense. Might as well just create a new mpv thing and that should be supported since at least the moment named pipes were supported in Windows (~v0.17.0). I've been using a python script to send URLs from the browser to a single-instance mpv for years now, so named pipes should be fine. Not sure about two-way communication though. My script is one-way only: #!python3
#!/usr/bin/env python3
#mpv-append.pyw
import sys, subprocess, shlex, codecs, os
from time import strftime
import argparse
log_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'umpv.log')
parser = argparse.ArgumentParser(prefix_chars='-/')
parser.add_argument('mpvopts',
help='opts passed to mpv if already open',
nargs='+')
parsed_args = parser.parse_args(sys.argv[1:])
with codecs.open(log_path, 'a', 'utf-8') as log_file:
if len(sys.argv[1:]) > len(parsed_args.mpvopts):
log_file.write('[{}] {} ⇒ "{}"\n'.format(strftime("%Y-%m-%d %H:%M:%S"),
sys.argv[1:], '" "'.join(parsed_args.mpvopts)))
else:
log_file.write('[{}] "{}"\n'.format(strftime("%Y-%m-%d %H:%M:%S"),
sys.argv[1:], '" "'.join(parsed_args.mpvopts)))
try:
f = open(r'\\.\pipe\mpvsocket', 'r+b', 0)
for arg in parsed_args.mpvopts:
if not arg.startswith('-'):
subprocess.run(["echo", "loadfile", arg.replace('&','^&'),
"append-play"], stdout=f, shell=True)
except OSError:
args = ['mpv.exe', '--profile=umpv', '--input-ipc-server=\\\\.\\pipe\\mpvsocket']
args += parsed_args.mpvopts
subprocess.Popen(args) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It's out on git master and on the next release: mpv-player/mpv@b8daef5 |
Thanks for the notification @wiiaboo - hopefully moving over to JSON won't be too tricky. |
Syncplay
|
I've now added a notice to the syncplay.pl homepage advising people to stick with mpv 0.6.2 – 0.32.0 for now. |
Preferably 0.32.0. |
I've adjusted the issue a bit to reflect its importance and urgency. |
* Separate mpv from mplayer, increase min mpv ver to >= 0.17, refactor * Further separation of mpv from mplayer * Fix reference to isASCII * Add iwalton3's Python MPV JSONIPC library (Apache 2.0) * Move to JSON IPC API for mpv using iwaltons3's library (#261) * Add empty init in Python MPV JSONIPC to make py2exe happy * Use managed version of Python MPV JSONIPC to improve initialisation reliability * Set mpv min version to >=0.29.0 to ensure compatibility * Allow mpv >=0.23.0 based on daniel-123's tests * Update mpv compatibility message * Revert to old OSC compat message * Removed mpv option that's no longer used afer switching to IPC. * Update python-mpv-jsonipc to v1.1.11 * Use python-mpv-jsonipc's mpv quit handler * Shorten mpv paused/position update message Co-authored-by: daniel-123 <wrobel.dan@gmail.com>
…Syncplay#310) * Separate mpv from mplayer, increase min mpv ver to >= 0.17, refactor * Further separation of mpv from mplayer * Fix reference to isASCII * Add iwalton3's Python MPV JSONIPC library (Apache 2.0) * Move to JSON IPC API for mpv using iwaltons3's library (Syncplay#261) * Add empty init in Python MPV JSONIPC to make py2exe happy * Use managed version of Python MPV JSONIPC to improve initialisation reliability * Set mpv min version to >=0.29.0 to ensure compatibility * Allow mpv >=0.23.0 based on daniel-123's tests * Update mpv compatibility message * Revert to old OSC compat message * Removed mpv option that's no longer used afer switching to IPC. * Update python-mpv-jsonipc to v1.1.11 * Use python-mpv-jsonipc's mpv quit handler * Shorten mpv paused/position update message Co-authored-by: daniel-123 <wrobel.dan@gmail.com>
…Syncplay#310) * Separate mpv from mplayer, increase min mpv ver to >= 0.17, refactor * Further separation of mpv from mplayer * Fix reference to isASCII * Add iwalton3's Python MPV JSONIPC library (Apache 2.0) * Move to JSON IPC API for mpv using iwaltons3's library (Syncplay#261) * Add empty init in Python MPV JSONIPC to make py2exe happy * Use managed version of Python MPV JSONIPC to improve initialisation reliability * Set mpv min version to >=0.29.0 to ensure compatibility * Allow mpv >=0.23.0 based on daniel-123's tests * Update mpv compatibility message * Revert to old OSC compat message * Removed mpv option that's no longer used afer switching to IPC. * Update python-mpv-jsonipc to v1.1.11 * Use python-mpv-jsonipc's mpv quit handler * Shorten mpv paused/position update message Co-authored-by: daniel-123 <wrobel.dan@gmail.com>
mpv-player/mpv@f57f13c
No date for the removal of
input-file
, but it's finally being deprecated.The text was updated successfully, but these errors were encountered: