MediaInfoLib
MediaInfoLib copied to clipboard
mediainfo does not correctly handle filenames with embedded %-characters
The CLI does not properly handle filenames with embedded % (percent) characters. If the filename contains two (probably an even number) of such characters, all characters between the two are removed in the output:
$ mediainfo "--Output=General;%Duration% %CompleteName%\n" test.mp4 test_%TEST%.mp4
133700 test.mp4
964134 test_.mp4
If the filename contains a single percent character (or perhaps any odd number), the CLI hangs. My use case is that I use this to delimit (short) embedded comments in filenames.
This is using the latest git main.
Definitely a lot of potential issues like this one in this super old code :(.