0

Office PC has to record what operators say to clients and contrariwise way - clients to operator. I got low resourse solution. But is there way to combine this two commands?

ffmpeg.exe -f dshow -i audio="Microphone MIC" -threads 2 m1.mp3

and

ffmpeg.exe -f dshow -i audio="Microphone StereoMix" -threads 2 m2.mp3

Also, possible that first source is being recorded to left channel and second one - to right of final output file. Maybe there are some suggestions about additional options too. Thanks.

TarasPro
  • 43
  • 8

1 Answers1

1

Simple mix of inputs, both will sound in all channels

ffmpeg.exe -f dshow -i audio="Microphone MIC" -f dshow -i audio="Microphone StereoMix" -filter_complex "[0][1] amix [a];[a] volume=volume=2 [b]" -map "[b]" -threads 2 m1.mp3

Volume filter is added since amix would render the volume of each input to half.


If you need to split each input to a different channel, you could use join, but if your input sounds are stereo, you should mix them previously into mono to avoid loosing anything.

Assuming mono inputs, result would be first input at left, second at right:

ffmpeg.exe -f dshow -i audio="Microphone MIC" -f dshow -i audio="Microphone StereoMix" -filter_complex "join=inputs=2:channel_layout=stereo:map=0.0-FL|1.0-FR" -threads 2 m2.mp3

Assuming stereo inputs, adjusting volume is not needed since each channel for the same input should be somewhat similar:

ffmpeg.exe -f dshow -i audio="Microphone MIC" -f dshow -i audio="Microphone StereoMix" -filter_complex "[0]channelsplit=channel_layout=stereo[a][b];[1]channelsplit=channel_layout=stereo[c][d];[a][b]amix[e];[c][d]amix[f];[e][f]join=inputs=2:channel_layout=stereo:map=0.0-FL|1.0-FR[g]" -map "[g]" -threads 2 m3.mp3
NuTTyX
  • 2,628
  • 11
  • 15
  • there is an error for first command: **[AVFilterGraph @ 0000000005761820] No such filter: '[0][1]' Error configuring filters.** another ones don't work at all, i do not understand all this parametrs in filter section and have no idea what's wrong – TarasPro Oct 18 '14 at 21:30
  • Check quotes around commands and try using double quotes `"` instead of single quotes `'`. Every command I posted here was tested on my box so there should be no errors in the filters. – NuTTyX Oct 18 '14 at 21:49
  • the first command is great, i've changed quotes and it worked well. but #2 and #3 - there is no "split into channels", no errors too, but it records as the first command – TarasPro Oct 18 '14 at 22:30
  • #2 and #3 should leave audio from each input into a different channel of the stereo output -first to left channel, second to right-. At least they do on my box -checked with headphones- – NuTTyX Oct 18 '14 at 22:40
  • Yes! I've found problem. It's my headphones - it's kind of mono. – TarasPro Oct 18 '14 at 22:58