MediaInfoLib icon indicating copy to clipboard operation
MediaInfoLib copied to clipboard

mediainfo does not correctly handle filenames with embedded %-characters

Open RobertKrawitz opened this issue 1 year ago • 1 comments

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.

RobertKrawitz avatar Jan 29 '24 15:01 RobertKrawitz

Definitely a lot of potential issues like this one in this super old code :(.

JeromeMartinez avatar Jan 29 '24 15:01 JeromeMartinez