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

2014-07-15 Thread Li Hui
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
  libavformat55. 46.100 / 55. 46.100
  libavdevice55. 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
  libpostproc52.  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:4030
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 0x4e, 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, 0xffc0
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, 0xffc0
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, 0xffc0
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, 0xffc0
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, 0xffc0
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, 0xffc0
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, 0xffc0
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, 0xffc0
significant bits in color specification:8 bits


Thank you.
Best Regard!
Li Hui
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2014-07-15 Thread Li Hui
> I can not find a commit with shorthash 2d91b3b in the current Git tree. Can
> you explain how you got your source tree exactly? An excerpt of "git log"
> would probably help.

I fork from 2a9b4c0 to add customize codec.

> Can you explain how you arrived to that configuration? I tried with my
> current X11 server (Intel HD), which has this: "depths (7): 24, 1, 4, 8, 15,
> 16, 32", and it works.

I use this command vncserver -geometry 1280x720 -depth 32 to get DISPLAY :5.

Thank you a lot.

On Jul 15, 2014, at 5:12 PM, Nicolas George  wrote:

> Le septidi 27 messidor, an CCXXII, Li Hui a écrit :
>> 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
>  ^^^
> I can not find a commit with shorthash 2d91b3b in the current Git tree. Can
> you explain how you got your source tree exactly? An excerpt of "git log"
> would probably help.
> 
>> [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
>> screen #0:
>>  dimensions:1280x720 pixels (325x183 millimeters)
>>  resolution:100x100 dots per inch
>>  depths (2):1, 32
> 
> Can you explain how you arrived to that configuration? I tried with my
> current X11 server (Intel HD), which has this: "depths (7): 24, 1, 4, 8, 15,
> 16, 32", and it works.
> 
> Also, please remember to send bug-reports to the users' mailing-list unless
> you have a patch to fix them.
> 
> Regards,
> 
> -- 
>  Nicolas George
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel