mpc-like control interface for mpv - Programming On Unix
Users browsing this thread: 2 Guest(s)
|
|||
Been writing this for the past couple of days. Mostly works though there's several things I still need to do. Feedback wanted.
|
|||
|
|||
I knew mplayer and mpv had socket interface to interact with but it's the first time I see them well used.
Great job, I'll test it as soon as I can. |
|||
|
|||
super cool I'm a fan.
edit: when home today my plan is to take this and combine it with the mpc portion of my panel to make the controls work for either/both depending on if mpv is running. hype |
|||
|
|||
Tested it.
It works great but you forgot to mention that mpv needs to be started with: Code: --input-unix-socket=/tmp/mpvsocket |
|||
|
|||
|
|||
My bad guys, I'll update it when I get home.
|
|||
|
|||
*sniff* LEAVE. WILDEFYR. ALONE!
|
|||
|
|||
|
|||
Well the readme has been updated now and should be at a much better standard. Probably going to leave this as a 'stable' version for now seeing as I've implemented speed control properly now and cleaned a bit more of the code up. Feel free to send me pull requests for any of the stuff in the TODO section.
|
|||
|
|||
You can now append files to the current playlist or start a new mpv instance altogether! You can also view the tracks in the playlist with another command.
|
|||
|
|||
Finally got an excuse to try this with my new two monitor setup. That and I have issues with fixed (sticky) windows in 2bwm, so being able to control it without focusing it is great.
However I wanted to ask if it's at all doable to add a fast forward/rewind / jump to minutes feature? That's way more convenient than seconds for movies. I'm not sure if requests are a thing, but I thought I'd ask. Otherwise, it's quite nifty. |
|||
|
|||
Yeah I've been meaning to hack that out actually... Not sure how I'd do it for timestamps but I am looking to probably make it easier to jump through time a little bit easier.
EDIT: okay I've a basic phraser to jump through a track somewhat more easily, just append 's', 'm' or 'h' on the end of the number, like so: Code: mpvc -t 10m I'm looking to implement a phraser to take absolute timestamps for the function "setTimeAbsolute". |
|||
|
|||
Just tried it, fantastic. Except it gave me an error.
Code: sed: -e expression #1, char 71: unterminated `s' command |
|||
|
|||
Yeah I've had some issues with that hacky method of returning metadata about the track. Hard to diagnose remotely though. If you could run a shell trace for me and send it to me that'd be great.
|
|||
|
|||
Okay, file is the nixers-workflow video, did set -x and strace, and here is all the output: https://paste.teknik.io/Raw/DQaXP
|
|||
|
|||
Can you link me the exact file?
|
|||
|
|||
I do believe I got it from here: http://lab.xero.nu/nixers-workflow.webm
Sorry about the delay, I'm failing at setting these monitors up. EDIT: Until you asked that I didn't even think to try another file due to being preoccupied. It works on movies just fine. Great work. |
|||
|
|||
Can you give me your sed version along with your source (i.e. bsd sed, gnu sed, etc)? Adding the file didn't give me any error.
|
|||
|
|||
Code: sed (GNU sed) 4.2.2 The source files for sed? |
|||
|
|||
Well that's my sed version too. I can't reproduce this at all so I can't fix it :(
|
|||
|
|||
Yeah, I re-downloaded the workflow video and it still did it. Don't worry about it, I'm sure I'm the only fucker with this problem -- I always get the weird bugs that only I have. It hasn't had any problems with any of the movies/shows I've watched since then.
|
|||
|
|||
Still using this, it's great. I was wondering if it's possible to remove things from the playlist?
|
|||
|
|||
Yes, there is a way! Using the -d or --delete option with the number of the track, or using the mpc compatibility layer with 'mpvc del $NUM'. There's no way to remove items based on what their filename is though for example.
|
|||
|
|||
Awesome, I somehow missed that. Occasionally I accidentally add something twice, I'd rather just remove it then skip it.
|
|||
|
|||
I actually just changed the GNU flags for this to '-r | --remove' and now use '-j | --track' and '-J | --tracknum' instead.
|
|||