ffmpeg: record your Linux desktop without problems

Ffmpeg logo

ffmpeg is a collection of free software utilities that almost everyone will already know. The latest stable version has been 1.1, and it can record, convert, stream audio and video, it contains codecs, etc. It was originally created for Linux, although it can be used on other systems. Now you can record your desktop using this pack and show your friends things that happen or use it to record video tutorials.

Some time ago I looked for tools  to record what happened on my computer screen to make Linux video tutorials, after much searching and testing, the tools I found did not convince me for my openSuSE (I finally stayed with recordmydesktop), instead for Ubuntu I found xvidcap.

Well then, i will explain something so that they don't have to look as much if it happens to them as it does to me and the existing programs for it are not very convincing. This is how to do it thanks to ffmpeg and PulseAudioVolume Control. If you have these two packages installed (ffmpeg and pavucontrol), the first thing is to open PulseAudio Volume Control and go to the "Recording" screen, there we will choose the option "Monitor of Built-in Audio AnalogStereo" for recording. Then, to automate the process and do it in a simple way, we just have to run a script using one of the following commands (located in the same directory where it is located):

         sh desktop recorder

         ./recording desk

         source desktop recorder

But first we have to create that script so that it can be executed. To do this, we open a text sheet with the editor that we want and we will call the file "desktop recorder.sh" without quotes and inside we write:

#! / Bin / bash
STR = "@"
NAME = ”myivideo.avi”
if [$ STR]; then
NAME = "$ @"
else
echo "If you don't specify the name of the video file, myivideo.avi will be used"
NAME = ”myivideo.avi”
fi
#NAME = ”$ (echo $ NAME | sed 's / \ / \\ / g')”;
echo "Saving in $ NAME ...";
ffmpeg –f alsa –i default –f x11grab –s ZZZZxYYYY –r RR –i: 0.0 –sameq “$ NAME”

If you look at the last line of the scriptWith the x11grab parameter we can record the area indicated after –s (you must replace ZZZZxYYYY by the resolution or size of the area you want to record, for example 800 × 640). The –r option allows us to enter the framerate for the video to be recorded (RR must be replaced by that factor, for example 30). And voila, after saving the script you can start using it.

More information - VP9 the new compression format for Google video

Source - xpressrazor


Leave a Comment

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

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Total said

    Hello, when copying from wordpres the single and double quotes lose their correct format and it does not work, can you write it in code format or upload it somewhere as a file? Thanks

  2.   tarribalis said

    Thanks. In the resolution, eg 1280X800, the X must be capitalized for the command to work.