PDA

View Full Version : Is there a way to batch convert .IMG files to Flac or MP3



sandman
10-14-2012, 01:20 PM
Is there a way to batch convert .IMG files to Flac or MP3. I have an MF digital Scribe PC that saves audio cd images as .IMG files.

pablogm123
10-14-2012, 02:20 PM
As far I kwow, dBpoweramp cannot handle raw headerless file (.bin/.img images of CDDA discs outputted by CDRWin, CloneCD and similar programs are actually a monolithic PCM audio file without header [but .mdf files created by Alcohol 120% can contain interleaved subcode data]). However, the FLAC and WAVPACK official command line encoders can handle easily these files. If that files are actually headerless PCM audio files, you can do this:

I run this .cmd file to batch convert these files into .wv files, assuming that those files are named .pcm:


@set path=[Absolute path to folder which contains the encoder]
@for /r %%G in (*.pcm) do call :process "%%G"
@:process
@set tmpfile=%1
@if NOT %~x1==.pcm goto exit
@wavpack.exe -hhx3 -m -l --raw-pcm -t %tmpfile% %tmpfile:.pcm=.wv%
:exit

It seems that you are interested in FLAC format. Replace the @wavpack line with this one:


@flac.exe -8 -V --endian=little --channels=2 --bps=16 --sample-rate=44100 --sign=signed --force-raw-format %tmpfile% %tmpfile:.pcm=.flac%

Of course, you can alter the compression settings, to obtain faster encodes.

Last but not least, to split these files into individual tracks you need a .cue file, and you have to modify the first line of that file. For example:
FILE "file.IMG" BINARY ----> FILE "file.flac" WAVE

If you don't have a cue, you can generate it from subcode (CDs where TOC differs from subcode are veeery weird, so that using subcode for that is fine), using a old app named Subcode Analyzer 0.73.

Once done, Foobar can open that images.

sandman
10-15-2012, 09:55 AM
Thanks! I will give it a try.