Closed CrendKing closed 1 month ago
@kasper93 Thanks to your recent contributions about building mpv on Windows (e.g. https://github.com/mpv-player/mpv/commit/112fa549beb52ab3d75999c8d8a82936e13001c4), I can now contribute myself with ease.
If interested, I created PR at https://github.com/mpv-player/mpv/pull/14312.
For documentation purpose, I still encounter some issues when I try to build mpv on Windows after following the up-to-date instructions, specifically the "Native Compilation with Clang (Windows SDK Build)" route:
prefix=D:/vapoursynth/current/sdk
includedir=${prefix}/include/vapoursynth
libdir=${prefix}/lib64
Name: vapoursynth Description: VapourSynth Version: 68 Libs: -L${libdir} -lVapourSynth.lib Cflags: -I${includedir}
5. [LuaJIT requires `sed` to configure](https://github.com/mesonbuild/wrapdb/blob/e9e0fa18b4c01acd8f5b0d9fd375cde9994a50c3/subprojects/packagefiles/luajit/src/meson.build#L27), which is not available on Windows by default. Since Git on Windows includes it, maybe a brief mention to change `$env:PATH` like `$env:PATH += ';<git_directory>/usr/bin'`?
I agree with you on those points.
Developer PowerShell for VS
or something. Windows Terminal automatically adds detected VS installations to its selection.Feel free to send PR with your suggestions, it is good to have someone else to validate the workflow and identify issues like you did.
Feel free to send PR with your suggestions, it is good to have someone else to validate the workflow and identify issues like you did.
Here you are: https://github.com/mpv-player/mpv/pull/14315
Expected behavior of the wanted feature
Currently the
vapoursynth
video filter does not accept any argument for passing arbitrary user data. This still limits what the VS script can do.Ideally,
vapoursynth
can have anuser-data
option that contains string value. mpv passes that value to the VS script just likecontainer_fps
and others. There could be a reasonable cap of the data size like 100. Once the VS script gets the data, it can do all sorts of data extraction and transformation.Another benefit is that instead of mpv always have to catch up to user needs for this filter, with this users can just pass whatever needed themselves, thus future requests to add more properties can reduce.
Alternative behavior of the wanted feature
Main reason I'm asking this that the current alternatives are lacking. I've tried
winapi
for Windows), set environment variable from Lua side, thenmp.commandv('set', 'vf', 'vapoursynth=mpv.vpy')
. Then in mpv.vpy, try to retrieve that data withos.environ
. I noticed that even the variable is correctly present in Process Explorer,os.environ
doesn't have that variable. I guess even thoughos.environ
says it captured the mapping first time theos
module is imported, mpv probably loads VapourSynth and thus theos
module before my Lua script, so changing the process environment variables in Lua doesn't work.C:\test
), then load file in VS script. This works, but then 1) someone has to cleanup that file; 2) what happens if multiple mpv instances with my scripts concurrently access that file? Ideally the file name should have the current process ID in it to avoid collision, but then that further complicates the task.Log File
No response
Sample Files
No response