Screencasting from Qubes OS

For quick tutorials and demos, I make screencasts to share with clients and colleagues, typically using OBS Studio. What is a sane approach to achieving this in Qubes OS?

Required:

  • Screencast of mouse pointer and multiple Windows
  • Real-time voice recording

Nice to have:

  • Real-time webcam recording
  • As viewed from dom0 (to demo Qubes OS itself, but this is low priority for me)

Options that I can make out are:

  • Running an AppVM in full-screen mode, giving it access to the mic/webcam, installing OBS Studio and making screencasts in that context

  • As above without full-screen mode, not clear to me what this would look like

  • Installing OBS Studio (or some other tool) in dom0, and recording the whole Qubes OS desktop, but even if possible I assume this is not a good idea

Are any of these options obviously worth/not worth pursuing? Any options I’ve missed?

2 Likes

This seems to work well with OBS Studio, though it doesn’t give you the dom0 view:

Create a nested X server via Xephyr. The Arch Linux wiki has a good description of how to do this: https://wiki.archlinux.org/index.php/Xephyr . Then share the nested X server. You can have an arbitrary number of windows there and even start any window manager in this X server instance.

Capture card setup

There is also this setup I found interesting:

setup

Qubes —HDMI—> Capture Card (HDMI to USB) —USB–> Qubes → AppVM w/ OBS → jitsi

Explanation from within Qubes (youtube link!) and from the outside perspective of the user (youtube link!).

6 Likes

Create a nested X server via Xephyr. The Arch Linux wiki has a good description of how to do this: https://wiki.archlinux.org/index.php/Xephyr . Then share the nested X server. You can have an arbitrary number of windows there and even start any window manager in this X server instance.
Hi,
personally I am completely new to Arch Linux. Therefore please tell me with what commands I can install Xephyr within Fedora 32 or Debian 10. In order to screencast my Qube manager and my VMs with OBS-Studio.
Thank you.

Debian: the package is xserver-xephyr (install via sudo apt install xserver-xephyr)

Fedora: the package is xorg-x11-server-Xephyr (install via sudo dnf install xorg-x11-server-Xephyr)

Thank you for your help. I managed to install Xephyr successfully in Fedora 32. Also I achieved to execute Xephyr -br -ac -noreset -screen 800x600 :1 . However that was it. So far I don`t understand how to record my screen with OBS Studio and Xephyr. Please help me. Stay healthy & safe. Thank you.

Just to make sure we are on the same page, this will enable you to record what is happening in the black window started by running the Xephyr command. This window is a virtual screen or more properly a new virtual server. This won’t let you record the entire desktop.

To make things show up in this virtual screen, you have to prepend your commands with DISPLAY=:1 as explained in the Arch Wiki page. For instance, DISPLAY=:1 firefox should open Firefox in this virtual screen. You may also want to start a window manager in this screen first (see the wiki for an example as well).

If you run OBS in the same qube, there should be an option to select the screen/X server environment you want to share. You should be able to select :1 or something like that. At least it worked in the past. In the worst case, start OBS in the same screen. I think this is required for something like Zoom for instance (so DISPLAY=:1 zoom).

Let me know if you run into any roadblocks and we can work from there.

Is this truly the process for using OBS with Qubes? I have a Substack that’s about influence ops stuff, and it’s got a section called “Tool Time”, where I offer short videos showing how I do various tasks. That’s been done with OBS latching on to the output of a VM running Ubuntu Budgie that’s purpose built for those tasks.

This seems like one of those things that being secure will make really arduous.

It’s possible to use a static build of ffmpeg on dom0 for recording the screen

see Dom0 screen recorder for 4.1 - #12 by solene

2 Likes

That’s PERFECT.

A rather bloated executable, but knowing that works is about the last problem I need to solve.

Is there a history of people using AppImage in dom0?

just to be sure, I said ffmpeg is a static binary, it’s NOT an AppImage.

1 Like

yes, I got that - a static image with all libraries included.

But is there a similar ability to use AppImage stuff? Those are also monolithic binaries.

1 Like

AppImage should work on dom0, a commonly missing dependency for AppImages fuse which may not be installed on dom0 by default.

Good news, it seems obs-studio is now packaged for Fedora, and on Qubes OS 4.2, Fedora isn’t that old Unofficial Linux Builds · obsproject/obs-studio Wiki · GitHub

There is also this unofficial AppImage build of OBS Releases · ivan-hc/OBS-Studio-appimage · GitHub (not the same person doing the static ffmpeg build)

2 Likes

This is excellent news. The only barrier left for me shifting work is getting a solid Wireguard VPN template and something I can do OpenVPN with for that one provider that must have it.

I’ve been anticipating a Christmas bonus and cruising Ebay. Looks like a Dell Precision laptop with Xeon and 32GB is going to be just $300 - $400. Having a mobile device with Qubes will be a big goad towards getting me up to speed :slight_smile:

1 Like

Does anyone have experience with qubes-video companion reagrding screencasting?

Would also be interested in this question as I still do not understand its use case.

I tried last year, the experience was worse than passing the webcam with sys-usb :woman_shrugging:

1 Like

Hello, I just found this thread trying OBS on Qubes.

I installed OBS with FlaPak and works great out of the box: webcam+mic+screen recording.

The only thing that I does not seem to work is “Window Capture” (where only a single window is captured). When I add a `Window Capture (Xcomposite)", no windows appear in the list to choose from. That is, it looks like OBS can’t see the window of the appVM. However it can capture the screen very well.

Question: anybody managed to get OBS and its Window Capture functionality working in Qubes?