hi All
i am observing strange behavior with alsasrc plugin (gstreamer-1.0) if i capture pcm raw data 6 channel i am not able to get proper data, always corrupted data in fact, if i enable -v for pipe line the caps displayed in the system terminal are part of my pcm data (strange) but this is not happening for 2 channel (the pcm data is clean and perfect) can somebody help me ? the pipeline used gst-launch-1.0 -v alsasrc device=hw:0,0 num-buffers=1 ! audio/x-raw,rate=48000,channels=6,depth=16,width=16 ! filesink location=/tmp/test.pcm regards nagendra |
Hello nagendra sarma
1. Have you tried to use another ALSA plugins (i.e. plughw instead of hw)? See more information about ALSA plugins here: http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html 2. Have you tried to capture data with alsa utility - arecord? 3. What is mean "corrupted data"? Either some samples are missed, or data is asynced, or noise, or nothing. |
This post was updated on .
Hi Valento
thanks for reply, the pipeline posted is working with gstreamer-0.10 but not with gstreamer 1.0 the pcm data captured is having some spikes (looks like clock | | | | | | | | | ) when open with audscity tool and this data is present in 2 nd forth, fifth and 6th channels. if i try to capture 2 channel audio everything works well (problem with 6 channel + gstreamer 1.0) i will check plughw option regards nagendra |
This post was updated on .
hi All
is it possible to know after snd_pcm_readi() where this buffer is going in alsasrc ? could please share gstreamer alsasrc architecture ? also any idea why the "caps" are part of my pcm raw file ? (strange ?) regards nagendra |
In reply to this post by nagendra sarma
Le mercredi 15 février 2017 à 22:31 -0800, nagendra sarma a écrit :
> the pipeline used > gst-launch-1.0 -v alsasrc device=hw:0,0 num-buffers=1 ! > audio/x-raw,rate=48000,channels=6,depth=16,width=16 ! filesink > location=/tmp/test.pcm Jus a note that you have .10 specifics in your caps. In GStreamer 1.0, depth and width fields no longer exists and is replaced with format=. What is likely happening is that alsasrc picks another format, which then looks like corrupted data. Try the following instead: gst-launch-1.0 alsasrc device=hw:0,0 num-buffers=1 ! audio/x-raw,rate=48000,channels=6,format=S16LE ! filesink location=/tmp/test.pcm Note that you could use wavenc before filesink to create a raw file playable by normal media players. regards, Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (188 bytes) Download Attachment |
In reply to this post by nagendra sarma
Le jeudi 16 février 2017 à 05:56 -0800, nagendra sarma a écrit :
> could please share gstreamer alsasrc architecture ? Not much to say in this regards. It's a straight implementation of GstAudioSource [0] class and a very basic usage of libalsa API. Have a look at the code [1]. regards, Nicolas [0] https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugi ns-base-libs/html/gst-plugins-base-libs-gstaudiosrc.html [1] https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/al sa/gstalsasrc.c _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (188 bytes) Download Attachment |
hi Nicolas
thanks, but i already tried with format option format=SL16LE but same result my points are: 1. why the caps are part of pcm file ? if i add -v option to pipeline the caps which are printing in debug console are part of my pcm data (checked in hexeditor) strange ? 2. why this strange behavior for 6 channel ? two channel working fine 3. i displayed raw data coming from pcm_snd_readi() which is proper in case of 6 channel but the data send/push by alsasrc to next element is not matching with data comes from pcm_snd_read() which is not the case in 2 channel ? 3. so, i wanted to know , where this pcm data going, and which is responsible to push to next element ? thanks nagendra |
hi all
i just commented the following code, everything started working, thanks for support #if 0 if (spec->type == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW && alsa->channels < 9) gst_audio_ring_buffer_set_channel_positions (GST_AUDIO_BASE_SRC (alsa)->ringbuffer, alsa_position[alsa->channels - 1]); #endif |
In reply to this post by nagendra sarma
Le 17 févr. 2017 2:18 AM, "nagendra sarma" <[hidden email]> a écrit : hi Nicolas This data is not the same as we need to reorder the channels to GStreamer/SMPTE order.
This is done by the ring buffer, base on hardware provided information.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by nagendra sarma
Hi,
I am also facing similar problem while capturing 8 channel audio. With above changes capture is clear. Is there bug in BugZilla related to this ?? -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by nagendra sarma
nagendra sarma wrote
> i just commented the following code, everything started working, thanks > for > support > > #if 0 > if (spec->type == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW && > alsa->channels > < 9) > gst_audio_ring_buffer_set_channel_positions (GST_AUDIO_BASE_SRC > (alsa)->ringbuffer, alsa_position[alsa->channels - 1]); > #endif Quoted from: http://gstreamer-devel.966125.n4.nabble.com/gstreamer-alsasrc-with-6-channel-tp4681900p4681924.html I also required this patch trying to record from an M-Track USB 8-channel capture device. Without it, all I got was silence or very loud digital buzzing, which seems to line up with the report of an unwanted pulse train earlier. What was the original code even trying to do? -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |