Command Line Windoz Album Art Fixer?

Discussion in 'Software' started by Jason Arthur Taylor, Jan 9, 2017.

  1. Jason Arthur Taylor

    Jason Arthur Taylor Private E-2

    I am using an outdated and unsupported mp3 player that only shows album art if the embedded jpg(s) are non-progressive.

    Is there an ID3.v1-3 editor that will with a single command line in cmd.exe alter an mp3 jpg from non-progressive to progressive?

    Most of them have graphical interfaces and do huge libraries at a time, which is NOT what I want since I am, according to my doctor, highly allergic to GUIs, and, to avoid sickness, require command line for everything possible.
     
  2. Just Playin

    Just Playin MajorGeek

    Are you asking for a ID3 tag editor with built in image processing capability? It's asking for a lot. Is there a reason you can't just replace the problem image?
     
    Jason Arthur Taylor likes this.
  3. Jason Arthur Taylor

    Jason Arthur Taylor Private E-2

    Thanks for replying Just Playing. Yes and no. Irfanview or gimp could probably do the command line processing. I see upon think about your question that I am firstly looking for any ID3 tag editors that can remove or insert album art via the command line. If it could fix album art via a switch, that would be of course even better, so if you or any reader knows of either, please let me know.

    One idea is to use an advanced stream processing program that "looks" for the jpg header in the stream and converts it. So

    cat x.mp3 | superman.exe -fix_jpgs > y.mp3
     
  4. Eldon

    Eldon Major Geek Extraordinaire

  5. Jason Arthur Taylor

    Jason Arthur Taylor Private E-2

    Eldon, I am not sure that id3.exe can handle album art. The options are:

    id3 0.78 (2006080)
    usage: id3 [-1 -2 -3] [OPTIONS] filespec ...
    -v give verbose output
    -d clear existing tag
    -t <title> set tag fields
    -a <artist>
    -l <album> (i'th matched `*' wildcard = %1-%9,%0
    -n <tracknr> path/file name/counters = %p %f %x %X
    -y <year> value of tag field in file = %t %a %l %n %y %g %c)
    -g <genre>
    -c <comment>
    -D <filename duplicate tags read from filename
    -f <template> rename files according to template
    -q <format> print formatted string on standard output
    -m match variables in filespec
    -R search recursively
    -M preserve modification time of files
    -V print version info
    Only on last selected tag type:
    -s <size> set tag size
    -E only write if tag already exists
    -u update all standard fields
    -rTYPE erase all `TYPE' frames
    -wTYPE <data> write a `TYPE' frameReport bugs to <squell@alumina.nl>.

    It seems capable of writing known and fixed id3 tags into mp3 files, but not extracting and modifying album art.

    "The other option is to use a different MP3 player."

    Only one other option? Really? Wow. I guess I should be rushing off to best buy with credit cart in hand right now. Thank you for you brilliant advice.
     
  6. Eldon

    Eldon Major Geek Extraordinaire

    Save your sarcasm. :( And do mention it to your...
    There are numerous free MP3 players.
     
  7. Just Playin

    Just Playin MajorGeek

    I believe his mp3 player is a physical device.
     
    Jason Arthur Taylor likes this.
  8. Eldon

    Eldon Major Geek Extraordinaire

    This is the software forum.
    He can take his sarcasm elsewhere.
     
  9. Jason Arthur Taylor

    Jason Arthur Taylor Private E-2

    Turns out my intuition about there possibly being a superman.exe program was good. ffmpeg is one. Below are two batch files. One does one file and another does an entire drive. Disclaimer: I have not tested the case in which a directory name has spaces. If you use this, please let me know if there are any edits you needed to make.

    fixmp3single.bat :

    Code:
    echo This batch file fixes album art from whatever format to something older mp3 players can probably display.
    
    echo It requires that you install ffmpeg and irfanview.  Here I assume your path includes whereever they were installed.  If now, edit below to include it.
    echo You may need to edit an irfanview default option file for saving jpg files to be non-progressive, but this worked for me without this, so I don't know for sure.
    echo To do multiple files or entire drives use the fixmp3.bat file.
    echo This was written by Jason Arthur Taylor ( jasontaylor.us ) but plenty of code was borrowed from others who posted on the internet.
    echo usage: The argument is the single mp3 file that you need fixed.
    ffmpeg -i %1 tmp.jpg
    i_view32.exe tmp.jpg /convert=tmp-np.jpg
    ffmpeg -i %1 -i tmp-np.jpg -map 0:0 -map 1:0 -c copy -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" tmp.mp3
    
    fixmp3.bat:

    Code:
    for /f "usebackq delims=" %%m in ( ` dir /s /b *.mp3 ` ) do (
     echo Processing %%m...
     call fixmp3single.bat "%%m"
     rename "%%~fm" "%%~nm-original-pleasedeleteme%%~xm"
     rem Below I am using mv, but you might need to use move instead if you don't have this
     rem on your system.
     mv -v tmp.mp3 "%%~fm"
     del tmp-np.jpg
     del tmp.jpg
    )
    echo After testing, you can type "del /s *pleasedeleteme*" to remove the original mp3 files.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds