Saving audio while streaming video using ffmpeg While I was checking streaming guide, I noticed that I can stream my webcam and mic using a command like the following:
ffmpeg -f dshow -i video=&quot;screen-capture-recorder&quot;:audio=&quot;Stereo Mix (IDT High Definition&quot; \
-vcodec libx264 -preset ultrafast -tune zerolatency -r 10 -async 1 -acodec libmp3lame -ab 24k \ 
-ar 22050 -bsf:v h264_mp4toannexb -maxrate 750k -bufsize 3000k -f mpegts udp://192.168.5.215:48550

But wonder if I can save audio in a file while streaming video. The reason is that I want to use opencv to process video stream and then merge the result of opencv processing with the audio file. Any idea if it is possible to save audio in a file while streaming video alone?
Firstly, you should stream webcam and mic through the udp multicast address i.e. 224.1.1.1:10001.
Secondly, you execute ffmpeg -i udp://224.1.1.1:10001 out.mp3 or more options of the FFMPEG audio to do the audio extraction on another command prompt.