Seite 1 von 2
Lame- mp3 encoding
Verfasst: Samstag 10. April 2010, 20:03
von waki
Hey,
ich würde gerne mit pyaudio mp3 erstellen, dafür brauch ich aber LAME. Ich kann es mit subprocess nutzen, jedoch würde ich es gerne als libary zur verfügung haben. Habe auch py-lame 0.1 aber keine ahnung wie man das installiert. Help!
gruß
Verfasst: Samstag 10. April 2010, 22:28
von Leonidas
``python setup.py install`` bzw. das entsprechende Paket aus deinem Paketmanagement hernehmen. Ich würde aber vermutlich auf ``gstreamer0.10-lame`` zurückgreifen, in der Hoffnung dass ich das aus Python brauchbar ansprechen kann.
Verfasst: Sonntag 11. April 2010, 00:09
von waki
hmm, finde das nur als debian file, und kann leider bei meinem lame keine setup.py finden. Könntest du mir den link zu deinem geben?
Verfasst: Sonntag 11. April 2010, 00:54
von Leonidas
waki hat geschrieben:Könntest du mir den link zu deinem geben?
Klar,
hier. Ist im Tarball, vermute mal dass die ZIP-Datei den gleichen Inhalt hat.
Verfasst: Sonntag 11. April 2010, 13:21
von waki
da ist nur eine gen_docs.py drin, keine setup.py. Oder mach ich was falsch? :S Ist nur eine setup.in drin ...
Verfasst: Sonntag 11. April 2010, 16:12
von Leonidas
Oh, sorry, hab nicht genau genug geschaut. Aber in der README steht wie man es hinbekommt:
Verfasst: Sonntag 11. April 2010, 19:04
von waki
sorry, aber wenn ich das in meine konsole eingebe, kommt, dasser den befehl "make" nicht kennt. Brauch ich da noch ein prog dafür?
Verfasst: Sonntag 11. April 2010, 19:23
von Leonidas
Offensichtlich brauchst du ``make``, ja.
Verfasst: Sonntag 11. April 2010, 20:14
von waki
ok, hab jetzt GNU make, aber das unterstütz keine 64-bit systeme

help?
Verfasst: Sonntag 11. April 2010, 20:16
von Leonidas
waki hat geschrieben:ok, hab jetzt GNU make, aber das unterstütz keine 64-bit systeme

Doch, ich hab hier auch GNU make auf amd64.
Verfasst: Sonntag 11. April 2010, 20:22
von waki
ich hab mir GNU make 3.81 runtergeladen und wenn ich dann die makefile.dos ausfürhen will, kommt:
Code: Alles auswählen
Die Version von C:\Users\user\Programme\make-3.81\makefile.com ist nicht mit de
r ausgeführten Windows-Version kompatibel. Öffnen Sie die Systeminformationen de
s Computers, um zu überprüfen, ob eine x86-(32 Bit)- oder eine x64-(64 Bit)-Vers
ion des Programms erforderlich ist, und wenden Sie sich anschließend an den Hera
usgeber der Software.
Verfasst: Sonntag 11. April 2010, 20:31
von BlackJack
@waki: Schön das jetzt auch mal das verwendete Betriebssystem zur Sprache kommt.
Du musst halt ein Make installieren das zu Deinem Betriebssystem passt.
Als nächstes ist dann wahrscheinlich die Installation eines C-Compilers fällig…
Verfasst: Sonntag 11. April 2010, 20:47
von waki
sry, hmm, hab jetzt msys, aber der meldet mir einen boot error...
Code: Alles auswählen
$ make -f Makefile.pre.in boot
rm -f *.o *~
rm -f *.a tags TAGS config.c Makefile.pre python sedscript
rm -f *.so *.sl so_locations
VERSION=`python -c "import sys; print sys.version[:3]"`; \
installdir=`python -c "import sys; print sys.prefix"`; \
exec_installdir=`python -c "import sys; print sys.exec_prefix"`; \
make -f ./Makefile.pre.in VPATH=. srcdir=. \
VERSION=$VERSION \
installdir=$installdir \
exec_installdir=$exec_installdir \
Makefile
/bin/sh: python: command not found
/bin/sh: python: command not found
/bin/sh: python: command not found
make[1]: Entering directory `/c/users/Kille/Programme/py-lame-0.1'
make[1]: *** No rule to make target `/lib/python/config/Makefile', needed by `sedscript'. Stop.
make[1]: Leaving directory `/c/users/Kille/Programme/py-lame-0.1'
make: *** [boot] Error 2
€: Wie schwer es sein kann, eine dumme libary zum laufen zu bingen -.-
Ich hätte auch pymake inzwischen, aber weis auch nciht wie das geht ....
help, please
Verfasst: Sonntag 11. April 2010, 21:04
von Leonidas
waki hat geschrieben:sry, hmm, hab jetzt msys, aber der meldet mir einen boot error...
Er meldet dass er den Befehl ``python`` nicht finden kann. Du musst ``%PATH%`` setzen (siehe FAQ, Wie starte ich Skripte).
Verfasst: Sonntag 11. April 2010, 21:06
von derdon
waki hat geschrieben:€: Wie schwer es sein kann, eine dumme libary zum laufen zu bingen -.-
Mit Linux wär das nicht passiert!

Verfasst: Sonntag 11. April 2010, 21:21
von waki
Code: Alles auswählen
$ make -f Makefile.pre.in boot
rm -f *.o *~
rm -f *.a tags TAGS config.c Makefile.pre python sedscript
rm -f *.so *.sl so_locations
VERSION=`python -c "import sys; print sys.version[:3]"`; \
installdir=`python -c "import sys; print sys.prefix"`; \
exec_installdir=`python -c "import sys; print sys.exec_prefix"`; \
make -f ./Makefile.pre.in VPATH=. srcdir=. \
VERSION=$VERSION \
installdir=$installdir \
exec_installdir=$exec_installdir \
Makefile
make[1]: Entering directory `/c/Users/Kille/Programme/py-lame-0.1'
make[1]: *** No rule to make target `Files'. Stop.
make[1]: Leaving directory `/c/Users/Kille/Programme/py-lame-0.1'
make: *** [boot] Error 2
Variable erstellt, geht trotzdem nicht

Verfasst: Sonntag 11. April 2010, 21:40
von Leonidas
Ok, dieses Makefile-Gewurstel ist echt nicht hübsch, nimm mal diese ``setup.py``:
Code: Alles auswählen
from distutils.core import setup, Extension
module1 = Extension('lame',
sources = ['lamemodule.c'])
setup (name = 'lame',
version = '0.1',
description = 'lame interface',
ext_modules = [module1])
Verfasst: Sonntag 11. April 2010, 21:47
von waki
ausgeführt, installation erfolgriech aber hab keine lame modul zum importieren -.-
Code: Alles auswählen
C:\Users\Kille\Programme\py-lame-0.1>setup.py install
running install
running build
running build_ext
building 'lame' extension
error: None
C:\Users\Kille\Programme\py-lame-0.1>python
Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lame
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named lame
>>> import pylame
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pylame
>>>
Verfasst: Sonntag 11. April 2010, 22:23
von Leonidas
Schau mal ob bei dir in ``site-packages`` irgendeine ``.pyd``-Datei liegt, die vom Namen her passt.
Verfasst: Montag 12. April 2010, 12:09
von waki
im ganzen python ordner ist nichts mit lame....