Must document your display screen on a Linux desktop however you aren’t happy with the display screen recorders which can be obtainable? Think about using the highly effective FFMPEG encoding instrument. It’s very versatile and may do a number of issues, together with display screen seize on the Linux desktop.
SPOILER ALERT: Scroll down and watch the video tutorial on the finish of this text.
The setup for FFMPEG is a bit more advanced than hitting a “record” button in a program, however the tradeoff is that it presents up some actual energy, automation, and customization that different GUI recording instruments on Linux don’t supply.
Putting in FFMPEG
Ubuntu
sudo apt set up ffmpeg
Debian
sudo apt-get set up ffmpeg
Arch Linux
sudo pacman -S ffmpeg
Fedora
sudo dnf set up ffmpeg
OpenSUSE
sudo zypper set up ffmpeg
Different Linuxes
The FFMPEG encoding utility is likely one of the most used video instruments on Linux and working techniques generally. It’s due to this, the instrument is supported on practically each Linux distribution on the market. If for some motive, the Linux working system you utilize doesn’t assist FFMPEG with a binary package deal, one of the best plan of action is to put in the software program manually, from the FFMPEG Github repository.
To do that, first, ensure you have the git instrument put in. As soon as put in, open up a terminal and do the next to construct the software program:
git clone
Enter the FFMPEG listing with the CD command.
cd FFmpeg
Earlier than you start compiling the software program, you’ll have to create a brand new configuration file. That is in order that the software program is aware of your system and may construct appropriately.
./configure
Having points with ./configure? Attempt:
./configure --help
The subsequent step within the compiling course of is to make use of the make command. Make does nearly all of the constructing, and its essentially the most vital step in putting in FFMPEG.
make
Lastly, set up the software program on the system with the set up command.
sudo make set up
Record Your Screen
The FFMPEG software program may be very versatile and could be configured to do absolutely anything, together with video seize. That stated, the default kind of visible seize that’s attainable works by capturing each display screen obtainable. It’s crude, but it surely works. To use it, open up a terminal window. Contained in the terminal, earlier than beginning seize, it’s a good suggestion to make a particular folder to work in. This manner all recordings go there, fairly than in random locations.
Utilizing the mkdir command to create a brand new seize folder inside ~/Movies.
mkdir -p ~/Movies/ffmpeg-capture/
Then, transfer the terminal into the brand new listing, in order that the seize will happen there, fairly than one other location.
cd ~/Movies/ffmpeg-capture/
Now you can begin recording your display screen. Right here is the fundamental seize command:
ffmpeg -f x11grab -y -r 30 -s 1920x1080 -i :0.0 -vcodec huffyuv out.avi
You should definitely change the decision within the command to correspond with the monitor you might be recording on. Within the command proven above, the decision is ready to 1920×1080 and it’s set to document the desktop at 30 frames per second, and output it to a file named seize.mp4. For essentially the most half, screen-casting at 25 FPS is okay. Nevertheless, when you’re trying to document one thing that requires a excessive body charge (like video video games, or shifting photos), think about altering the 30 to 60. Understand that altering the FPS from 30 to 60 will lead to slower efficiency on weaker computer systems. Earlier than doing this, try to discover out in case your Linux pc can deal with the up in efficiency beforehand.
Give up the recording at any time by tapping the ‘q’ key on the keyboard.
Record Screen And Webcam
It’s attainable to seize the desktop in FFMPEG and document out of your webcam on the similar time. To accomplish that, you’ll want to make use of two separate instructions. The first command to make use of will show the lively webcam at present related to Linux. The second command is the display screen seize.
For the primary command, open a terminal window and enter the next:
ffplay -f video4linux2 -i /dev/video0 -video_size 320x240 -fflags nobuffer
This setup will show a webcam window with nearly no latency instantly on the display screen with a 320×240 display screen decision. Don’t fear in regards to the dimension, because it’ll look simply high-quality on the recording. Be at liberty to seize the cam window and put it in anyplace you’d like. Moreover, in case your window supervisor helps hiding, think about making the digicam window controls disappear for a greater impact.
Observe: when you dislike the 320×240 decision, think about altering it to one thing else. Look into the webcam’s guide to search out the right decision to make use of, however keep in mind, don’t use the next decision than the machine can deal with or issues will break.
Whereas the primary terminal is open, your webcam will likely be displayed on the desktop. Subsequent, open a second terminal window to begin the precise recording:
cd ~/Movies/ffmpeg-capture/
ffmpeg -f x11grab -r 30 -s cif -i :0.0 seize.mp4
So long as these two terminal home windows are open, you’ll be recording the desktop at 30 FPS, and displaying a webcam.
To cease the recording, go to the FFMPEG window and press “q” to give up, then transfer on to the FFPLAY terminal (the one broadcasting the cam) and press Ctrl + Z.
Completed recordings are saved in ~/Movies/ffmpeg-capture/