GNOME Bugzilla – Bug 575290
Add a built-in screencast recording facility
Last modified: 2009-03-20 21:19:48 UTC
For development and demonstration purposes, it's neat to be able to record a screencast of gnome-shell without any external setup. Built-in recording can also give much better quality than is possible with a generic desktop recording, since we hook right into the paint loop. src/shell-recorder.[ch]: A general-purposes object to record a Clutter stage to a GStreamer stream. src/shell-recorder-src.[ch]: A simple GStreamer source element (similar to appsrc in the most recent versions of GStreamer) for injecting captured data into a GStreamer pipeline. src/test-recorder.c: Test program that records a simple animation. configure.ac src/Makefile.am: Add machinery to conditionally build ShellRecorder. tools/build/gnome-shell-build-setup.sh: Add gstreamer packages to the list of required packages for Fedora. js/ui/main.js: Hook up the recorder to a MetaScreen ::toggle-recording keybinding.
Created attachment 130608 [details] [review] Add a built-in screencast recording facility
Created attachment 130609 [details] [review] Add a "toggle_recording" keybinding Here's the metacity patch to hook it up. Note that the I added the ::toggle-recording signal to MetaScreen in contrast to the existing MetaDisplay::overlay-key. The MetaScreen location seems to fit in better with the overall structure: both plugins and global keybindings are handled per-screen in Metacity. Though practically speaking it's not going to matter much.
I don't know much about gstreamer so I can't comment much on most of the patch. Also, I'm not sure if the metacity-clutter patch is incomplete or what, but applying it (and fixing the apply failure) and rebuilding (even with -a -c) doesn't cause metacity to grab that key for me. So I haven't actually seen the code work yet at all. Update gnome-shell-build-setup.sh to include gstreamer? Typing Ctrl+Alt+Shift+r crashes Xephyr. Might be nice to have a default binding that is Xephyr-friendly. Although that would mean no Alt+Function key either though given Xephyr's keymap issues. Maybe just have a non-keybinding way to enable it? It looks like the recording is dumped into cwd? It ought to put it in ~/Desktop (or rather, "XDG_DESKTOP_DIR") The comment in recorder_fetch_cursor_image() seems like it is wrong. (The cursor *does* change as you move it around...)
(In reply to comment #3) > I don't know much about gstreamer so I can't comment much on most of the patch. Thanks for the review anyways. One of the GStreamer guys looked at the custom element and didn't see anything too bad. (He had one recommendation that I fixed.) > Also, I'm not sure if the metacity-clutter patch is incomplete or what, but > applying it (and fixing the apply failure) and rebuilding (even with -a -c) > doesn't cause metacity to grab that key for me. So I haven't actually seen the > code work yet at all. There's something wrong with the default - if you set the gconf key with gconf-editor I think it will work. I need to figure that out. > Update gnome-shell-build-setup.sh to include gstreamer? Didn't I do that? > Typing Ctrl+Alt+Shift+r crashes Xephyr. Might be nice to have a default binding > that is Xephyr-friendly. Although that would mean no Alt+Function key either > though given Xephyr's keymap issues. Maybe just have a non-keybinding way to > enable it? Hard to say what is friendly to "keymap on total crack". Probably need to just investigate that and figure out what is going on. > It looks like the recording is dumped into cwd? It ought to put it in ~/Desktop > (or rather, "XDG_DESKTOP_DIR") For some reason it ends up in ~. We seem to be changing to there at some point. Dumping it on a desktop means that the recordings will show up as you record multiple movies within a session. Maybe into ~/Documents? > The comment in recorder_fetch_cursor_image() seems like it is wrong. (The > cursor *does* change as you move it around...) Left-over comment.
(In reply to comment #4) > > Update gnome-shell-build-setup.sh to include gstreamer? > > Didn't I do that? Oops. Yes. > > It looks like the recording is dumped into cwd? It ought to put it in ~/Desktop > > (or rather, "XDG_DESKTOP_DIR") > > For some reason it ends up in ~. We seem to be changing to there at some point. > Dumping it on a desktop means that the recordings will show up as you record > multiple movies within a session. The same is true of "taking multiple screenshots" too though.
Committed. Filed some followups about future enhancements: Bug 576130 – Better handling of recorder output Bug 576132 – Allow configuring Theora pipeline for recorder Bug 576133 – Throttle recorded frames to the framerate