[FFmpeg-trac] #4574(avdevice:new): The x11grab input refuses to capture the full screen claiming the capture area is outside the screen size
FFmpeg
trac at avcodec.org
Fri May 22 11:36:52 CEST 2015
#4574: The x11grab input refuses to capture the full screen claiming the capture
area is outside the screen size
----------------------------------+--------------------------------------
Reporter: es | Type: defect
Status: new | Priority: important
Component: avdevice | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
It seems the the following commit broke fullscreen recording with
x11grab:
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=9ccaeff67a3b0f75f7f25c39c5d373b560dcfb19
How to reproduce:
{{{
$ xrandr
Screen 0: minimum 8 x 8, current 1280 x 720, maximum 32767 x 3276
[...]
$ ffmpeg -f x11grab -framerate 30 -threads 0 -s 1280x720 -i :0 capture.mp4
[x11grab @ 0x16a0a60] Capture area 1280x720 at position 0.0 outside the
screen size 1280x720
:0: Invalid argument
$ ffmpeg -version
ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC) 20150304 (prerelease)
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --enable-avisynth --enable-avresample --enable-fontconfig
--enable-gnutls --enable-gpl --enable-libass --enable-libbluray --enable-
libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug
--enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-
libschroedinger --enable-libspeex --enable-libssh --enable-libtheora
--enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libx265 --enable-libxvid --enable-shared --enable-version3
--enable-x11grab --enable-libfdk_aac --enable-nonfree
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
}}}
These lines in libavdevice/xcbgrab.c
{{{
if (c->x + c->width >= geo->width ||
c->y + c->height >= geo->height) {
}}}
should be changed to
{{{
if (c->x + c->width > geo->width ||
c->y + c->height > geo->height) {
}}}
which fixes the problem for me.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4574>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list