]> git.parisson.com Git - timeside.git/commitdiff
update install procedure, improve MP3 transcoding quality
authoryomguy <yomguy@parisson.com>
Mon, 9 May 2011 10:28:10 +0000 (10:28 +0000)
committeryomguy <yomguy@parisson.com>
Mon, 9 May 2011 10:28:10 +0000 (10:28 +0000)
INSTALL
timeside/encoder/mp3.py
timeside/tests/testtranscoding.py

diff --git a/INSTALL b/INSTALL
index 3f671dd172c09b9f78cd8b7555ddcb098eeca5db..d35595a336fdbee9e0c2fe90365e883b81b53641 100644 (file)
--- 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
 
index 599b9872f46a7f618aaa04d974d428b52d92664e..6a6733619fc4a2f7d4fa9de561be0baa7a2bd3d7 100644 (file)
@@ -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):
index 38cd7ffabc9ef0ea73031c1ad5971eb553eb15a6..7528a766fca26a00fd71086b5ce017c2e611d0a8 100644 (file)
@@ -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)