1

I have plugged my phones into rear Line-In socket of my computer. I want to use it as stereo microphone, I tried this on desktop and it worked.

Now, how can I record sound from it with command line?

For example, if I use ffmpeg, I have no means to configure input socket. If I run

ffmpeg -f alsa -i sysdefault:CARD=MID -t 30 out.wav

but records absolutely silent file.

Alsamixer screen is following:

enter image description here

Areord shows following:

$ arecord -L
default
    Playback/recording through the PulseAudio sound server
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=MID
    HDA Intel MID, VT1708S Analog
    Default Audio Device
front:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    Front speakers
surround40:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    Direct sample mixing device
dsnoop:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    Direct sample snooping device
hw:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    Direct hardware device without any conversions
plughw:CARD=MID,DEV=0
    HDA Intel MID, VT1708S Analog
    Hardware device with all software conversions

UPDATE

After I have configured input in gnome-control-center it started to work.

enter image description here

But I don't want to use GUI tools, I need command-line-only solution.

0

if you wanted to record from Line in ALSA, maybe you would hear sound if you select Line as capture device and increase capture level from 0

you could use arecord command for recording from ALSA

arecord -f [format] -D hw:card,device -d [duration]

  • But how to select source? Sound card has multiple IN sockets, rear and front panel. How to select them? – Dims Jan 21 '18 at 15:49
  • 'arecord -L' will list sound PCM device. then use 'arecord --device=[PCM NAME]'. see 'man arecord' for additional options – nik gnomic Jan 22 '18 at 17:06
  • arecord -L output is above. I don't see any microphones and/or line ins there. – Dims Jan 22 '18 at 18:24
  • my bad, should have been arecord -l ,or arecord --list-devices. have edited my answer to general arecord command, but need to check intel MID card number (probably hw:0 if is only card) and device number for mic – nik gnomic Jan 23 '18 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.