Very good.
You are recording from two different sources by using a mixer (audiomixer) element. Maybe it is too busy consuming the audio packages (buffers).
Also remove the "queue" and from the pipeline (it may even make it worse)
And remove the "audioresample" from the pipeline. Seems the elements can negotiate their format without it.
Hello,
Very good.
You are recording from two different sources by using a mixer (audiomixer) element. Maybe it is too busy consuming the audio packages (buffers).
Gstreamer has at least three different kind of mixer elements for audio. /gstreamer. freedesktop. org/documentati on/adder/ index.html? gi-language= c
It has "adder" element.
https:/
And "liveadder" element. /gstreamer. freedesktop. org/documentati on/audiomixer/ liveadder. html?gi- language= c
https:/
And "audiomixer" element. /gstreamer. freedesktop. org/documentati on/audiomixer/ audiomixer. html?gi- language= c
https:/
They seems to be similar in usage. There maybe even more audio mixer elements.
Please try to change the mixer element from "audiomixer" to "liveadder" (or even to the older "adder" element).
For example:
gst-launch-1.0 -e liveadder name=mixer ! level ! audioconvert ! audio/x- raw,rate= 44100,channels= 2 ! lamemp3enc name=enc target=0 quality=2 ! filesink location=test.mp3 pulsesrc device= alsa_output. usb-GN_ Audio_A_ S_Jabra_ EVOLVE_ 30_II_000245089 11A07-00. analog- stereo. monitor ! queue ! mixer. pulsesrc device= alsa_input. usb-GN_ Audio_A_ S_Jabra_ EVOLVE_ 30_II_000245089 11A07-00. analog- mono ! queue ! mixer.
Also remove the "queue" and from the pipeline (it may even make it worse)
And remove the "audioresample" from the pipeline. Seems the elements can negotiate their format without it.
Try this:
gst-launch-1.0 -e liveadder name=mixer ! level ! audioconvert ! audio/x- raw,rate= 44100,channels= 2 ! lamemp3enc name=enc target=0 quality=2 ! filesink location=test.mp3 pulsesrc device= alsa_output. usb-GN_ Audio_A_ S_Jabra_ EVOLVE_ 30_II_000245089 11A07-00. analog- stereo. monitor ! mixer. pulsesrc device= alsa_input. usb-GN_ Audio_A_ S_Jabra_ EVOLVE_ 30_II_000245089 11A07-00. analog- mono ! mixer.
Some of the mixer elements (adder, liveadder or audiomixer, etc) can take parameters (properties) on the command line (or by/in c-code).
Study the properties with gst-inspect-1.0 or in the online manual. latency
$ gst-inspect-1.0 liveadder
...
latency
min-upstream-
...
Try to fine-tune the element by setting its properties.
Eg. liveadder latency=90
gst-launch-1.0 -e liveadder name=mixer latency=90 ! level ! audioconvert ! audio/x- raw,rate= 44100,channels= 2 ! lamemp3enc name=enc target=0 quality=2 ! filesink location=test.mp3 pulsesrc device= alsa_output. usb-GN_ Audio_A_ S_Jabra_ EVOLVE_ 30_II_000245089 11A07-00. analog- stereo. monitor ! mixer. pulsesrc device= alsa_input. usb-GN_ Audio_A_ S_Jabra_ EVOLVE_ 30_II_000245089 11A07-00. analog- mono ! mixer.
Etc.
Please tell me if you find a working solution.
----
You can also debug the Gstreamer pipeline by setting the GST_DEBUG variable. Google for "debugging Gstreamer" for more info.
$ GST_DEBUG=2 gst-launch-1.0 -e liveadder latency=100 name=mixer ! level ! audioconvert ! audio/x- raw,rate= 44100,channels= 2 ! lamemp3enc name=enc target=0 quality=2 ! filesink location=test.mp3 pulsesrc device= alsa_output. pci-0000_ 00_1f.3. analog- stereo. monitor ! mixer. pulsesrc device= alsa_input. pci-0000_ 00_1f.3. analog- stereo ! mixer.
Please tell me if you find a working solution. It would be very helpfull.
Cumprimentos
Osmo Antero
Portugal