Posts: 16
Threads: 2
Joined: Nov 2017
(26.11.2017, 18:56)Selur Wrote: Okay, didn't apply it to the values of the encoding settings, doing so now.
Cu Selur
I think you misunderstood, i wasn't asking for that.
I was just 'thinking aloud' about possible applications and problems applying it there would have and how to possibly deal with those... Thus my later suggestion for optional removal of trailing post-decimal-point zeroes, instead.
Posts: 10.976
Threads: 56
Joined: May 2017
Quote:Thus my later suggestion for optional removal of trailing post-decimal-point zeroes, instead.
Which isn't a good idea unless you always make sure you use a specific language when using MediaInfo.
German: 1,000 = 1 and 1.000 = 1 000
US: 1.000 = 1 and 1,000 = 1 000
-> letting the user specify replacements is the more generic and saver way.
Cu Selur
Posts: 16
Threads: 2
Joined: Nov 2017
(26.11.2017, 20:04)Selur Wrote: Quote:Thus my later suggestion for optional removal of trailing post-decimal-point zeroes, instead.
Which isn't a good idea unless you always make sure you use a specific language when using MediaInfo.
German: 1,000 = 1 and 1.000 = 1 000
US: 1.000 = 1 and 1,000 = 1 000
-> letting the user specify replacements is the more generic and saver way.
Looks like there might not be a simple fits-all solution to the problem, however having the user specifying replacements here is still the wrong way to go since: 'scenecut-bias=0.05' > 'scenecut-bias=05' if Replacements are ".000%#.00%#.0%".
This is not something the user can themselves address, since they are unable to search for line breaks or word boundaries. Also to remove the excess zeroes in lines like: 'ipratio=1.40 pbratio=1.20 qcomp=0.80' using Replacements, the user would have to list out all possible number combinations one by one as they have no access to wildcards.
Did some experimenting to figure out a RegEx that would work reliably in all likely usage scenarios and here's the result:
Find: ([\.|\,]\d*[^0])0+\b|[\.|\,]0+\b
Replace: $1
Where '
[\.|\,]' represents the user-specified decimal separator(s)
So perhaps something like this:
[--ZeroTrim=<decimal separator(s)>]
--ZeroTrim: Removes excess zeroes after user specified decimal separator is detected.
Posts: 10.976
Threads: 56
Joined: May 2017