How to Record Your Desktop Using FFmpeg on Ubuntu Linux

Check and see if you have FFmpeg installed on your system, by issuing the following commands below if you don't you can install FFmpeg by using the following code., Before you begin recording your desktop, make sure your microphone is turned on and...

25 Steps 1 min read Advanced

Step-by-Step Guide

  1. Step 1: Check and see if you have FFmpeg installed on your system

    Open up a terminal and enter the following commands below.

    Type/Copy/Paste: sudo apt-get install synaptic Type/Copy/Paste: sudo apt-get update This command updates the package repositories on your system Type/Copy/Paste: ffmpeg
    -version This command checks to see if FFmpeg is install on your system Type/Copy/Paste: sudo
    -s apt-get install ffmpeg This command installs FFmpeg on your system Type/Copy/Paste: cd /home/”your_user_name”/Videos This will change you into your Videos directory, so you can record and keep all your Video files in this directory.
  2. Step 2: by issuing the following commands below if you don't you can install FFmpeg by using the following code.

    The following commands will record the full desktop video and sound in the video formats provided below. ,,,,,,,, You should be able to install VLC or Totem multimedia players by using the following commands.

    Type/Copy/Paste: sudo apt-get update Type/Copy/Paste: sudo
    -s apt-get install vlc Type/Copy/Paste: sudo
    -s apt-get install totem
  3. Step 3: Before you begin recording your desktop

  4. Step 4: make sure your microphone is turned on and the volume is turned up.

  5. Step 5: To record a video/audio file in MPG format

  6. Step 6: use the following command in the terminal line: Type/Copy/Paste: ffmpeg -f alsa -ac 2 -i hw:0

  7. Step 7: 0 -f x11grab -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -r 25 -i :0.0 -vcodec mpeg2video -ar 44100 -s wvga -y -sameq sample.mpg

  8. Step 8: To record a video/audio file in ASF/WMV Microsoft format

  9. Step 9: use the following command in the terminal line: Type/Copy/Paste: ffmpeg -f alsa -ac 2 -i hw:0

  10. Step 10: 0 -f x11grab -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -r 10 -i :0.0 -sameq -f asf -ar 48000 -s wvga -y sample.asf or Type/Copy/Paste: ffmpeg -f alsa -ac 2 -i hw:0

  11. Step 11: 0 -f x11grab -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -r 10 -i :0.0 -sameq -f asf -ar 48000 -s wvga -y sample.wmv

  12. Step 12: To record a video/audio file in AVI format

  13. Step 13: use the following command in the terminal line: Type/Copy/Paste: ffmpeg -f alsa -ac 2 -i hw:0

  14. Step 14: 0 -f x11grab -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -r 25 -i :0.0 -sameq -f mpeg -ar 48000 -s wvga -y sample.avi

  15. Step 15: To record a video/audio file in FLV format

  16. Step 16: use the following command in the terminal line: Type/Copy/Paste: ffmpeg -f alsa -ac 2 -i hw:0

  17. Step 17: 0 -f x11grab -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -r 10 -i :0.0 -sameq -f flv -ar 44100 -s wvga -y sample.flv

  18. Step 18: To record a video/audio file in MP4 format

  19. Step 19: use the following command in the terminal line: Type/Copy/Paste: ffmpeg -f alsa -ac 2 -i hw:0

  20. Step 20: 0 -f x11grab -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -r 25 -i :0.0 -sameq -f mpeg -ar 48000 -s wvga -y sample.mp4

  21. Step 21: Press q for quit or Control-C to stop the desktop recording process at anytime.

  22. Step 22: To convert different file formats Type/Copy/Paste: ffmpeg -i "insert_multimedia_file" -target pal-dvd -ps 2000000000 -aspect 16:9 "insert_multimedia_file" For example

  23. Step 23: to convert an avi file to a mpeg file

  24. Step 24: for dvd players Type/Copy/Paste: ffmpeg -i sample.avi -target pal-dvd -ps 2000000000 -aspect 16:9 sample.mpeg

  25. Step 25: Use a multimedia player such as VLC multimedia player or Totem multimedia player to view and playback your recorded desktop videos with sound.

Detailed Guide

Open up a terminal and enter the following commands below.

Type/Copy/Paste: sudo apt-get install synaptic Type/Copy/Paste: sudo apt-get update This command updates the package repositories on your system Type/Copy/Paste: ffmpeg
-version This command checks to see if FFmpeg is install on your system Type/Copy/Paste: sudo
-s apt-get install ffmpeg This command installs FFmpeg on your system Type/Copy/Paste: cd /home/”your_user_name”/Videos This will change you into your Videos directory, so you can record and keep all your Video files in this directory.

The following commands will record the full desktop video and sound in the video formats provided below. ,,,,,,,, You should be able to install VLC or Totem multimedia players by using the following commands.

Type/Copy/Paste: sudo apt-get update Type/Copy/Paste: sudo
-s apt-get install vlc Type/Copy/Paste: sudo
-s apt-get install totem

About the Author

A

Alice Ruiz

Dedicated to helping readers learn new skills in lifestyle and beyond.

59 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: