Command to resize windows

Asked by Phil Norisez

Is there a command or program that supports forcing a window to a particular size (say 1024x576) by using the window id returned by xwininfo, or by any other means from outside the window? I'm trying to use ffmpeg to record videos of given windows and activity therein, and my client requires the aforementioned size. I tried setting the -s option on the output codec, which is mpeg4, but that only seems to expand the x11grab and cut off some of the target window. If the actual window can't be set to the desired size, can the output be scaled with the same quality that X11 scales a window when one uses the mouse to do so?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu wmctrl Edit question
Assignee:
No assignee Edit question
Solved by:
Phil Norisez
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You can use devilspie (if you do, grab gdevilspie from google code) and you can make windows act as you wish.

Revision history for this message
Phil Norisez (norisezp) said :
#2

@actionparsnip: Devilspie appears to be far more complex than I need, what with the Lisp s-expressions and all. I have also read a number of posts that complain about it not working. The documentation does not help me figure out how to use the thing. Is it a command line program, or a daemon, or what? What I would like is something that can be invoked from a command line for development, and later programaticaly. Have you any other suggestions?

Revision history for this message
Phil Norisez (norisezp) said :
#3

BTW: I solved my ffmpeg issue, but the result was that the target window was put into a 1024x576 video, with black bars on the top and bottom, which is not acceptable. So, you see, I really need to set the window to 1024x576 before recording. Hope that explains what I'm driving at.

Revision history for this message
Phil Norisez (norisezp) said :
#4

@actionparsnip: Found wmctrl which does just what I want. Setting question to Problem Solved.