Severe Bug: Inconsistent Behavior in VLC Remote (not documented)
Posted: 17 Oct 2016 13:54
Two Major Problems in VLC 2.2.4: This thread is dealing with behavior *only*
Okay, let me try to be brief.VLC has a remote interface (well multiple ones). However they do not behave with *any* consistency. This is sort of a short version of what I've been through the past few weeks...
For standard rc, we'll connect to our local machine via port 1234. Now we'll issue some commands from the VLC documentation:
Okay, we've established that doesn't work so well with a typical network protocol. The problem is easy to fix: Change the VLC documentation. Well, actually it may not be so simple.
Well, okay maybe DBus is the way to go. Yeah, VLC support MPRIS, so that should be easy. I'm new to DBus but lemme give it a shot.
Okay, maybe I did something wrong, nobody ever got back to me except to say "you're doing it wrong" which was about as helpful as posting, "I is cat, can I haz milk." Well, I double, triple, quadruple, and hex-something-le checked MPRIS spec, don't see none wrong, but I'll stand corrected. Still, couldn't use it so onwards...
Now we'll try using UNIX sockets. It is cleaner than the telnet method and make more sense for a local remote in any case (although DBus seemed the *best* solution). In this case /tmp/vlc.sock will be the socket to create.
Great, so the documentation for the remote module *is* right, wait, no, oh, aaaaaargh, slam keyboard... Sooooo....
In conclusion...
Commands, Documentation
Rate:
Dbus(y), Telnet(n), UNIX Socket(n)
Faster/Slower:
Dbus(n), Telnet(y), UNIX Socket(y)
Commands, Reality
Rate:
Dbus(n), Telnet(n), UNIX Socket(n)
Faster/Slower:
Dbus(n), Telnet(n), UNIX Socket(y)
"Reality is string than Documentation" -- nonzyro.
So, that's my report. Don't know what to suggest. Changing the documentation would be easier, but changing the code would probably be for the best. The code need only have functionality added, nothing removed so that compatibility would be maintained.
Okay, let me try to be brief.VLC has a remote interface (well multiple ones). However they do not behave with *any* consistency. This is sort of a short version of what I've been through the past few weeks...
For standard rc, we'll connect to our local machine via port 1234. Now we'll issue some commands from the VLC documentation:
Code: Select all
$ echo "pause" | localhost 1234
-- Works, pause/play toggles
$ echo "seek +2" | localhost 1234
-- Works, no problems
$ echo "slower" | localhost 1234
-- FAILS
$ echo "faster" | localhost 1234
-- FAILS
$ echo "rate 0.5" | localhost 1234
-- Works, but completely UNDOCUMENTED
Well, okay maybe DBus is the way to go. Yeah, VLC support MPRIS, so that should be easy. I'm new to DBus but lemme give it a shot.
Code: Select all
$ dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
-- Works, yaay. Cool
$ dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek int64:"-10000000"
-- Works, yay. Cool
$ dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Rate double:"0.5"
-- FAIL. Method "Rate" with signature "d" on interface "org.mpris.MediaPlayer2.Player" doesn't exist
Now we'll try using UNIX sockets. It is cleaner than the telnet method and make more sense for a local remote in any case (although DBus seemed the *best* solution). In this case /tmp/vlc.sock will be the socket to create.
Code: Select all
$ echo "pause" | nc.openbsd -U /tmp/vlc.sock
-- Works, no errors. Yay, good.
$ echo "rate 0.5" | nc.openbsd -U /tmp/vlc.sock
-- FAIL, Unknown command. Lol, GTFO user.
$ echo "slower" | nc.openbsd -U /tmp/vlc.sock
-- Works, no errors, WTH dude?
In conclusion...
Commands, Documentation
Rate:
Dbus(y), Telnet(n), UNIX Socket(n)
Faster/Slower:
Dbus(n), Telnet(y), UNIX Socket(y)
Commands, Reality
Rate:
Dbus(n), Telnet(n), UNIX Socket(n)
Faster/Slower:
Dbus(n), Telnet(n), UNIX Socket(y)
"Reality is string than Documentation" -- nonzyro.
So, that's my report. Don't know what to suggest. Changing the documentation would be easier, but changing the code would probably be for the best. The code need only have functionality added, nothing removed so that compatibility would be maintained.