two issues when recording sound
Pablo Rodriguez
oinos at gmx.es
Sun Dec 1 10:33:33 PST 2013
Hi there,
first of all, congratulations for your excellent work on Gstreamer and
many thanks for releasing it under a free license.
I have a small script that records sound from microphone to a .wav file.
it is written in Python. You can find it at
https://github.com/ousia/iRaccoonShow/blob/master/recslides.py, but the
relevant part is:
self.player = gst.Pipeline("player")
#~ self.clock = self.player.get_clock()
self.source = gst.element_factory_make("alsasrc", "alsa-source")
#~ self.caps = gst.Caps("audio/x-raw-int,rate=16000,channels=1")
self.encoder = gst.element_factory_make("wavenc", "wavenc")
self.fileout = gst.element_factory_make("filesink", "sink")
self.fileout.set_property("location", self.audiofilename )
self.player.add(self.source, self.encoder, self.fileout)
gst.element_link_many(self.source, self.encoder, self.fileout)
Before I forget, I use Fedora 19, which comes with gstreamer-0.10.36.
When I start the script, I always get the following error:
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
How could I fix this?
The other issue is the only commented line in the code snippet above. I
would like to have the sound recorded with a lower frame rate and only
one channel (otherwise, output files are huge).
How should I integrate the self.caps line, so that I have an output
files with these features?
Many thanks for your help,
Pablo
--
http://www.ousia.tk
More information about the gstreamer-devel
mailing list