Search code examples
windowsffmpeggdiscreen-capture

How to record two windows at once using ffmpeg?


I'm currently using this code:

ffmpeg -f gdigrab -framerate 30 -i title="Chrome" -b:v 3M  output.flv

To capture a specific window title.

Would like to ask how I could also capture a second window title, and save both streams to just one output file?


Solution

  • Basic syntax would be

    ffmpeg -f gdigrab -framerate 30 -i title="Chrome" -f gdigrab -framerate 30 -i title="OtherWindow" -map 0 -map 1 -b:v 3M output.mp4

    (You can only save one video stream in a FLV file)