Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-01-18 22:33:49

#! Junkie
Registered: 2013-10-10
Posts: 337

[SOLVED] Capture Video of Desktop on 2nd Screen

I have a nice command to capture a video of my desktop/s.  (ffmpeg is compiled with x11grab)

I have two screens, main to the left, secondary to the right, a continuation of main.

If I run:

ffmpeg -f x11grab -s `xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -r 25 -i :0.0 ./Desktop/mydesktop.mkv

I get a video of both screens as one, with a size of 3840x1080  yikes smile

If I run

ffmpeg -f x11grab -s 1920x1080 -r 25 -i :0.0 ./Desktop/mydesktop1.mkv

I get my main screen smile

How would I do a screen video capture of my secondary screen only? (e.g from 1921-3840)

Last edited by Joe90 (2015-01-19 02:04:47)


Be excellent to each other!

#2 2015-01-18 23:19:34

#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667

Re: [SOLVED] Capture Video of Desktop on 2nd Screen

A really wild guess on my part since I only have one screen and don't have ffmpeg is compiled with x11grab

ffmpeg -f x11grab -s 1921x3840 -r 25 -i :0.0 ./Desktop/mydesktop2.mkv

Let me know.

Edit: mydesktop2.mkv

Last edited by Sector11 (2015-01-18 23:20:21)

·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad


#3 2015-01-18 23:37:22

#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634

Re: [SOLVED] Capture Video of Desktop on 2nd Screen

^ Probably want that to be "1921x1080"  wink

That's not going to work though, as you'll need offset of x-coördinate + 1920x1080. I'm not sure how to specify this. The offset should obviously be 1921, but again: not sure how to specify it.

If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!


#4 2015-01-19 00:01:47

#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: [SOLVED] Capture Video of Desktop on 2nd Screen

this may help. The o.o specifies the display, +x,x specifies offset as below:

0.0 is display.screen number of your X11 server, same as the DISPLAY environment variable.

ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0+10,20 /tmp/out.mpg

Link to manual


#5 2015-01-19 02:03:18

#! Junkie
Registered: 2013-10-10
Posts: 337

Re: [SOLVED] Capture Video of Desktop on 2nd Screen

Figured it out, in fact I appear to have answered something similar to this on another forum @ 3 years ago, must be my age!

The screen size is the same as in the second example: "-s 1920x1080", but as tknomanzr rightly points out, I needed an x coordinate after the display section:    :0.0+1920,0.

Full code for secondary screen capture:

ffmpeg -f x11grab -s 1920x1080 -r 25 -i :0.0+1920,0 ./Desktop/mydesktop1.mkv

Thanks for the help guys  smile


Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo