Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Record audio from two microphone and video from one webcam and mux using FFMPEG [closed]

Iam trying to mux audio from two different microphones and video from webcam using ffmpeg in linux.
I used the following code
ffmpeg -f video4linux2 -s 320x240 -i /dev/video0 -f alsa -ac 1 -i hw:1,0 -acodec libmp3lame -ab 96k camera.mp4
it works for muxing audio from one microphone and video from one webcam

I went through forums and googled for an hour without any positive result.



So, the question is i need to mux two audio from microphones and one video from webcam and produce a video output with two audio tracks.

Thanks

like image 367
KingWealth Avatar asked Oct 11 '25 09:10

KingWealth


1 Answers

Use

ffmpeg -f video4linux2 -s 320x240 -i /dev/video0 -f alsa -ac 1 -i hw:1,0 -f alsa -ac 1 -i hw:2,0 -map 0 -map 1 -map 2 -acodec libmp3lame -ab 96k camera.mp4
like image 55
Gyan Avatar answered Oct 17 '25 08:10

Gyan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!