Hi., today I am gonna show you simple script that I use to record my screen. Ffmeg is very usefull tool for video recording, editing, etc. Ffmpeg have a lot of options and one of them is recording screen with detailed options.
Here is my script.
ffmpeg -f x11grab -r 25 -s 1600x900 -i :0.0+, -acodec pcm_s16le -vcodec libx264 -threads 8 ~ismail/downloads/video_$(date +"%Y-%m-%d-%H-%M").mkv
option specify input or source device which is xorg screen device
is record frame rate per second and 24,25 is generally used values
is screen resolution or pixel matrix for selected input
is start pixel from left upper corner where we set now 0
is used to recording sound and set codec for sound encoding and compression
is video codec used for compressing the screen
is a performance options that specifies how much cpu core (multiply core count with 2) will be used while processing
is where the output will be saved and with the mkv enxtension we automatically specify video encoding format $(date +”%Y-%m-%d-%H-%M”) specifiy set file name with current time information and rendered as shell command and then added to the file name
I hope this simple tutorial make some help for you.