Skip to content

Instantly share code, notes, and snippets.

@ekratskih
Created April 27, 2011 13:20
Show Gist options
  • Save ekratskih/944235 to your computer and use it in GitHub Desktop.
Save ekratskih/944235 to your computer and use it in GitHub Desktop.
Convert mpc files in current directory to mp3 files
#!/usr/bin/python
# You should install "mpcdec" for converting mpc files
# Ubuntu: apt-get install musepack-tools
import os
import subprocess
for file_mpc in os.listdir("."):
file_info = os.path.splitext(file_mpc)
if file_info[1] == ".mpc":
print file_mpc
subprocess.call("mpcdec \"" + file_mpc + "\" - | lame - \"" + file_info[0] + ".mp3\"", shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment