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

Issue with [ and ] characters in filenames #171

Open
thegreatgunbantoad opened this issue Jul 21, 2024 · 3 comments
Open

Issue with [ and ] characters in filenames #171

thegreatgunbantoad opened this issue Jul 21, 2024 · 3 comments

Comments

@thegreatgunbantoad
Copy link

Bug/Issue Description:
Tool does not like the filenames my Camera produces, though to be fair they are a certain kind of evil:
00.08.00-00.16.00[R][0@0][0].mp4
Renaming the file something less atrocious does resolve the issue but I have 188 files, so going to have a script a rename.

Required Information:

Provide a full copy of the command line options you are using, and add --verbosity debug, for example:
dvr-scan -i ".\00.00.00-00.08.00[R][0@0][0].mp4" -r --verbosity debug
INFO: controller.parse_settings(): DVR-Scan 1.6.1
DEBUG: controller.parse_settings(): User config file not found.
ERROR: controller._preprocess_args(): Error: Input file does not exist:
.\00.00.00-00.08.00[R][0@0][0].mp4

Expected Behavior:
It to open region editor

Computing Environment:
Windows 11 canary channel build 26252
Python 3.12.4
OpenCV 4.10.0

Additional Information:
none

@Breakthrough
Copy link
Owner

Breakthrough commented Jul 22, 2024

The issue arises from the [ and ] characters, which need to be "escaped" by surrounding them with square brackets like [this]. Could you try running the following instead?

dvr-scan -i ".\00.00.00-00.08.00[[]R[]][[]0@0[]][[]0[]].mp4" -r --verbosity debug

This replaces each [ with [[], and each ] with []]. Sorry this isn't documented anywhere, I'll add a task to add this information.

For Windows this is working as intended, as all input paths are globbed to allow wildcard expansion. I can also look at adding a config option to disable glob expansion, if you think that it would be helpful.

Thanks for the report, this is good to know.


Tasks:

  • Document globbing behavior
  • Investigate if we should avoid performing glob on Linux
  • Investigate adding config option to disable globbing and what defaults should be for each platform

@Breakthrough Breakthrough added this to the v1.7 milestone Jul 22, 2024
@thegreatgunbantoad
Copy link
Author

thegreatgunbantoad commented Jul 23, 2024

Firstly thank you for the response and that it was so swift. Cracking tool btw!

Sorry, I missed your response to this.

Yes:
dvr-scan -i ".\00.00.00-00.08.00[[]R[]][[]0@0[]][[]0[]].mp4" -r --verbosity debug
works great

I assumed (wrongly) that since that earlier command had failed a wild card of:
dvr-scan -i *.mp4 -r --verbosity debug
also would, but you're right it does work fine so I needent have done a renaming script.

Again, can't gush enough, great tool.

@Breakthrough
Copy link
Owner

Breakthrough commented Jul 24, 2024

Thanks for the feedback, glad you're finding the tool useful :)

If you're processing several videos at once, be sure to read through this section on handling multiple videos in the docs. It has some additional info on how concatenation happens, and explains what order files are processed in.

@Breakthrough Breakthrough modified the milestones: v1.7, v1.6.2 Nov 24, 2024
@Breakthrough Breakthrough changed the title Filename issues Issue with [ and ] characters in filenames Dec 7, 2024
@Breakthrough Breakthrough pinned this issue Dec 7, 2024
@Breakthrough Breakthrough modified the milestones: v1.6.2, v1.7 Dec 8, 2024
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

2 participants