How do I capture my second monitor using avconv?
- by Codemonkey
With this command:
avconv -f x11grab -s 2560x1440 -i :0.0
I can stream video from my main monitor. I also have a second, 1080p monitor on which I do my gaming. I want to stream from that monitor. This doesn't work:
avconv -f x11grab -s 1920x1080 -i :0.1
I assume I have to use -i :0.0 and somehow specify that it should capture 1920x1080 pixels from X position 2560 and Y position 0. My gaming monitor is placed to the right of my main monitor. Unfortunately the man page for avconv is miles long, so I haven't had any luck figuring this out on my own.
I have tried
Using -vf with crop like this:
-vcodec libx264 ... -vf "crop=$IN_WIDTH:$IN_HEIGHT:2560:360"
But that only displayed 1080p video from the top left corner of my main display.