Tag Archives: cue

Jack-3.1.1

Jack (not to be confused with the jackd audio daemon) is a cdripper for Linux written in python.  You can download via your package manager or from the homesite.  I have found on Gentoo and Fedora that jack depends on python-2.4 which is a pain when just about everything else builds against python-2.5 or higher which causes problems.  I was forever getting:

$ jack
Traceback (most recent call last):
 File "/usr/bin/jack", line 42, in <module>
 import jack_argv
 File "/usr/lib/python2.6/site-packages/jack_argv.py", line 22, in <module>
 import jack_utils
 File "/usr/lib/python2.6/site-packages/jack_utils.py", line 26, in <module>
 import jack_functions
 File "/usr/lib/python2.6/site-packages/jack_functions.py", line 222
 def starts_with(str, with):
                         ^
SyntaxError: invalid syntax

I had my fill of fixing this every time I needed to rip a cd, so I fixed it.  All you need to do after it has been installed is run this script jack python-2.6 patch

If you look at the script, you'll see that it just changes any definitions from starts_with to startswith.
Another common problem is a gcc memory leak.  To fix this add MALLOC_CHECK_=1 at the start of your command.  I have added this as an alias in my .bash_profile eg.

alias jackflac='MALLOC_CHECK_=1 jack --device=/dev/sr0 --append-year=yes --dir-template "%a/%l" -C -Q -R --rename-fmt "%n - %a - %l - %t" --workdir /home/cdstealer/Desktop/ -E flac'

alias jackmp3='MALLOC_CHECK_=1 jack --device=/dev/sr0 --append-year=yes --dir-template "%a/%l" -C -Q -R --rename-fmt "%n - %a - %l - %t" --workdir /home/cdstealer/Desktop/ -E lame --vbr=no -b 320 -e 2 --write-id3v2=yes'

Please make sure that jack and its dependencies have been built against python-2.6+.

dev-python/id3-py
dev-python/cddb-py
dev-python/pyogg
media-libs/id3lib
dev-python/pyid3lib
dev-python/pyvorbis
media-sound/jack

I edited the files below to add high quality and forced stereo.  Just add "-q0 -ms" to the end of the 4 line in each file.  eg:

'cmd': "lame --preset cbr %r --strictly-enforce-ISO %i %o -q0 -ms",
'vbr-cmd': "lame -V %q --vbr-new --nohist --strictly-enforce-ISO %i %o -q0 -ms",
'otf-cmd': "lame --preset cbr %r --strictly-enforce-ISO - %o -q0 -ms",
'vbr-otf-cmd': "lame -V %q --vbr-new --nohist --strictly-enforce-ISO - %o -q0 -ms",

/usr/lib/python2.6/site-packages/jack_helpers.py
/usr/lib/python2.6/site-packages/jack_main_loop.py
/usr/lib/python2.6/site-packages/jack_plugin_lame.py