After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 575290 - Add a built-in screencast recording facility
Add a built-in screencast recording facility
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-03-13 21:27 UTC by Owen Taylor
Modified: 2009-03-20 21:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a built-in screencast recording facility (73.13 KB, patch)
2009-03-13 21:27 UTC, Owen Taylor
none Details | Review
Add a "toggle_recording" keybinding (3.13 KB, patch)
2009-03-13 21:30 UTC, Owen Taylor
none Details | Review

Description Owen Taylor 2009-03-13 21:27:21 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.
Comment 1 Owen Taylor 2009-03-13 21:27:24 UTC
Created attachment 130608 [details] [review]
Add a built-in screencast recording facility
Comment 2 Owen Taylor 2009-03-13 21:30:42 UTC
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.
Comment 3 Dan Winship 2009-03-18 14:48:19 UTC
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...)
Comment 4 Owen Taylor 2009-03-18 14:59:43 UTC
(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.
Comment 5 Dan Winship 2009-03-18 16:01:33 UTC
(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.
Comment 6 Owen Taylor 2009-03-20 21:19:48 UTC
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