Reputation: 221
I have my video in the following locaton with spaces on Windows.
"c:\GoogleDrive\CMD Scripts_video\test.mp4"
MPV function in Lua script returns cut path with special characters ~1
video_path = mp.get_property("path")
"c:\GOOGLE~1\CMDSCR~1_video\test.mp4"
How can I get on Windows full path to use it as input for FFMPEG in my LUA script?
Thank you Peter
Upvotes: 0
Views: 1234
Reputation: 974
8.3-style path is absolutely valid in Windows.
The error is raised by wrong quotation.
The correct way to invoke external command on Windows is the following:
""C:\GoogleDrive\CMD Scripts_video\files\FFmpegAviSynthPlus64\ffmpeg.exe" -v warning -i "c:\GOOGLE~1\CMDSCR~1\test.mp4" out.avi"
Please note quotes around argument, quotes around executable file path and quotes around the whole command (yes, Windows does need it).
os.execute([[""program" "arg1" "arg2""]])
Upvotes: 1