Unix 子窗口的ffmpeg捕获输出

Unix 子窗口的ffmpeg捕获输出,unix,ffmpeg,x11,Unix,Ffmpeg,X11,使用xwininfo-all我可以看到任何窗口及其子窗口的统计信息 xwininfo: Window id: 0x3c000ba "Electro - The Slag & Prototype Raptor - Crescendo - YouTube - Mozilla Firefox" Root window id: 0xa8 (the root window) (has no name) Parent window id: 0xc001b8 (has no name)

使用
xwininfo-all
我可以看到任何窗口及其子窗口的统计信息

xwininfo: Window id: 0x3c000ba "Electro - The Slag & Prototype Raptor - Crescendo - YouTube - Mozilla Firefox"

  Root window id: 0xa8 (the root window) (has no name)
  Parent window id: 0xc001b8 (has no name)
     2 children:
     0x3c00175 (has no name): ()  1388x876+0+0  +52+24
        5 children:
        0x3d210ab (has no name): ()  854x510+225+197  +277+221
           1 child:
           0x3d210ac (has no name): ()  854x510+0+0  +277+221
              1 child:
              0x40404de "plugin-container": ("plugin-container" "Plugin-container")  854x510+0+0  +277+221
                 2 children:
                 0x40404e1 (has no name): ()  854x510+0+0  +277+221
                 0x40404df (has no name): ()  1x1+-1+-1  +276+220
        0x3ddbcf2 (has no name): ()  640x390+225+162  +277+186
           1 child:
           0x3ddbcf3 (has no name): ()  640x390+0+0  +277+186
              1 child:
              0x403d545 "plugin-container": ("plugin-container" "Plugin-container")  640x390+0+0  +277+186
                 2 children:
                 0x403d548 (has no name): ()  640x390+0+0  +277+186
                 0x403d546 (has no name): ()  1x1+-1+-1  +276+185
        0x3dac7f9 (has no name): ()  640x390+225+162  +277+186
           1 child:
           0x3dac7fa (has no name): ()  640x390+0+0  +277+186
              1 child:
              0x4039d8b "plugin-container": ("plugin-container" "Plugin-container")  640x390+0+0  +277+186
                 2 children:
                 0x4039d8e (has no name): ()  640x390+0+0  +277+186
                 0x4039d8c (has no name): ()  1x1+-1+-1  +276+185
        0x3c3f939 (has no name): ()  640x390+225+197  +277+221
           1 child:
           0x3c3f93a (has no name): ()  640x390+0+0  +277+221
              1 child:
              0x4011918 "plugin-container": ("plugin-container" "Plugin-container")  640x390+0+0  +277+221
                 2 children:
                 0x401191b (has no name): ()  640x390+0+0  +277+221
                 0x4011919 (has no name): ()  1x1+-1+-1  +276+220
        0x3c0d1dc (has no name): ()  1x1+0+97  +52+121
           1 child:
           0x3c0d1dd (has no name): ()  1x1+0+0  +52+121
              1 child:
              0x4002c1e "plugin-container": ("plugin-container" "Plugin-container")  1x1+0+0  +52+121
                 2 children:
                 0x4002c40 (has no name): ()  1x1+0+0  +52+121
                 0x4002c1f (has no name): ()  1x1+-1+-1  +51+120
     0x3c000bb (has no name): ()  1x1+-1+-1  +51+23

  Absolute upper-left X:  52
  Absolute upper-left Y:  24
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1388
  Height: 876
  Depth: 24
  Visual: 0x23
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +52+24  -0+24  -0-0  +52-0
  -geometry 1388x876-0-0

  Bit gravity: NorthWestGravity
  Window gravity: NorthWestGravity
  Backing-store hint: NotUseful
  Backing-planes to be preserved: 0xffffffff
  Backing pixel: 0
  Save-unders: No

  Someone wants these events:
      KeyPress
      KeyRelease
      ButtonPress
      ButtonRelease
      EnterWindow
      LeaveWindow
      PointerMotion
      Exposure
      VisibilityChange
      StructureNotify
      FocusChange
      PropertyChange
  Do not propagate these events:
  Override redirection?: No

  Window manager hints:
      Client accepts input or input focus: Yes
      Initial state is Normal State
      Displayed on desktop 0
      Window type:
          Normal
      Window state:
          Maximized Vert
          Maximized Horz
      Process id: 4087 on host jb
      Frame extents: 0, 0, 0, 0

  Normal window size hints:
      Program supplied minimum size: 18 by 97
      Program supplied maximum size: 1073741824 by 1073741824
      Program supplied window gravity: NorthWestGravity
  No zoom window size hints defined

  No window shape defined
  No border shape defined
但是,如果我尝试在给定子窗口的大小和偏移量的情况下从屏幕捕获,那么当另一个窗口浮动到它的顶部时,我会有丢失数据的风险,我会在录制时切换到另一个选项卡,调整子窗口的大小,或者移动子窗口。相反,我想使用ffmpeg来捕获特定于该子窗口的内容


想法?提示?也许是其他一些黑客来完成这个?谢谢:)

您应该使用n,
重定向窗口
请求

这正是我要找的,但是最小化时,X11窗口似乎没有更新,可能也不在视图中(即,在视图中有另一个选项卡/页面时,尝试录制Youtube视频)。也许我会坚持使用ffmpeg和预定义的大小/偏移量。谢谢:)据我所知,即使使用复合/损坏也不可能-不需要未映射的窗口来公开更新。但是,重叠/遮挡的窗口应该可以正常工作-这就是使用复合管理器时透明度的工作方式。看一看一些参考的composite manager实现,例如xcompmgr—另一个关于复合/损坏的好方法: