I want to record the screen with audio using ffmpeg in Windows 10.
The following command works but it does not record the audio:
.\ffmpeg -f gdigrab -framerate 30 -i desktop output.mkv
To fix the issue, first I enable Audio Mix device from control panel > sounds
and then tried to find it in my audio devices with the follwing command:
.\ffmpeg -list_devices true -f dshow -i dummy
I try different syntaxes to add audio to the video in the first command:
.\ffmpeg -f gdigrab -framerate 60 -video_size 1920x1080 -i desktop -f dshow -i audio="Stereo Mix (Realtek(R) Audio)" -vcodec libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv422p -f mpegts udp://ip
.\ffmpeg -f gdigrab -i desktop -f dshow -i audio="Stereo Mix (Realtek(R) Audio)" -vcodec libx264 muxed-video-file.mp4
but the error is always the same:
Could not run graph (sometimes caused by a device already in use by other application)
audio=Stereo Mix (Realtek(R) Audio): I/O error
Please let me know if you know a working solution or a hint :-)



