Help - Search - Members - Calendar
Full Version: MPC Batch file
Hydrogenaudio Forums > Lossy Audio Compression > MPC
Morphix
I developed this batch file to convert my flac to mpc in a double click. It conforms to ***** standard which many of the frontends leave out. Which ends up in alot of extra manual steps.

I have all binaries in c:\windows\audio\bin and added that to my PATH variable. Binaries needed are mppenc, mppdec, flac, replaygain, md5sum, and tag. I uses md5sum because it is UNIX compatible, due to the fact it is the same binary.

Possibly the only link not searchable in the forums is:
md5sum Download

mpcenc.cmd
CODE

@echo off
#### Start Settings ####
set WORK=E:\mpc
set SRCLOC=E:\flac
set MPCENC=mppenc --insane --ms 15
set COMMENT="MPC Encoder 1.15v --insane --ms 15"
#### End Settings ####

for /R %SRCLOC% %%i in (*.flac) do %MPCENC% "%%i" && tag --ape2 --fromfile "%%i" "%%i.mpc" --comment %COMMENT% && move "%%i.mpc" %WORK%

cd /D %WORK%
tag --rentag --move --scheme "A (Y) L\A - N - T" *.mpc
for /D %%i in (Various*) do cd %%i && tag --rentag --move --scheme "N - T" *.mpc && cd /D %work%
for /D %%i in (Soundtrack*) do cd %%i && tag --rentag --move --scheme "N - T" *.mpc && cd /D %work%

for /D %%i in (*) do cd "%%i" && replaygain --auto *.mpc >> "%%i_replaygain.log" && cd /D %work%

for /D %%i in (*) do cd "%%i" && md5sum -b *.mpc >> "%%i.md5" && cd /D %work%


REM ####### *IMPORTANT* Copy files WILL FAIL if lossless folders are not named the same as the lossy #######

echo .flac >> exclude.txt
for /D %%i in (*) do xcopy "%SRCLOC%\%%i\*.*" "%WORK%\%%i" /exclude:exclude.txt
del exclude.txt


This batch file should work on all versions of Windows but I have only verified it on Windows XP SP2. At many points I was really tempted to just to use cygwin/bash. Hope this helps alot of people out looking for an all in one conversion.



Please don't mention illegal sharing/ripping groups.
DickxLaurent
Very nice idea. smile.gif

Any way it can be setup to read a cuesheet?
westgroveg
OT: Still haven’t seen any samples where insane with ms 15 improves quality.
Morphix
QUOTE(DickxLaurent @ Apr 20 2005, 12:24 AM)
Very nice idea. smile.gif

Any way it can be setup to read a cuesheet?
*



I never use cuesheets but I am sure this is highly possible. I'll research it out when I get some time (when i'm at work), and post back whatever I find.
Morphix
QUOTE(westgroveg @ Apr 20 2005, 12:37 AM)
OT: Still haven’t seen any samples where insane with ms 15 improves quality.
*



CODE
set MPCENC=mppenc --insane --ms 15


That's a regular set variable to change your MPC settings. YES YES you can change it to whatever you want to encode with. This is not a post to discuss binary switches, but to make an easier way to enjoy some of the work being done by the Musepack team, at little expense with your time.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.