quietvoid / dovi_tool

dovi_tool is a CLI tool combining multiple utilities for working with Dolby Vision.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid value error when trying to export data

Dendraspis opened this issue · comments

Hello,

when the --data parameter gets a path name, that includes a comma, you get a error: invalid value for '--data <data>' message. This becomes a huge issue, when you try to pass the full path, for example because you call dovi_tool from a script or so:

dovi_tool.exe export --data "level5=MetaL5.json" --input Meta.bin ✔️
dovi_tool.exe export --data "level5=Meta, only L5.json" --input Meta.bin
dovi_tool.exe export --data "level5=A.\Path\To\MetaL5.json" --input "A.\Path\To\Meta.bin ✔️
dovi_tool.exe export --data "level5=A.\Glorious, Path\To\MetaL5.json" --input "A.\Glorious, Path\To\Meta.bin

Could be related to the usage of , as separator between keys.

I don't think there's anything I can do about it.
It's handled by clap's parser and it doesn't seem to support escaping inside values.

The easiest solution is to avoid using commas in paths.
Otherwise it wouldn't be possible to use --data level5,scenes if the delimiter was removed/changed.