FFMPEG Directshow Multiple Audio Capture

audiodirectshowffmpegwindows

Is it possible to capture multiple audio devices using ffmpeg dshow? I am trying to capture my desktop using gdigrab along with mic and speaker audio using dshow. I have tried using the following command but it doesn't work:

ffmpeg -f dshow -i audio="Stereo Mix (Realtek High Definition Audio)" -f dshow -i audio="Microphone Array (Creative VF0800)" -f gdigrab -framerate 10 -video_size 1920x1080 -draw_mouse 1 -i desktop screen.avi

It only captures audio from the first mentioned audio device. Am I missing some options in the above command?

Best Answer

In this case, you have to expressly map all needed streams, as the auto mapping will only pick up one audio stream. So,

ffmpeg -f dshow -i audio="Stereo Mix (Realtek High Definition Audio)"
       -f dshow -i audio="Microphone Array (Creative VF0800)"
       -f gdigrab -framerate 10 -video_size 1920x1080 -draw_mouse 1 -i desktop
       -map 2 -map 0 -map 1 screen.avi
Related Question