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
#9
Quote:It would only need to be created when 'Keep intermediate files' is set.
Argh. I would prefer to not create folders in Hybrid if at all possible. Smile

-----------------------------------------------------------------------------------------------

Quote:Personally i would solve the Encoding settings parsing problem with something like this:
  1. On MediaInfo readout, RegEx Replace with nothing: '[linebreak]Encoding settings :' & copy rest of the line.
  2. Add extra [linebreak] at the very end & Replace every '/' with '[linebreak]' to use as separator for searching subsequent matches.
  3. RegEx Search for matches from user input using '[space]' as starting and ending character +'[linebreak]', in order to avoid false matches from parameters starting with 'no-' and ending with a multi-digit number.
  4. When it matches user input RegEx Replace it with nothing.
  5. RegEx Replace remaining '[linebreak]' characters with ';' and remove the last one.
  6. RegEx replace every '[space]' with nothing.
  7. Append the target filename with whatever is left.
This sounds more like something that should be done in a separate tool.
Like a small program (or script) which you feed with a file and a bunch of parameter.

Something like:
Quote:
MediaInfoRenamer --Inform=<InformCall>  --Separator=<used seperator> --Merger=<append> <File>
Options:
  • --Inform: 'Inform'-parameters for MediaInfo. Call "MediaInfo --Info-parameters" to get a full list of supported options.
  • --Separator: The separator used inside the 'Inform'-parameter.
  • --Merger: The text that should be used to combine the collected data.
  • File:: The file which should be analyzed and renamed.

For better understanding of what I mean with this.
Here a few examples:

Example 1:
MediaInfoRenamer  --Inform="Video;%Width%,%Height%,%BitRate%,%FrameRate%" --Separator=","--Merger=" " "z:\Output\myfile.mkv"
The tool then would:
a. call:
mediainfo --Inform="Video;%Width%,%Height%,%BitRate%,%FrameRate%" "z:\Output\myfile.mkv"
and collect the output.
640,352,722134,25.000

b. split the output using the separator:
  • 640
  • 352
  • 722134
  • 25.000

c. join that data using the merger:
640 352 722134 25.000

d. rename the file from:
"z:\Output\myfile.mkv"
to
"z:\Output\myfile 640 352 722134 25.000.mkv"

Example 2:
MediaInfoRenamer  --Inform="Video;%Width/String%#%Height/String%#%BitRate/String%#%FrameRate/String%" --Separator="#" --Merger="_" "z:\Output\myfile.mkv"
The tool then would:

a. call:
mediainfo --Inform="Video;%Width/String%#%Height/String%#%BitRate/String%#%FrameRate/String%" "z:\Output\myfile.mkv"
and collect the output.
640 pixels#352 pixels#722 kb/s#25.000 FPS

b. split the output using the separator:
  • 640 pixels
  • 352 pixels
  • 722 kb/s
  • 25.000 FPS

c. join that data using the merger:
640 pixels_352 pixels_722 kb/s_25.000 FPS

d. try to rename the file from:
"z:\Output\myfile.mkv"
to
"z:\Output\myfile_640 pixels_352 pixels_722 kb/s_25.000 FPS.mkv"
and fail since '/' isn't allowed inside a file name. Smile

Note: The following character are reserved and thus will cause problems:
  • : (colon)
  • " (double quote)
  • / (forward slash)
  • \ (backslash)
  • | (vertical bar or pipe)
  • ? (question mark)
  • * (asterisk)


Example 3:
MediaInfoRenamer  --Inform="Video;Width %Width/String%#Height %Height/String%#%Bitrate BitRate/String%#Framerate %FrameRate/String%" --Separator="#" --Merger="_" "z:\Output\myfile.mkv"
The tool then would:

a. call:
mediainfo --Inform="Video;%Width/String%#%Height/String%#Bitrate(kBit pro sec) %BitRate%#Framerate(fps) %FrameRate%" "z:\Output\myfile.mkv"
and collect the output.
Width 640 pixels#Height 352 pixels#Bitrate(kBit pro sec) 722#Framerate(fps) 25.000

b. split the output using the separator:
  • Width 640 pixels
  • Height 352 pixels
  • Bitrate(kBit pro sec) 722
  • Framerate 25.000 FPS

c. join that data using the merger:
Width 640 pixels_Height 352 pixels_Bitrate 722_Framerate(fps) 25.000

d. rename the file from:
"z:\Output\myfile.mkv"
to
"z:\Output\myfile_640 pixels_352 pixels_722_Framerate(fps) 25.000.mkv"

Cu Selur
------
offline 02.-07. July, https://www.rockharz-festival.com/ Big Grin
Reply


Messages In This Thread
RE: Feature Suggestions Regarding Automatic Filename Generation - by Selur - 18.11.2017, 07:54

Forum Jump:


Users browsing this thread: 4 Guest(s)