x11grab in ffmpeg do not record system cursor

Bug #539407 reported by Ivan Bessarabov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ffmpeg (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

I want to record the screencast with ffmpeg. I'm doing it with this command:

ffmpeg -r 15 -g 30 -s 1280x1024 -f x11grab -s 800x600 -i :0.0 -vcodec qtrle screencast.mov

The video is recorded ok, but I have one, but serious problem: the mouse pointer always looks the same. In my screencast I'm shoing the browser and when the mouse is over the link is looks like a hand, but in the record the pointer is just the arrow.

So my question is how can I record the exact mouse cursers with ffmpeg.

I'm using ubuntu 9.10

ffmpeg -version
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
  libavutil 49.15. 0 / 49.15. 0
  libavcodec 52.20. 0 / 52.20. 0
  libavformat 52.31. 0 / 52.31. 0
  libavdevice 52. 1. 0 / 52. 1. 0
  libavfilter 0. 4. 0 / 0. 4. 0
  libswscale 0. 7. 1 / 0. 7. 1
  libpostproc 51. 2. 0 / 51. 2. 0
  built on Oct 13 2009 22:15:16, gcc: 4.4.1
FFmpeg SVN-r19352-4:0.5+svn20090706-2ubuntu2
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0

Revision history for this message
Ivan Bessarabov (bessarabov) wrote :

Before posting a bug, there was s short discussion on this matter in https://answers.launchpad.net/ubuntu/+source/ffmpeg/+question/104339

Revision history for this message
llogan (loul) wrote :

Real cursor support was introduced in FFmpeg revision 20631. Unfortunately, FFmpeg from the Ubuntu repository for Karmic and Lucid are older and therefore lack this addition. However, you could compile FFmpeg yourself to gain this feature. Refer to:

HOWTO: Install and use the latest FFmpeg and x264
http://ubuntuforums.org/showthread.php?t=786095

Changed in ffmpeg (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
czheng (czheng-deactivatedaccount) wrote :

Compiling the latest version of ffmpeg from SVN does allow you to capture the system cursor, but it looks pretty awful at this point. I suspect they'll have the kinks worked out by the time it's next released.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ffmpeg - 4:0.6~svn20100505-1ubuntu1

---------------
ffmpeg (4:0.6~svn20100505-1ubuntu1) maverick; urgency=low

  * merge from debian/experimental. remaining changes:
    - don't disable encoders
    - don't build against libfaad, libdirac and libopenjpeg (all in universe)

ffmpeg (4:0.6~svn20100505-1) experimental; urgency=low

  * update to new upstream. Closes: #569727
    - fixes various segfaults and other minor feature improvements
      Closes: #374931, #522449, #501891, #559712, #420231, #369127, #538082,
              #298095, #294422, #561553, #525385, #495274, #420230
      LP: #305286, #457106, #529200, #301723, #305315, #336479, #420230,
          #412063, #428912, #432181, #440591, #453732, #453732, #453732,
      #514259, #515243, #521472, #530186, #530186, #197842, #483317,
     #483317, #539407, #280098, #331255, #566107, #569823, #570305,
     #573190
  * Fixup lintian overrides for new upstream snapshot
  * Bump Standards-Version to 3.8.4
  * Many upstream changes, see upstream Changelog for details
 -- Reinhard Tartler <email address hidden> Wed, 26 May 2010 00:01:17 +0200

Changed in ffmpeg (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Marco Hunsicker (ubuntu-triemax) wrote :

While ffmpeg captures a mouse cursor, it really does not look like the system cursor for me, more like a lower resolution version of it. Is this system dependent?

I'm using FFmpeg version SVN-r24829 under Ubuntu 10.04 running within VmWare 3.1.1. No desktop effects, but Metacity compositing enabled.

If anybody could comment whether svn20100505 should really make the cursor look exactly like the system cursor, I would appreciate your feedback. Otherwise I would like to re-open this bug.

Revision history for this message
llogan (loul) wrote :

The behavior I believe you are describing has already been reported upstream:

x11grab fails to render mouse shadow transparency
https://roundup.ffmpeg.org/issue2056

I consider bug #539407 and the bug on roundup to be two separate issues.

Revision history for this message
Marco Hunsicker (ubuntu-triemax) wrote :

Yes, that is exactly what I experience. Thanks much for your quick reaction.

Looks like there is an easy workaround as described in http://ubuntuforums.org/showthread.php?p=9731073

Revision history for this message
llogan (loul) wrote :

This has been further improved upstream by r25690 which closes upstream issue 2056. Now FFmpeg properly captures the system mouse with transparency.

Make x11grab cursor drawing suck less:
http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=191a50db964768ca4418bdf00b26159a77879b9c

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.