two issues when recording sound
Pablo Rodriguez
oinos at gmx.es
Mon Dec 2 07:59:07 PST 2013
Many thanks for your reply, Osmo.
I took a look, but C is almost unintelligible to me. I need more time to
read your code again.
Many thanks for your help,
Pablo
On 12/01/2013 10:09 PM, Osmo Antero wrote:
> Or pipeline_create_simple function.
>
>
> On Sun, Dec 1, 2013 at 9:06 PM, Osmo Antero <osmoma at gmail.com
> <mailto:osmoma at gmail.com>> wrote:
>
> Hello,
> I do not know gst-python, but in my c-code based recorder I have to
> create a bin from the (caps) capability string.
> I think you should use the gst_parse_bin_from_description(...)
>
> Please take a look at my recorder. It links to Gstreamer 1.0 (not 0.10).
> http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/gst-pipeline.c
> Look for the "pipeline_create_complex" function.
>
> I have hard-coded some audio profiles (capability strings) in:
> http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/media-profiles.c
>
> Audio-recorder itself:
> https://launchpad.net/audio-recorder/
>
> Osmo (Moma) Antero
>
>
> On Sun, Dec 1, 2013 at 6:33 PM, Pablo Rodriguez <oinos at gmx.es
> <mailto:oinos at gmx.es>> wrote:
>
> 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