Skip to content
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

JSON IPC and multiple external-file #4394

Closed
maiorfi-at-innovactive opened this issue May 2, 2017 · 6 comments
Closed

JSON IPC and multiple external-file #4394

maiorfi-at-innovactive opened this issue May 2, 2017 · 6 comments

Comments

@maiorfi-at-innovactive
Copy link

It seems that this subject has been already discussed here and there, but I did not spot yet how to properly format json ipc message related to multiple external-file options.

I would like to use lavfi-complex property in order to get a 2x2 tiling with a loadfile command and 3 external-file items.

Thanks!

@ghost
Copy link

ghost commented May 2, 2017

You have to set this as a mpv_node with the format set to MPV_FORMAT_NODE_ARRAY. Each array item would be a string with the filename of an external file.

It's not possible to set this as a simple string, because filenames could contain , (or any other separator that could be used).

@ghost ghost added the meta:question label May 2, 2017
@ghost ghost closed this as completed May 2, 2017
@maiorfi-at-innovactive
Copy link
Author

Sorry for reiterating on this, but I'm still wondering whether it is possible (and, in that case, how) express a mpv_node with MPV_FORMAT_NODE_ARRAY using JSON-IPC notation.

Thanks.

@ghost
Copy link

ghost commented May 2, 2017

sure, if you use json IPC, it should accept a json array of strings.

@maiorfi-at-innovactive
Copy link
Author

maiorfi-at-innovactive commented May 3, 2017

Indeed I thought it should have been working with any of following two ways, but it didn't (below there are 2 request commands interleaved with corresponding reply event):

{ "command": ["set_property", "external-file", ["file1","file2"] ] }
{"error":"invalid parameter"}
{ "command": ["set_property", "external-file", "file1", "file2" ] }
{"error":"invalid parameter"}

Any suggestion?

ghost pushed a commit that referenced this issue May 3, 2017
Fixes the issue pointed out in #4394.
@ghost
Copy link

ghost commented May 3, 2017

That should have worked, but didn't because it restricted nesting so that passing the file array was not possible. I fixed it now.

@maiorfi-at-innovactive
Copy link
Author

Great, thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant