Log in

View Full Version : MPC-HC Add Audio File via API


MysteryX
23rd July 2019, 09:05
Let's say I want to open a video in MPC-HC with a separate audio file.

I can use
- "File"->"Open File/URL". Put the audio file in the second field.
- "/dub" command-line parameter
- Place the audio file next to the file being played so it auto-loads

Is there a way to do it via API, either via the C API or via the Web API?

Klaus1189
23rd July 2019, 10:46
Put audio and videofile with the same filename in one path, double click videofile, audiofile is automatically loaded in MPC-BE, should be the same for MPC-HC.

MysteryX
23rd July 2019, 13:09
Put audio and videofile with the same filename in one path, double click videofile, audiofile is automatically loaded in MPC-BE, should be the same for MPC-HC.
That's the 3rd option I wrote but doesn't answer the question

stax76
23rd July 2019, 15:58
I was just reading MpcApi.h and what you are looking for is not available it seems.

Klaus1189
23rd July 2019, 17:02
Sorry, didn‘t ead it carefully, only looked at the question. What is it for?

stax76
23rd July 2019, 18:03
Sorry, didn‘t ead it carefully, only looked at the question. What is it for?

Sometimes some people need to automate a player for instance by launching it with command line arguments or remote control a running player, there are many reasons for that, in my case StaxRip passes command line arguments to the player setting track id/index or track file name so people can preview what they are about to encode.

MysteryX has similar reasons.

Find a technology overview here:

https://github.com/stax76/mpv.net/wiki/Alternative-Players