You are not logged in.

#1 2014-12-25 00:17:51

oshogun
Member
Registered: 2014-12-22
Posts: 4

Record both audio from the microphone and output

Hello. I was planning to do some livestreaming of some steam games and stuff like that. I have no problems recording either the microphone or the notebook playback, but apparently my hardware does not support capturing my playback via ALSA. (Goddamnit intel)

So, is there any software that will help me do my recording on arch? Or I will have to just give up my livestreaming (recording both the system audio and my mic) :v

Last edited by oshogun (2014-12-25 00:18:42)

Offline

#2 2014-12-25 11:25:58

aurabindo
Member
From: Toronto
Registered: 2012-05-26
Posts: 41
Website

Re: Record both audio from the microphone and output

Did you try Jack? https://wiki.archlinux.org/index.php/JA … ection_Kit

It can route any source to any sink. I havent done such a thing you mentioned, but theoritically it should be possible to redirect the track diretly going to the speaker to another sink, say a track in ardour, And ardour's master track can given to your speaker.
So you have the sound being recoder in ardour, and at the same time, being played back through your speaker. Needless to say that you just have to associate the microphone to another track in ardour

Though jack has always been a mess to me. But it prefectly fulfils your requirement.

Offline

#3 2014-12-25 14:04:53

oshogun
Member
Registered: 2014-12-22
Posts: 4

Re: Record both audio from the microphone and output

Sounds good. I'll give it a read.

Offline

#4 2014-12-25 22:40:19

teckk
Member
Registered: 2013-02-21
Posts: 578

Re: Record both audio from the microphone and output

capturing my playback via ALSA

Make a virtual loopback device.

~/.asoundrc

pcm.!default {
  type asym
  playback.pcm "LoopAndReal"
  #capture.pcm "looprec"
  capture.pcm "hw:0,0"
}

pcm.looprec {
    type hw
    card "Loopback"
    device 1
    subdevice 0
}


pcm.LoopAndReal {
  type plug
  slave.pcm mdev
  route_policy "duplicate"
}


pcm.mdev {
  type multi
  slaves.a.pcm pcm.MixReale
  slaves.a.channels 2
  slaves.b.pcm pcm.MixLoopback
  slaves.b.channels 2
  bindings.0.slave a
  bindings.0.channel 0
  bindings.1.slave a
  bindings.1.channel 1
  bindings.2.slave b
  bindings.2.channel 0
  bindings.3.slave b
  bindings.3.channel 1
}


pcm.MixReale {
  type dmix
  ipc_key 1024
  slave {
    pcm "hw:0,0"
    rate 48000
    #rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192
  }
}

pcm.MixLoopback {
  type dmix
  ipc_key 1025
  slave {
    pcm "hw:Loopback,0,0"
    rate 48000
    #rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192
  }
}

Then modprobe snd-aloop

Then capture what you will, example:

ffmpeg -f alsa -i hw:1,1 -c:a libmp3lame -b:a 32k -vn capture.mp3

After your done rename the ~/.asoundrc Save it for when you need it.
modprobe -r snd-aloop

Offline

Board footer

Powered by FluxBB