I am using FFmpeg-python bindings for using FFmpeg. I have to take input from x11grab, for which I already have an equivalent command in shell i.e,
ffmpeg -nostdin -hide_banner -nostats -loglevel panic -video_size 1920x1080 -r 60 -framerate 30 -f x11grab -i :1 -f alsa -ac 2 -i pulse -preset fast -pix_fmt yuv420p file.mkv &
I have gone through docs of FFmpeg-Python to create an equivalent command, however, I could not find any example of x11grab in the documentation.
I wanted to use a binding to make the code more readable, the command works with subprocess.call() / os.system()