Comment 8 for bug 1671931

Revision history for this message
moma (osmoma) wrote :

Sorry for double posting, but I am repeating the last reply without the `*`s.

Very good.
Now you have the recording command. Let us test it in a terminal window (command line).

0) Open a terminal window (for example, press: CNTR + ALT + t)

1) First, install gstreamer1.0-tools package. The gst-launch-1.0 command comes from that package. Run this command:
sudo apt install gstreamer1.0-tools

2) Now test the Gstreamer-pipeline.
Run your recording command (be careful not to break it. It is one, long line).
Notice: the command will record to (output to) test.mp3 file.

gst-launch-1.0 -e pulsesrc device=alsa_input.pci-0000_00_12.2-usb-0_3.analog-stereo ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2 ! lamemp3enc name=enc target=0 quality=2 ! xingmux ! id3mux ! filesink location=test.mp3

Now check if the output test.mp3 has content. Re-play it. Play it in the video player (totem).
totem test.mp3

Hope this will clarify if the recording works or not.
---

Looks like the devices (in the list) are found and ok.
Looks like the Gstreamer pipeline (recording command() is ok.

You may also add a "volume" element to the pipeline. It increases or decreases the volume/audio level (0.1 ... 10) of the recording.
Ref: https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-volume.html

With the "volume" element, the command becomes:

gst-launch-1.0 -e pulsesrc device=alsa_input.pci-0000_00_12.2-usb-0_3.analog-stereo ! volume volume=6 ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2 ! lamemp3enc name=enc target=0 quality=2 ! xingmux ! id3mux ! filesink location=test.mp3

Play or produce some sound/noise on the alsa_input.pci-0000_00_12.2-usb-0_3.analog-stereo device. Then record it with the above command.
Again, replay the test3.mp3 file to check the content. Change the volume= value (between 0.1 ... 10) and check again test.mp3. Ok?

Check also the audio (input) settings.
Please see: http://bildr.no/view/QUhPa0Jh
Start it from the sound-menu (icon). Check the input level (is it muted or low?)

There are also the "pacmd" and "pactl" commands that can do magical things. I do not know`em well.
pacmd --help
pactl --help

Please report your findings.