Dom0 screen recorder for 4.1

Does anyone know
Is there a “screen recorder” available too install in dom0 like OBS studio? I see screen shot and use it but would like to also record videos. The problem is IF you have a screen recorder installed in a template and try to use it, within the template, well it doesn’t work right, believe me I have tried.

1 Like

Screen recorders work fine for me in templates, (of course they will only record the respective appVM which has said template).

Alternatively, if you wish to screen-record dom0:

1 Like

@Quser59 thanks, I may need to look more at OBS Studio setting, maybe I am not setting up something right. Really don’t want to install unnecessary software to Dom when I can use it in appvm.

In most cases you may not need a dom0 recorder but rather a recordable environment in Qubes OS. For example, you want to record and broadcast the screen to your audience when you are programming.

In this case, run a Xephyr in your appvm, run all application you want inside this Xephyr instance and record the screen inside the Xephyr. This approach has been working for me for years. It may take some time to configure a little and automate the Xephyr process by writing a shell script or python script or a dockerfile, but it is worthwhile.

This approach even has its advantage: you can select what windows to record and what not to record since you can do something in :1 (inside the Xephyr) so that it is recorded, while do other things in :0 so that it is not recorded.

My personal opinion here: dom0 screenshoter is necessary as you do not know that you need screenshoting until you actually need it (for example, something crashes with a information that will disappear in 10 seconds); screen recording is not in that case - you usually have a plan for it.

1 Like

A non-intrusive way to get screen recording is a HDMI to USB converter. There are devices for about $ 10.00 which allow to capture the screen from an HTML output on the Qubes system. The USB side of the device may be connected to another computer which will see it as a webcam, and there you may record the video. This all works without installing any software in Dom0.

3 Likes

@logoerthiner thank you for the information but I am not familiar with this software…Xephyr
So I am trying to understand what you a e saying.
I understand have it in my appvm and run it. But let’s say I am watch a video on YouTube and want to screen record it with OBS studio.
I would launch this…Xephyr… And then have to go into OBS studio and select Xephyr to port over YouTube video to OBS and then let OBS record it?
Just a little confused here with how to use it and screen record videos.
Maybe you can elaborate or help me understand?

@GWeck thank you too but I am really trying to limit all my hardware that accesses my qubes plus I would like to keep everything nice and neat. If you know what I mean?

Usage of Xephyr is straightforward. Xephyr is basically opening another X server and render all the content of the X server inside one :0 window. (For example, you want to record you watching a video in browser)

  1. Start it. For example Xephyr :1. You will see a black window. You can add more command line options to resize the window or tweak other things.

  2. (Optional) DISPLAY=:1 xfce4-session (if you are using fedora-xx-xfce based template) or something similar (gnome-session? I am not sure). This makes the window more like a desktop and less ugly.
    The step 1 and 2 here can be wrapped inside a docker, see x11docker.

  3. Run firefox by DISPLAY=:1 firefox. The firefox will appear inside the Xephyr. Then you can play with the firefox inside the Xephyr. Watch your video.

  4. Run your recorder, with a env prefix of DISPLAY=:1. For example you can use OBS or ffmpeg.

The recorder will record everything inside the Xephyr window. And if you do not prefix your command with DISPLAY=:1, your GUI application will not appear in the Xephyr window.

By the way, running a program inside a Xephyr instance is also one of methods to solve many miscellaneous bugs caused by existence of qubes gui daemon.

1 Like

Related:

Thanks Everyone, I will give this a go this weekend, looking forward to being able to record videos I watch. But first I have to get my issue fix "sys-usb’ with 4.1 as someone here is helping me out. Then I will get back to you guys, hopefully with good news.

hi friends

i am still searching for screen recorder for dom0. using simplescreenrecorder for capture the video in qube area like work. which is running successful. But not able to find solution in dom0 area.

It may be a bit complicated and a bit sluggish, but in the past I’ve managed to record the dom0 screen by setting up a vnc server in dom0, following something like this:

Then you just record the dom0 screen from the an app qube.

In dom0, install ffmpeg, then run

ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0+0,0 screen-record.mp4`

This will record a 1920x1080 (adapt to your resolution) video of your screen at a 30 fps rate.

1 Like

The thing is ffmpeg isn’t available in dom0.

Oh right, I thought it was there :frowning: Is it because of third party repository required in fedora to have ffmpeg? Maybe this will be available with Q4.2? :thinking:

There are official static builds Download FFmpeg

Doesn’t look like it. I couldn’t find it in Index of /r4.2/current/dom0/fc37/rpm/

That could work

I tried using the static binary on dom0 and the command above, it’s working perfectly fine. The video is smooth and contains exactly what you see from dom0 point of view.

You need to trust the binaries though.

3 Likes

I’m happy to hear that it worked, I was going to suggest ffmpeg as well but also noticed that it wasn’t available. I might build ffmpeg myself and use it, thanks for testing.

1 Like

To summarize the conclusion, it requires these steps:

  1. Download ffmpeg static binaries. (read this security disclaimer) on an internet-connected qube
  2. Copy the file to dom0
  3. Run ffmpeg with parameters like these:
5 Likes

I tried all this, but the size of applications inside the Xephyr is different from the -screen size I set for it. What can be the problem?

P.S. xfce4-panel takes all space, but other applications like firefox take some fixed size, like 800x600 or something. Running xfce4-session gives windows captions but maximize button in the caption does nothing.