Wishing to sort Music Collection by Sample Rate

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Jarvis
Posts: 1
Joined: 04 Jun 2020 19:05

Wishing to sort Music Collection by Sample Rate

Post by Jarvis »

Hello,

I'm a new user and I unable to solve a couple issue.

1.) I added "Sample Rate and Bit Depth" yet the fields are empty when accessing a folder?
help.JPG
help.JPG (95.93 KiB) Viewed 321 times
2.) I wish sort the entire library collection folder by sample rate including sub folders and list the results by "Sample Rate".

Thanks

highend
Posts: 9555
Joined: 06 Feb 2011 00:33

Re: Wishing to sort Music Collection by Sample Rate

Post by highend »

They are empty because your OS doesn't deliver information about these values for this file type. Can you upload a .zip with one of the .aiff files?
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

yuyu
Posts: 84
Joined: 19 Jun 2018 12:40

Re: Wishing to sort Music Collection by Sample Rate

Post by yuyu »

For .aiff sample rate and bit depth to be shown I added two scripted custom columns:

Code: Select all

return substr(runret("""C:\Program Files\MediaInfo\MediaInfo.exe"" --Inform=Audio;%SamplingRate% ""<cc_item>"""), 0, -1); 
return substr(runret("""C:\Program Files\MediaInfo\MediaInfo.exe"" --Inform=Audio;%BitDepth% ""<cc_item>"""), 0, -1);
Capture.PNG
Capture.PNG (7.67 KiB) Viewed 307 times
MediaInfo_CLI must be installed for this.

highend
Posts: 9555
Joined: 06 Feb 2011 00:33

Re: Wishing to sort Music Collection by Sample Rate

Post by highend »

Yeah, there seems to be no other way than using mediainfo. Even the K-Lite codec pack (which has codecs for .aiff) doesn't add support for being able to use any of your current columns.

@yuyu
Your substr doesn't do what it should do. It just strips off one char of <crlf>, not both.
So either use

Code: Select all

return substr(runret("""C:\Program Files\MediaInfo\MediaInfo.exe"" --Inform=Audio;%SamplingRate% ""<cc_item>"""), 0, -2); 
return substr(runret("""C:\Program Files\MediaInfo\MediaInfo.exe"" --Inform=Audio;%BitDepth% ""<cc_item>"""), 0, -2);
or

Code: Select all

return trim(runret("""C:\Program Files\MediaInfo\MediaInfo.exe"" --Inform=Audio;%SamplingRate% ""<cc_item>"""), <crlf>, "R");
return trim(runret("""C:\Program Files\MediaInfo\MediaInfo.exe"" --Inform=Audio;%BitDepth% ""<cc_item>"""), <crlf>, "R");
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

yuyu
Posts: 84
Joined: 19 Jun 2018 12:40

Re: Wishing to sort Music Collection by Sample Rate

Post by yuyu »

highend wrote: 05 Jun 2020 07:35 @yuyu
Your substr doesn't do what it should do. It just strips off one char of <crlf>, not both.
Though it worked as it was, "unvisible garbage" was accumulated. Thank you for the advice.

Post Reply