[FFmpeg-devel] [PATCH] x11grab: fix vertical repositioning
octalffdev at alvarezp.org
Mon Apr 1 20:17:01 EEST 2019
On 4/1/19 7:41 AM, Carl Eugen Hoyos wrote:
>> The patch is untested, but it looks fairly straightforward.
> How can this patch be tested?
ffmpeg -y -r 30 -f x11grab -show_region 1 -draw_mouse 0 -s 350x614
-follow_mouse 10 -i :0.0+0,0 -r 30 -preset ultrafast followcapture-test-.mkv
A dotted frame will appear. Try to move the mouse outside of the frame.
Cancel with Ctrl+C when needed.
Without the patch the frame follows the mouse in the up, left and right
direction 10 pixels before the mouse exits the frame. This is correct.
However, for the bottom direction, the frame follows 10 pixels *after*
the mouse exits the frame, which is wrong.
With the patch this should be fixed: for the bottom direction it should
also follow the mouse 10 pixels before the pointer exits the frame.
The "10" pixels can be adjusted in the -follow_mouse 10 argument.
Watching the output file should not be needed. It's the mouse-following
behavior that has the bug.
More information about the ffmpeg-devel