[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CD to acc



That sounds like high mathematics for me.

Shamail Tayyab wrote:
Pantor wrote:
Hi lads,

would you be able to advice what to use for converting audio CD to acc files please?

Thank's.


Depends on how much tools you can use...
For command like geeks...

Install mplayer and faac from debian-multimedia.org repo.

$ mplayer -ao pcm:file=audiodump.wav <file>
   // decodes the stream to raw wave file
$ faac audiodump.wav -o $HOME/track.aac
   // encodes it to aac file.

I m learning python, so thought i should write small py script to automatically convert all the music in a folder to acc into a specified folder...

#! /usr/bin/env python

import os
import sys

if len ( sys.argv ) < 2:
 print "Usage:", sys.argv[0], "/target/dir"
 sys.exit ()

files = os.listdir ( "." )
dir = sys.argv[1]

for i in files:
 print "Decoding", i, "..."
cmd = "mplayer -ao pcm:file=/tmp/swav.sona \"" + i + "\" 2> /dev/null > /dev/null"
 outfile = dir + "/" + i[0:len(i) - 4]
 os.system ( cmd )
 print "Encoding to ", outfile, "... @ 192 kbps..."
 cmd = "faac /tmp/swav.sona -o \"" + outfile + ".aac\""
 os.system ( cmd )

print "Conversion finished!!!"

Run this script, while you are in the mounted CD ROM dir... as
$ /path/to/this/script/toaac.py $HOME/MyNewAudioCD

Hoping this to prove helpful to you...




Reply to: