VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. Does anyone know of a utility or way of going through a volume containing 1000's of MP3 files and only listing or selecting those that are 192kbps bit rate? I'm trying to organize my huge collection and have been doing it manually (and s-l-o-w-l-y!) by going through each subfolder (100's) and displaying the Bit Rate in Windows File Explorer. Thx!
    Quote Quote  
  2. Member darkknight145's Avatar
    Join Date
    Feb 2007
    Location
    Australia
    Search PM
    ignore me
    Quote Quote  
  3. Here's a batch file that uses MediaInfoCLI to generate a recursive list of all mp3 files and their bitrates as ListaAll.txt and a list of only those with a bitrate of 192000 in List192k.txt. Change the path to MediaInfoCLI to match where it's installed on your computer. Put the batch file in a folder double click on it. The output files will be in that same folder.

    Image
    [Attachment 59472 - Click to enlarge]


    ListAll.txt:
    Code:
    "C:\MP3 Bitrate Test\Beatles - Blackbird.mp3" 160000 
    "C:\MP3 Bitrate Test\Beatles - Hey Jude.mp3" 128000 
    "C:\MP3 Bitrate Test\Sub Folder\Beatles - Hey Jude.mp3" 192000
    List192k.txt:
    Code:
    "C:\MP3 Bitrate Test\Sub Folder\Beatles - Hey Jude.mp3"
    If you only the files in the folder (not sub folders) remove the /R from the line that reads:

    Code:
    for /R %%a in ("*.mp3") do call :make_list "%%a"
    Quote Quote  
  4. Thx, but I don't see the link for the batch file. When I click on the attachment link it just enlarges the image.
    Quote Quote  
  5. Oops, forgot to include the code:

    Code:
    @echo off
    SETLOCAL
    
    set "Mediainfo=G:\Program Files\MediainfoCLI\Mediainfo.exe"
    
    if not exist "%mediainfo%" echo mediainfo path was not properly defined or weird characters in filename are present& ENDLOCAL& pause& goto :eof
    break
    for /R %%a in ("*.mp3") do call :make_list "%%a"
    ENDLOCAL&echo press any key to exit&pause>nul&exit
    
    
    :make_list <filename>
    "%Mediainfo%" --Inform=Audio;%%BitRate%% "%~1" > temp.tmp"
    set /p bitrate=<"temp.tmp"
    del "temp.tmp"
    echo "%~dpnx1" %bitrate% >>ListAll.txt
    if %bitrate%==192000 echo "%~dpnx1" > List192k.txt
    
    goto :eof
    This was adapted from another batch file I found long ago.
    Quote Quote  
  6. For some reason it only lists the first file that it finds in ListAll.txt that is 192kbps in the List192k.txt file. Here is what appears in both when I run it -

    ListAll.txt
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\09_Grateful Dead - Vintage Dead\01 Dancin' In The Street.mp3" 160000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\09_Grateful Dead - Vintage Dead\02 Lindy.mp3" 160000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\09_Grateful Dead - Vintage Dead\03 Stealin'.mp3" 160000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\09_Grateful Dead - Vintage Dead\04 It's All Over Now Baby Blue.mp3" 160000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\09_Grateful Dead - Vintage Dead\05 I Know You Rider.mp3" 160000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\09_Grateful Dead - Vintage Dead\05 In The Midnight Hour.mp3" 160000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\09_Grateful Dead - Vintage Dead\06 It Hurts Me Too.mp3" 160000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\Dead Set (Live)(1981)\01 Samson And Delilah.mp3" 192000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\Dead Set (Live)(1981)\02 Friend Of The Devil.mp3" 192000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\Dead Set (Live)(1981)\03 New Minglewood Blues.mp3" 192000
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\Dead Set (Live)(1981)\04 Deal.mp3" 192000

    List192k.txt
    "M:\Music\MP2 & MP3 Files\from Others\McCarthy\Grateful Dead\11_Grateful_Dead\To Terrapin Hartford '77(2009)\11 Samson & Delilah.mp3"

    But except for that it seems to work great! Thx.
    Quote Quote  
  7. Oops. The folder tree I was testing only had one 192000 file so I didn't notice the bug. Add a second > to this line:

    Code:
    if %bitrate%==192000 echo "%~dpnx1" > List192k.txt
    to make it look like:

    Code:
    if %bitrate%==192000 echo "%~dpnx1" >> List192k.txt
    > means create a new file with that text. >> means append that text to the file.
    Quote Quote  
  8. Member
    Join Date
    Jan 2005
    Location
    United States
    Search Comp PM
    Originally Posted by tonyaldr View Post
    Does anyone know of a utility or way of going through a volume containing 1000's of MP3 files and only listing or selecting those that are 192kbps bit rate? I'm trying to organize my huge collection and have been doing it manually (and s-l-o-w-l-y!) by going through each subfolder (100's) and displaying the Bit Rate in Windows File Explorer. Thx!
    I still use EncSpot (go with 2.1 pro if you do), https://www.rarewares.org/rrw/encspot.php

    or Mr. QuestionMan, still available with the way back machine https://web.archive.org/web/20160313221418/http://www.burrrn.net/?page_id=5

    You can sort by bitrate.


    I also use mp3guessenc but it's command line and only does one file at a time, https://mp3guessenc.sourceforge.io/
    Put NBC's Ed on Blu-ray!
    Quote Quote  
  9. To Jagobo, thx, man. As Kalnikov said to Wild Willie Boggs in the Roy Clark episode of "The Odd Couple" - "You are a genius!" Thx to redsandvb too!
    Last edited by tonyaldr; 18th Jun 2021 at 19:58.
    Quote Quote  
  10. Hi! Is there a way to edit the selection so that it will select files that are greater than or equal to 192000? I tried adding the > but it bombed out. I went from the line -

    if %bitrate%==192000 echo "%~dpnx1" >> List192k.txt

    to

    if %bitrate%>=192000 echo "%~dpnx1" >> List192k.txt and
    if %bitrate%=>192000 echo "%~dpnx1" >> List192k.txt

    Thx!
    Quote Quote  
  11. Use "GEQ" instead of "==".

    other comparisons:

    Code:
    EQU - equal
    NEQ - not equal
    LSS - less than
    LEQ - less than or equal
    GTR - greater than
    GEQ - greater than or equal
    Quote Quote  
  12. Thx but it doesn't look like it likes those. I tried just replacing "==" with "EQU" for testing and the cmd window closes immediately.
    Last edited by tonyaldr; 28th Jun 2021 at 23:18.
    Quote Quote  
  13. You need to add a space before and after GEQ (or EQU):

    Code:
    if %bitrate% GEQ 192000 echo "%~dpnx1" >> List192k.txt
    Quote Quote  
  14. Doh! Thx.
    Btw, if I wanted to just run the extract portion of the file to read ListAll.txt (which takes a long time to generate and only needs to be created once) and extract the 192000 or other bitrate listings to various files, can that be done? I tried separating that portion of your code but couldn't get it to work. If it's a bother, don't worry about it but I figured you could do it in a snap. Thx again!
    Quote Quote  
  15. You can delete or disable that line after the first run:

    Code:
    REM echo "%~dpnx1" %bitrate% >>ListAll.txt
    Quote Quote  
  16. I'll try it. Thx again!
    Quote Quote  
  17. hi, you can also use "mp3tag"https://www.videohelp.com/software/Mp3tag a metadata editor:
    -open the program
    -drag the folder with audios
    -the program will list all files
    - "mp3tag" has several columns of data, right click on a column and activate only the fields you need, like bitrate etc.
    -Now just one click on the "bitrate" column to sort from highest to lowest bitrate
    -Now you can navigate directly to files that have 192kbps or more bitrate
    -one click on a file to edit the metadata directly, save the changes and continue to the next track...etc

    postscript: the program always starts loading the files from the last session. To avoid this,
    before closing the program press "CTRL + A" and "delete", this only deletes the list of loaded files. thus "mp3tag" will start with the empty list, avoiding possible errors.

    that's it, hope it helps
    Last edited by KNON; 25th Jul 2021 at 18:01.
    Quote Quote  
  18. Member
    Join Date
    Jan 2005
    Location
    United States
    Search Comp PM
    Oh yeah, hadn't thought about using Mp3tag for some reason...

    @tonyaldr I guess you've already done what you set out to do by now...

    Though if you wanted to do something like move your 192kbps files to another folder, you can select files and click the 'Tag - Filename' button and enter something like \192kbps\%artist%\%album%\$num(%track%,2) - %title%. Whatever files were selected would be moved (and renamed) into a folder named 192kbps with subfolders and files named by Artist\Album\'01 - Song Title.mp3' etc. Directories can be relative or absolute. And of course you can name the files/folders whatever you want, above is just an example.

    You would want to be sure your tagging info is correct/consistent beforehand.

    As an alternative to sorting by bitrate as described below you could use the Filter option on the bottom of the window (F3 or View-->Filter if it's missing) and enter something like %_bitrate% GREATER 190, and the list will show you just the files with a bitrate greater than 190. If you want only the files at a specific bitrate use %_bitrate% IS 192, for example.

    Another edit to add: You could also just move the lower bitrate files and keep the rest in place....

    Originally Posted by KNON View Post
    hi, you can also use "mp3tag"https://www.videohelp.com/software/Mp3tag a metadata editor:
    -open the program
    -drag the folder with audios
    -the program will list all files
    - "mp3tag" has several columns of data, right click on a column and activate only the fields you need, like bitrate etc.
    -Now just one click on the "bitrate" column to sort from highest to lowest bitrate
    -Now you can navigate directly to files that have 192kbps or more bitrate
    -one click on a file to edit the metadata directly, save the changes and continue to the next track...etc

    postscript: the program always starts loading the files from the last session. To avoid this,
    before closing the program press "CTRL + A" and "delete", this only deletes the list of loaded files. thus "mp3tag" will start with the empty list, avoiding possible errors.

    that's it, hope it helps
    Last edited by redsandvb; 27th Jul 2021 at 20:20.
    Put NBC's Ed on Blu-ray!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!