I am trying to use FFmpeg to stream a specific window on my computer. While the video works flawlessly, adding the audio is being problematic. Whenever I had audio (using -f dshow), the video's fps dramatically drops to 3 to 5 fps and a ton of dropped frames occur. Here is the command I am using:

ffmpeg -f gdigrab -draw_mouse 0 -i title="MainWindow" -f dshow \
       -i audio="CABLE Output (VB-Audio Virtual Cable)" \
       -c:v mpeg2video -b:v 4000k -c:a aac -b:a 64k -f mpegts udp://localhost:1234

The audio doesn't seem clear also (like it sound somewhat garbleled). I have tried to split the video and audio and then combine them. When I combine the audio and video, I get a black and white screen with what looks like an old-fashioned image. (The window I am trying to record isn't recognizable). What is going on and how can I fix it?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.