[FFmpeg-user] x11-grab error : Segmentation fault (core dumped)

Li Hui lihuicau at gmail.com
Tue Jul 15 09:58:15 CEST 2014


I can use x11-grab to capture vnc screen with depth 16bit correctly. But with depth 24 or 32bit, it doesn’t work.

I use this command:
ffmpeg -f x11grab -video_size 1280x720 -framerate 25 -i :5 /tmp/out.yuv
than, display this error:
ffmpeg version N-64657-g2d91b3b Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul 15 2014 03:18:27 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  libavutil      52. 92.100 / 52. 92.100
  libavcodec     55. 69.100 / 55. 69.100
  libavformat    55. 46.100 / 55. 46.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 10.100 /  4. 10.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
[x11grab @ 0xe8cd00] device: :5 -> display: :5 x: 0 y: 0 width: 1280 height: 720
[x11grab @ 0xe8cd00] shared memory extension found
Segmentation fault (core dumped)

The display info as below:
xdpyinfo -display :5
name of display:    :5
version number:    11.0
vendor string:    The XFree86 Project, Inc
vendor release number:    40300000
XFree86 version: 4.3.0
maximum request size:  4194300 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    2
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  window 0x40000e, revert to PointerRoot
number of extensions:    24
    BIG-REQUESTS
    DEC-XTRAP
    DOUBLE-BUFFER
    Extended-Visual-Information
    FontCache
    GLX
    LBX
    MIT-SCREEN-SAVER
    MIT-SHM
    MIT-SUNDRY-NONSTANDARD
    RANDR
    RECORD
    SECURITY
    SGI-GLX
    SHAPE
    SYNC
    TOG-CUP
    VNC-EXTENSION
    X-Resource
    XC-APPGROUP
    XC-MISC
    XFree86-Bigfont
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    1280x720 pixels (325x183 millimeters)
  resolution:    100x100 dots per inch
  depths (2):    1, 32
  root window id:    0x2e
  depth of root window:    32 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x21
  default number of colormap cells:    2048
  preallocated pixels:    black 0, white 4282370040
  options:    backing-store YES, save-unders YES
  largest cursor:    1280x720
  current input event mask:    0xfa8033
    KeyPressMask             KeyReleaseMask           EnterWindowMask
    LeaveWindowMask          ExposureMask             StructureNotifyMask
    SubstructureNotifyMask   SubstructureRedirectMask FocusChangeMask
    PropertyChangeMask       ColormapChangeMask
  number of visuals:    8
  default visual id:  0x24
  visual:
    visual id:    0x24
    class:    TrueColor
    depth:    32 planes
    available colormap entries:    2048 per subfield
    red, green, blue masks:    0x7ff, 0x3ff800, 0xffc00000
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x25
    class:    TrueColor
    depth:    32 planes
    available colormap entries:    2048 per subfield
    red, green, blue masks:    0x7ff, 0x3ff800, 0xffc00000
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x26
    class:    TrueColor
    depth:    32 planes
    available colormap entries:    2048 per subfield
    red, green, blue masks:    0x7ff, 0x3ff800, 0xffc00000
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x27
    class:    TrueColor
    depth:    32 planes
    available colormap entries:    2048 per subfield
    red, green, blue masks:    0x7ff, 0x3ff800, 0xffc00000
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x28
    class:    DirectColor
    depth:    32 planes
    available colormap entries:    2048 per subfield
    red, green, blue masks:    0x7ff, 0x3ff800, 0xffc00000
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x29
    class:    DirectColor
    depth:    32 planes
    available colormap entries:    2048 per subfield
    red, green, blue masks:    0x7ff, 0x3ff800, 0xffc00000
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x2a
    class:    DirectColor
    depth:    32 planes
    available colormap entries:    2048 per subfield
    red, green, blue masks:    0x7ff, 0x3ff800, 0xffc00000
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x2b
    class:    DirectColor
    depth:    32 planes
    available colormap entries:    2048 per subfield
    red, green, blue masks:    0x7ff, 0x3ff800, 0xffc00000
    significant bits in color specification:    8 bits


Thank you.
Best Regard!
Li Hui


More information about the ffmpeg-user mailing list