How to pass multiple files as input on Windows?
4or5trees opened this issue · 2 comments
I am trying to pass multiple files as argument in PowerShell on Windows 10, but it doesn't seem to work with the *.mkv
glob pattern mentioned in https://lav.io/notes/videogrep-tutorial/
> videogrep --input *.mkv --search 'test' --search-type fragment --output test.mp4
No subtitle file found for *.mkv
No results found for test
I've tried it with a variety of different approaches but it never seems to parse my input as a Python list:
> videogrep --input test1.mkv,test2.mkv,test3.mkv --search "test" --output test.mp4
No subtitle file found for test1.mkv,test2.mkv,test3.mkv
No results found for test
> videogrep --input "test1.mkv, test2.mkv, test3.mkv" --search "test" --output test.mp4
No subtitle file found for test1.mkv,test2.mkv,test3.mkv
No results found for test
> videogrep --input "'test1.mkv', 'test2.mkv', 'test3.mkv'" --search "test" --output test.mp4
No subtitle file found for test1.mkv,test2.mkv,test3.mkv
No results found for test
> videogrep --input "['test1.mkv', 'test2.mkv', 'test3.mkv']" --search "test" --output test.mp4
No subtitle file found for test1.mkv,test2.mkv,test3.mkv
No results found for test
I've also tried passing the folder name (introduced in this PR: #49 ) but it did not work:
> videogrep --input "C:\Users\User\MyTestPath\test" --search "test" --output test.mp4
No subtitle file found for C:\Users\User\MyTestPath\test
No results found for test
Contents of folder (.mkv
files and their accompanying .json
transcription files):
test1.json
test1.mkv
test2.json
test2.mkv
test3.json
test3.mkv
My existing workaround is a simple loop over the folder to individually search files, which works fine because the tool is very fast.
This tool is super fun! Thank you for all your hard work
Glad you're liking it, and thanks for sending bug reports! I'm aware of this issue but not able to look into it for a bit (I don't currently have access to my windows machine). In the meantime, I think it should work if you use spaces rather than commas, like this:
videogrep --input test1.mkv test2.mkv test3.mkv --search "test" --output test.mp4
Closing this for now, because it's a duplicate of #101
Confirmed to work, I can't believe I didn't try that. Thank you!