This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Poll: Would you like to see these features implemented?
You do not have permission to vote in this poll.
Yes
33.33%
1 33.33%
Some
33.33%
1 33.33%
No
0%
0 0%
Don't care
33.33%
1 33.33%
Total 3 vote(s) 100%
* You voted for this item. [Show Results]

Feature Suggestions Regarding Automatic Filename Generation
#21
Hopefully I fixed it yesterday, but was to sleepy and forgot to attach the new version.
-> please try attached version

Cu Selur
Reply
#22
(24.11.2017, 07:57)Selur Wrote: Hopefully I fixed it yesterday, but was to sleepy and forgot to attach the new version.
-> please try attached version

Cu Selur
Using the previous command example:
"MediaInfoRenamer.exe" --EncodingSettings="crf %crf%#%ip_ratio%#%pb_ratio%#qcomp%qcomp%" --Separator="#" --Merger="_" test.mkv
this version lists out all available encoding settings and their values in command prompt and then ends with the line:
Renaming 'test.mkv' to 'test_crf 28.0_qcomp0.80.mkv'.
Filename doesn't actually change.

With the 'broken example', output is:
Renaming 'test.mkv' to 'test_qcomp0.80.mkv'.
Filename doesn't change now either.
Reply
#23
Sorry uploaded the wrong Version. Will fix once I'm back Home and got some sleep. Friend of mine married today and, so I'm Out of Order atm.
Reply
#24
Try the attached version.

Cu Selur
Reply
#25
(25.11.2017, 14:16)Selur Wrote: Try the attached version.

Cu Selur
Seems to work correctly in all of my tests thus far.

Sidenotes (for consideration for future versions):
  • Using or including a space character in the Merger could improve output readability in some use cases (when the resulting filename is split into multiple lines in a file browser), however currently using a space character as Merger results in: "Error: Missing a 'Merger' parameter" and when used as an additional character, like this: --Merger="; " it gets ignored unless another character is added after it.
  • Not sure if placing the standard Merger between the original filename and the first addition is always ideal, but i don't see any significant drawbacks to it either. Replacing it with an optional prefix (and possibly suffix) option(s), would solve any potential issues though.
  • When a file includes multiple audio tracks, there is no separation of any kind between their readouts.
Reply
#26
Quote:When a file includes multiple audio tracks, there is no separation of any kind between their readouts.
How could there? The Renamer doesn't have any concept of the stream count number or anything.  Big Grin

Quote:Not sure if placing the standard Merger between the original filename and the first addition is always ideal, but i don't see any significant drawbacks to it either. Replacing it with an optional prefix (and possibly suffix) option(s), would solve any potential issues though.
Not sure either if it's a good idea either.

Quote:Using or including a space character in the Merger could improve output readability in some use cases (when the resulting filename is split into multiple lines in a file browser), however currently using a space character as Merger results in: "Error: Missing a 'Merger' parameter" and when used as an additional character, like this: --Merger="; " it gets ignored unless another character is added after it.
I probably added a 'trim' somewhere. Smile


-> Added a new version which:
a. shouldn't 'trim off' spaces.
b. has a new parameter:
--FileSeparator: Place this text between the file name and the addition, when not used, 'Merger' will be used.
Reply
#27
(26.11.2017, 08:33)Selur Wrote: -> Added a new version which:
a. shouldn't 'trim off' spaces.
b. has a new parameter:
--FileSeparator: Place this text between the file name and the addition, when not used, 'Merger' will be used.
Neither a. nor b. works in this build. Running this:
MediaInfoRenamer.exe --Inform="Audio;%StreamSize%bytes#%BitRate/String%#%SamplingRate/String%#%Language%#ch%Channels%" --Separator="#" --Merger=" " --Replacements="kb/s%kbps#:%¦#/%;#\%;#|%;#?%#*%#.000%#.00%#.0%" test.mkv
...just results in:
Error: Missing a 'Merger' parameter!

I see FileSeparator listed amongst the available parameters, but trying to use it with line:
MediaInfoRenamer.exe --Inform="Audio;%StreamSize%bytes#%BitRate/String%#%SamplingRate/String%#%Language%#ch%Channels%" --Separator="#" --FileSeparator="_" --Merger="; " --Replacements="kb/s%kbps#:%¦#/%;#\%;#|%;#?%#*%# %#.000%#.00%#.0%" test.mkv
...results in this:
Error: File 'FileSeparator=_'  doesn't exist!
...and with FileSeparator removed from the above command, despite using "; " as Merger i'm getting no spaces in the output filename:
The Code Wrote:test;3371314bytes;296kbps;48kHz;en;ch61250849bytes;110kbps;48kHz;ja;ch2.mkv

(26.11.2017, 08:33)Selur Wrote: How could there? The Renamer doesn't have any concept of the stream count number or anything. Big Grin
I was just expecting to see a standard Merger there by default; see what i mean above... (*=Audio1; *=Audio2)

PS. Also separately checked to make sure that Replacements weren't interfering with the Merger by removing '# %' during testing.
Reply
#28
Attached a new version for you.

Quote:I was just expecting to see a standard Merger there by default; see what i mean above... (*=Audio1; *=Audio2)
Don't see how to do that with the output MediaInfo provides for 'Inform'-calls.

Cu Selur
Reply
#29
(26.11.2017, 13:56)Selur Wrote: Attached a new version for you.
It's working correctly.

(26.11.2017, 13:56)Selur Wrote:
Quote:I was just expecting to see a standard Merger there by default; see what i mean above... (*=Audio1; *=Audio2)
Don't see how to do that with the output MediaInfo provides for 'Inform'-calls.
Luckily this was fairly easy to work around by padding the Inform call with a copy of the Merger, like so:
MediaInfoRenamer.exe --Inform="Audio;%StreamSize%bytes#%BitRate/String%#%SamplingRate/String%#%Language%#ch%Channels%#; " --Separator="#" --FileSeparator=" - " --Merger="; " --Replacements="kb/s%kbps# %#.000%#.00%#.0%#:%¦#/%;#\%;#|%;#<%;#>%#?%#*%" test.mkv
Result of which is a file named:
test - 3371314bytes; 296kbps; 48kHz; en; ch6; 1250849bytes; 110kbps; 48kHz; ja; ch2.mkv

Sidenode: Ran some additional tests and noticed that --Replacements won't work for --EncodingSettings, however the only usage scenario i can think of where this would ever be useful is in cutting away trailing zeroes after the decimal point; which would cause it's own problems anyhow, with lines like 'scenecut-bias=0.05', at least the way i've used --Replacements in the above example for audio.
PS. Optional trailing zero removal would be another useful feature to consider, the problem with my --Replacements approach above being the lack of outside reference for reliably detecting end of the line.
Reply
#30
Okay, didn't apply it to the values of the encoding settings, doing so now.

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)