mp3togo version 0.5.2 v0.5.2
Added .m4a patch from Justus Pendleton.

file:682f8616ba61ec6889e2012943279818ce0be5af -> file:949fe74034eb94b97a5981166c12fa432b494712
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mp3togo (0.5.2) unstable; urgency=low
+
+ * Added Justus Pendleton's .m4a patch
+
+ -- Simeon Veldstra <reallifesim@gmail.com> Wed, 31 May 2006 18:00:03 -0700
+
mp3togo (0.5.1) unstable; urgency=low
* Added --no-tags option which disables tagging of output files.
file:e259c8979c5c41c407589905c88fe0aefa838e71 -> file:88af3b75fea4c0a67a7a2a4b50f4daeafbb7ef2c
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Package: mp3togo
Architecture: all
Depends: ${python:Depends}, python-pyvorbis, python-id3, mpg321, vorbis-tools
Recommends: flac, normalize-audio
-Suggests: lame, python-xmms
+Suggests: lame, python-xmms, faad
Description: A tool for loading music on to portable mp3 players
A tool for creating sets of mp3 (or ogg vorbis) files
from an archive of music in various formats and bitrates.
file:a7ad3777b07bb8adcd1172fdc02089ea7cf94735 -> file:c220141c9cd916a8c5dba13f940f146ca134a6ea
--- a/debian/mp3togo.1
+++ b/debian/mp3togo.1
@@ -134,4 +134,4 @@ License can be found in /usr/share/commo
.PP
mp3togo can be found online at http://puddle.ca/mp3togo
-.\" created by instant / docbook-to-man, Sun 28 May 2006, 11:16
+.\" created by instant / docbook-to-man, Wed 31 May 2006, 18:03
file:b3739315c653d071b957248fb91325f7682b4e89 -> file:5128f31ea4b19c46b582f976f9d4440daa2505e2
--- a/mp3togo/__init__.py
+++ b/mp3togo/__init__.py
@@ -21,5 +21,5 @@
# __all__ = ('converter', 'main', 'options', 'setup')
-version = '0.5.1'
+version = '0.5.2'
file:a7e25b1aa36864ab3e73970d8394c55939c06344 -> file:730690d8bed946607269be0f2e1f223056c2a2fd
--- a/mp3togo/conf.py
+++ b/mp3togo/conf.py
@@ -137,6 +137,7 @@ class Options(options.Options):
self.bin['mpg321'] = False
self.bin['ogg123'] = False
self.bin['flac'] = False
+ self.bin['faad'] = False
self.bin['metaflac'] = False
self.bin['normalize-audio'] = False
self.bin['dcop'] = False
@@ -152,7 +153,7 @@ Description:
mp3 player or an mp3 CD. The files to convert can be
specified in a playlist file (m3u, pls and plain text are
supported) or given as arguments to the program. mp3togo
- will go through the list and run mpg321, ogg123, flac and
+ will go through the list and run mpg321, ogg123, flac, faad and
lame to decode and reencode the files. The newly encoded
files will be written to the destination directory. The
software can retain as much of the subdirectory structure
@@ -238,7 +239,7 @@ def getfiletype(filename):
"""Return the format of an audio file"""
# Could use some more magic here
ft = os.path.splitext(filename)[1][1:]
- if ft not in ('mp3', 'ogg', 'flac', 'wav'):
+ if ft not in ('mp3', 'ogg', 'flac', 'wav', 'm4a'):
raise ErrorUnknownFileType
return ft
file:3627b994e25512df43697db0c5e9d1b3f8411a13 -> file:af0baded076a5bebb62a8db5b3010511d0442e48
--- a/mp3togo/helpers.py
+++ b/mp3togo/helpers.py
@@ -140,6 +140,21 @@ def recode_wav(input, output, args=None)
input to output. Throws OSError on error."""
return lambda: shutil.copyfile(input, output)
+def parse_m4a_dec(buf):
+ n = buf.find('% decoding')
+ # if n==1 then we are at single digit progress (i.e. 5%) and
+ # at the beginning of the buffer
+ if n == 1:
+ s = buf[0]
+ # else we are somewhere deeper in the buffer...check if we are at
+ # single or double digit progress by looking two characters back
+ elif buf[n-2] == '\n':
+ s = buf[n-1:n]
+ else:
+ s = buf[n-2:n]
+ return int(s)
+
+
## Command line escape sequences:
#
# escape: for:
@@ -178,6 +193,10 @@ helpers = {
'cmd': 'flac --decode -F -o %o %i',
'type': 'flac',
'action': 'decode'},
+ 'm4a_dec':{'parser': parse_m4a_dec,
+ 'cmd': 'faad -o %o %i',
+ 'type': 'm4a',
+ 'action': 'decode'},
'wav_dec': {'parser': None,
'cmd': recode_wav,
'type': 'wav',
@@ -221,5 +240,5 @@ def make_args(helper, input, output, arg
def est_decoded_size(filename):
# This could be much better
tp = conf.getfiletype(filename)
- factors = {'mp3': 16.5, 'ogg': 16.5, 'flac': 2.8, 'wav': 1}
+ factors = {'mp3': 16.5, 'ogg': 16.5, 'flac': 2.8, 'wav': 1, 'm4a': 16.5}
return os.stat(filename).st_size * factors[tp]