shell - Script to record the sound of a program to the microphone -


i want make shell script record sound of program , direct microphone entry on linux.

for instance, i'm listening music on youtube, , want music send skype's conversation instead of voice.

last not least, know how using pavucontrol, have go "recording" , switch "record stream from", want exact same thing command line, , not using gui.

i tried this:

pactl load-module module-loopback source=1 sink=2 

(where 1 desktop sound, 2 analog stereo duplex (but includes normal sound on top of input....) , doesn't work expected. don't know do.

thanks

module-loopback can used short-circuit sources sinks. (i.e. mic speaker.) switch found in pavucontrol can accessed command line via

 pactl move-source-output <source output> <source> 

you can source output id via

pactl list source-outputs 

while program recording, , list of sources using

pactl list sources 

you can supply source name, e.g. combined.monitor.

i tried mplayer , audacity , noticed 2 pitfalls:

  • if monitor stereo , default source mono, applications might not being rerouted. can use module-remap-source work around that: remap monitor 1 mono channel , move source output newly created remapped source.
  • you might need unmute monitor device in pavucontrol before works. command line can done using pactl set-source-mute. (see man pactl)

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -