Feature Suggestions Regarding Automatic Filename Generation - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html) +--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html) +--- Thread: Feature Suggestions Regarding Automatic Filename Generation (/thread-153.html) |
RE: Feature Suggestions Regarding Automatic Filename Generation - Selur - 18.11.2017 Quote:Hmm... It would also need a way of being pointed towards user's baseline reference for Encoding settings or it won't be able to shorten the output, as well as towards the correct '*_Report.txt' file for PSNR & SSIM parsing if/when implemented. Other than that this looks good.That would both be some for some later version of the program. To support only showing a portion of the 'Encoding settings' an additional parameter like: --showEncodingSettings=[param1, param2,..] The tool would then additionally need to: a. grab the 'Encoding settings' in case they exist. b. split them by " / " and check whether there is an entry for "paramX=" and then add those values to the new file name. For PSNR, SSIM at least two additional parameters would be needed. --reportFile="Path to report file" --report1="regexp to capture the wanted" Problem is: a. something like x264 [info]: SSIM Mean Y:0.9999810 (47.223db) SSIM Mean Y 0.9999810 (47.223db) PSNR Mean Y 73.727 U 72.391 V 72.120 Avg 73.127 Global 69.056 87.37 kBit per second b. most folks won't be able to write RegExps which I can directly feed to Qt. So this wouldn't be that easy, especially if folks should be able to select what should be added and how it should be added. => Writing a small program which covers the MediaInfoRenamer --Inform=<InformCall> --Separator=<used seperator> --Merger=<append> <File> Adding the parts of the 'Encoding settings' and PSNR and/or SSIM values is a lot more work. Cu Selur RE: Feature Suggestions Regarding Automatic Filename Generation - Selur - 18.11.2017 I wrote the basic version of MediaInfoRenamer (see: https://github.com/Selur/MediaInfoRenamer) and attached a 64bit Windows binary here. (copying it into you Hybrid folder should make it usable) Cu Selur --- Edit: binary is now in a later post RE: Feature Suggestions Regarding Automatic Filename Generation - Selur - 19.11.2017 About the encoding settings. I could add an additional option like: --EncodingSettings=<encoding> Quote:Parameter: So for example: --Separator="#" --Merger="_" --EncodingSettings="CRF %crf=%#Fast-Intra %fast-intra%" cpuid=1173503 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=640x480 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=25 / keyint=250 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=0 / scenecut=40 / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=-1:-1 / sao / no-sao-non-deblock / rd=3 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.50 / psy-rdoq=10.00 / no-rd-refine / analysis-reuse-mode=0 / no-lossless / cbqpoffs=-2 / crqpoffs=-2 / rc=crf / crf=18.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=0.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=5 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1 It would then detect: 'crf=18.0' and 'no-fast-intra' and convert those to: "CRF 18.0_Fast-Intra false" This would allow to add 'Encoding settings'-part to the file name. About adding both 'Inform' and 'Encoding settings': To allow mixing of 'Inform' and 'Encoding settings' multiple instances of both parameters would be accepted and their order would determine the order in which they are added. Options like: --Separator="#" --Merger="_" --Inform="Video#Width %Width%%" --EncodingSettings="CRF %crf=%" -Inform="Video;Height %Height%%" Width 660_CRF 18.0_Height 480 => Should I add this? Any thoughts about it? Cu Selur RE: Feature Suggestions Regarding Automatic Filename Generation - Nuihc88 - 19.11.2017 (19.11.2017, 05:54)Selur Wrote: About adding both 'Inform' and 'Encoding settings':Sure, it would have it's uses, however it wouldn't be quite as useful by itself as with a blacklist for baseline settings. I've been trying to identify and categorize potential problems and solutions relating to special characters for couple of hours now. Looks like MediaTab output differs in some ways from what MediaInfoRenamer produces, so the list below might not be completely accurate, but here goes: I'd use a RegEx based output filter for replacing any unusable characters, the main ones i keep seeing used in MediaInfo output being: '/' & ':'
RE: Feature Suggestions Regarding Automatic Filename Generation - Selur - 19.11.2017 Letting users specify RegExs is a bad since most users can't use them. So this would only be an additional option for advanced users. What you specified there are just replacement so an additional option could be added: --Separator="#" --Replacements="kb/s%Kbps#:%¦" So 640 pixels_352 pixels_722 kb/s_25.000 FPS 640 pixels_352 pixels_722 Kbps/s_25.000 FPS Cu Selur RE: Feature Suggestions Regarding Automatic Filename Generation - Nuihc88 - 19.11.2017 (19.11.2017, 06:51)Selur Wrote: Letting users specify RegExs is a bad since most users can't use them. So this would only be an additional option for advanced users.Actually i was just looking at the problem from the perspective of execution order and one possible method used, not from end-user's perspective, as in what to show them. (19.11.2017, 06:51)Selur Wrote: What you specified there are just replacement so an additional option could be added:Looks good. PS. Just realized that the exceptions from second step of my RegEx example would give the simple replacement approach trouble when those symbols are also required in another context. (e.g. %AspectRatio/String% & %Duration/String4% both use ':') (19.11.2017, 06:51)Selur Wrote: As a side note: Replacing "kb/s" with "Kbps" is a bad thing since the first implies k = 1000 and the second K = 1024. (see: https://en.wikipedia.org/wiki/Kilobit)Indeed, i was copy-pasting lines from MediaTab while comparing them to MediaInfoRenamer outputs and failed to catch that. PS. I kept seeing multiple output format choices in MediaTab and after some testing found out that there is an undocumented feature in MediaInfoRenamer: Replacing '/String' with '/String1', etc. will give different output formats when available. Order equivalence to MediaTab is: '%StreamSize%', '%StreamSize/String%', '%StreamSize/String1%', '%StreamSize/String2%', etc. RE: Feature Suggestions Regarding Automatic Filename Generation - Selur - 19.11.2017 Here's a MediaInfoRenamer build which also supports:
Cu Selur RE: Feature Suggestions Regarding Automatic Filename Generation - Nuihc88 - 23.11.2017 (19.11.2017, 10:02)Selur Wrote: Here's a MediaInfoRenamer build which also supports:Got around to properly testing this build today and found that while '--Replacements=' works as specified above, '--Encoding settings' doesn't alter the filename at all, unless '=' is removed. As an example: "MediaInfoRenamer.exe" --EncodingSettings="crf %crf=%#ipratio#pbratio=#qcomp%qcomp%" --Separator="#" --Merger="_" test.mkv PS. Being able to use wildcards to select multiple files for input and/or removing parts of an already long filename(s) would make this tool easier to integrate into one's workflow. For example: test*.mkv for renaming both 'test1.mkv' & 'test2.mkv' or 'MediaFile_*.mkv' for renaming previously renamed 'MediaFile_1001kbps.mkv' & 'MediaFile_23.976fps.mkv'. RE: Feature Suggestions Regarding Automatic Filename Generation - Selur - 23.11.2017 LOL, I see my mistake. + your call should be: "MediaInfoRenamer.exe" --EncodingSettings="crf %crf%#%ip_ratio%#%pb_ratio%#qcomp%qcomp%" --Separator="#" --Merger="_" test.mkv RE: Feature Suggestions Regarding Automatic Filename Generation - Nuihc88 - 23.11.2017 (23.11.2017, 20:56)Selur Wrote: LOL, I see my mistake.I realize above isn't proper usage; systematically running through variations while removing stuff was just my method for narrowing the problem down to '=', so i decided to retain the variations in my example to better showcase the way this feature is broken. "MediaInfoRenamer.exe" --EncodingSettings="crf %crf%#%ip_ratio%#%pb_ratio%#qcomp%qcomp%" --Separator="#" --Merger="_" test.mkv |