Audio and Video Converter, Compressor and Recorder

Опубликовано: 20 Май 2026
на канале: Abhinav Khajuria
318
1

In this video i had shown how to get and use multi tasking tool FFMPEG for recording and compressing audio video.

Don't forget to like , subscribe , comment and share.

to install ffmpeg in Linux distributions , In terminal type
------------------------------------------------------
sudo apt-get install ffmpeg
------------------------------------------------------
sudo apt-get update
-----------------------------------(to update)------

then create the new folder in user account
use its path in place of
(path to he folder for recorded video)
in below commands.

then use a command called
------------------------------------------------------
xwininfo
-------------------------------(in terminal)--------
Basically, you run this command and then click on the window that you want to capture
(procedure shown in the above video). It will then print the window information to the terminal.


then use this dimensions to record desktop.



below are the terminal commands to


1. for only video recording
.(no audio included)

ffmpeg -f x11grab -r 30 -s (recording dimensions) -i :0.0 -sameq -vcodec libx264 -vpre lossless_ultrafast -threads 0 (path to he folder for recorded video)/Screencast_on_$(date +%F_%A_at_%H:%M:%S).mp4


for low quality
video recording.(no audio included)

ffmpeg -f x11grab -r 30 -s (recording dimensions) -i :0.0 (path to he folder for recorded video)/Screencast_on_$(date +%F_%A_at_%H:%M:%S).mp4



2.

for audio and video


ffmpeg -f x11grab -r 30 -s (recording dimensions) -i :0.0 -f alsa -ac 2 -i pulse -sameq -vcodec libx264 -vpre lossless_ultrafast -threads 0 (path to he folder for recorded video)/Screencast_on_$(date +%F_%A_at_%H:%M:%S).mp4

3. for recording camera(no audio included)

ffmpeg -f video4linux2 -s (recording dimensions) -i /dev/video0 (path to he folder for recorded video)/Webcam_on_$(date +%F_%A_at_%H:%M:%S).mpg



4. for audio

ffmpeg -f alsa -ac 2 -i pulse (path to he folder for recorded video)/Audio_on_$(date +%F_%A_at_%H:%M:%S).mp3



for audio (compressed)

ffmpeg -acodec pcm_s16le -f alsa -ac 2 -i pulse (path to he folder for recorded video)/Audio_on_$(date +%F_%A_at_%H:%M:%S).mp3



NOTE:- In the above commands instead of .mp3, .mp4, .mpg . You can use any other extension as per for your requirement.