Screencasts on Ubuntu

For a colleague I just made a screencast of a problem we were discussing. I was trying to use the minimum amount of tools in Gnome/Ubuntu and wanted to share the proces with you all.

Goal: Create a screencast recording of my desktop with narrated (recorded) audio at the same time.

If you are very curious and want to see the result immediately, look at the video below:

“Apache Kafka files store data without encryption”

I use Pop!_OS 21.04, which is based of Ubuntu. In Pop!_OS I use Gnome with Wayland.
All the instructions below will work with Ubuntu and any Ubuntu based distribution as well.

This howto is divided in several sections:

  • Desktop (Video) recording
  • Audio recording
  • Putting the video and audio recording together

Additional tools used in the video:

  • Show the webcam (guvcview)
  • Written annotation on a page (xournal++)
  • Written annotation on screen (Draw On You Screen)

Video recording:

Since I want to use the most simple method, my approach is to use the built-in screen cast ability in Gnome.

Press Ctrl+Alt+R to start the screen cast recording.

When the recording is in progress, you see a red filled circle in your notification area:

When you press Ctrl+Alt+R again, the circle disappears and the recording is saved to the Videos folder in your home folder:

Note: This video file is without audio.

Audio recording

As the most simple solution I used the builtin Sound Recorder in Gnome:

Press “Record” to start your recording and click “Done” when you would like to end your recording. You can see me pressing the buttons in the recorded screen cast.

Important: You need to press the screencast start keyboard command Ctrl+Alt+R and the Record button at the same time, or your video and audio will be out of sync.

When you stop the recording, the Ogg Vorbis file will be saved in the default location in your home folder, which is: ~/Recordings.

Combine the video and audio

Right now you have two separate files, not really useful when they are not combined.

To combine them, I used the following command:

ffmpeg -y -i Videos/Screencast\ from\ 05-12-2021\ 02:51:06\ PM.webm -i Recordings/Clip\ 5 -map 0:v -map 1:a -c copy file.webm

Explanation of the command:

ffmpeg
 this is the command itself
-y
 overwrite output files without asking
-i {file location}
 input file + file location
 Note that there are two input files (video & audio)
-map
 Designate one or more input streams as a source for the output file. The number is the first (0) or second (1) input file. The map itself shows what we are using in the output. In this case it is 0:v to use the video for the first input file and 1:a to use the audio of the second input file
-c copy file.webm
 Specify the output file, in this case it will be copied to file.webm in the same directory as where you run the command.

The result is what happens here:

GIF recording of putting the video and audio together (Recorded with Peek GIF Recorder)

This is the minimum necessary to create a screencast!

For example, you can send this webm video output file to people over email / file share / whatever you’d like. You can also upload it to Youtube, which can process the output file and you are done to spread some knowledge!

Add some extra spice to your screencast

To add some engagement with whoever will view your screencast, you can show your own webcam in the screen. You can use the built in program Cheese

Another option is to use guvcview, which has a cleaner interface (no buttons on the webcam output window)

Install with sudo apt install guvcview , start the program with guvcview.

Then select your video input device. You can minimize the settings pane so that you’re left with only the video of your webcam for the introduction/conclusion of your video.

Annotation

For annotation I use Xournalpp (xournal++) which helps me in drawing with my XP-Pen drawing tablet. I think it makes the screen cast a bit more entertaining compared to showing plain text but you can decide for yourself.

You can also use a Gnome Extension called Draw on You Screen by Abakkk, with this extension you can do annotations directly on the screen and thus show your thoughts / comments / pointers on screen directly.

Note: I don’t use this extension in my example video though.

Conclusion

I hope this blog post helps you in creating screen casts with the simplest possible tools. Good luck and hope to see your videos around on the web!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.