From: yomguy Date: Mon, 9 May 2011 10:28:10 +0000 (+0000) Subject: update install procedure, improve MP3 transcoding quality X-Git-Tag: 0.3.2~35 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=87db92632a510ba732def2789073f8227edeb2c3;p=timeside.git update install procedure, improve MP3 transcoding quality --- diff --git a/INSTALL b/INSTALL index 3f671dd..d35595a 100644 --- a/INSTALL +++ b/INSTALL @@ -12,38 +12,33 @@ TimeSide needs some other python modules to run. See README for the full dependency list. The following methods explain how to install all dependencies on a Debian based system -and espacially on Debian Lenny 5.x Stable. Is it now considered you have install this system correctly. +and espacially on Debian Squeeze 6.0 (stable). Is it now considered you have install this system correctly. Become root. In a terminal or console, run:: $ su Write your root password. +Note : you can paste the full command but without the shell character '$'. +Then:: -Add backports repository to the apt sources.list:: - - $ echo "deb http://www.backports.org/debian lenny-backports main contrib non-free" | tee -a /etc/apt/sources.list - -Note : you can paste the full command but without the shell character '$'. -Then : - - $ apt-get update - - $ apt-get -t lenny-backports upgrade + $ aptitude update + $ aptitude install python python-gobject gobject-introspection python-setuptools python-xml python-mutagen \ + python-imaging python-numpy python-scipy python-gst0.10 gstreamer0.10-plugins-base gir1.0-gstreamer-0.10 \ + gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-good gstreamer0.10-plugins-bad -Say 'YES' to all questions. Then:: +Add Debian multimedia repository to the apt sources.list and install Gstreamer MP3 modules:: - $ sudo aptitude install -t lenny-backports vim subversion python python-setuptools python-xml python-mutagen \ - python-imaging python-numpy python-gst0.10 gstreamer0.10-plugins-base \ - gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-good gstreamer0.10-plugins-bad + $ echo "deb deb http://www.debian-multimedia.org stable main" | tee -a /etc/apt/sources.list + $ aptitude update + $ aptitude install gstreamer0.10-fluendo-mp3 gstreamer0.10-lame 2. Install TimeSide =================== -Get the code and install:: - - $ svn export http://timeside.googlecode.com/svn/trunk/ timeside +Go into the module directory and then install:: + $ cd timeside $ python setup.py install diff --git a/timeside/encoder/mp3.py b/timeside/encoder/mp3.py index 599b987..6a67336 100644 --- a/timeside/encoder/mp3.py +++ b/timeside/encoder/mp3.py @@ -59,7 +59,7 @@ class Mp3Encoder(Processor): # the output data format we want self.pipe = '''appsrc name=src ! audioconvert - ! lamemp3enc bitrate=256 ! id3v2mux + ! lamemp3enc target=quality quality=2 encoding-engine-quality=standard ! id3v2mux ''' if self.filename and self.streaming: self.pipe += ''' ! tee name=t @@ -68,7 +68,7 @@ class Mp3Encoder(Processor): ''' % self.filename elif self.filename : - self.pipe += '! filesink location=%s ' % self.filename + self.pipe += '! filesink location=%s sync=False ' % self.filename else: self.pipe += '! queue ! appsink name=app sync=False ' @@ -135,13 +135,10 @@ class Mp3Encoder(Processor): @interfacedoc def process(self, frames, eod=False): self.eod = eod - buf = self.numpy_array_to_gst_buffer(frames) self.src.emit('push-buffer', buf) - if self.streaming: self.chunk = self.app.emit('pull-buffer') - return frames, eod def numpy_array_to_gst_buffer(self, frames): diff --git a/timeside/tests/testtranscoding.py b/timeside/tests/testtranscoding.py index 38cd7ff..7528a76 100644 --- a/timeside/tests/testtranscoding.py +++ b/timeside/tests/testtranscoding.py @@ -70,7 +70,7 @@ class TestTranscoding(TestCase): encoder = VorbisEncoder(dest1, streaming=True) self.encoder = encoder - + def testWav2Flac(self): "Test wav to flac conversion" self.source = os.path.join (os.path.dirname(__file__), "samples/sweep.wav") @@ -83,7 +83,7 @@ class TestTranscoding(TestCase): encoder = FlacEncoder(dest1, streaming=True) self.encoder = encoder - """ + """ def setUpDecoder(self): self.decoder = FileDecoder(self.source)