Video Capture of Computer Screens

Version 24.3 by Drunk Monkey on 2022-01-27 16:19

Required Programs

  1. VLC Media Player - required for playback of just about any kind of video content you can imagine
  2. 7-zip - you will need this to extract the contents of the FFmpeg files, which are stored as a 7z archive.  Mac OSX will use Keka
  3. FFmpeg - the ultimate Swiss Army Knife multitool of multimedia encoding/decoding

Installation

  1. VLC installs are straight forward.  Run the installer and you're done.
  2. FFmpeg is a bit more complicated, and it depends on your platform.

Windows

  1. Run the VLC installer
  2. Install 7-zip
  3. Extract the contents of the FFmpeg zip file into a suitable directory.  I going to use C:\Local\ffmpeg\ as my FFmpeg installation location for this example.  You should see something similar to this:image-20220127221835-1.png

    The contents of the ffmpeg filder should look like this:
    image-20220127225738-2.png

    Select all the files and move them into the installation directory.  That is C:\Local\ffmpeg\ in this example.
    image-20220127225847-3.png
     

  4. Next, add the location of the ffmpeg\bin directory to the system path.  This is necessary so you can run the command from the command line from a command shell.

    Go to the file explorer, and look in the left hand folder list for "This PC" or "My PC" or whatever it is called on your system. 
    image-20220127230601-5.png

    When you find it, right click in it to bring up the local context menu and select Properties
    image-20220127230404-4.png

    In newer versions of Windows, the properties page looks like this:
    image-20220127230803-6.png

    Look for the "Advanced system settings" (right middle in the above screenshot) and click on it
    image-20220127230949-7.png

    Select "Environment Variables" and the following screen will appear
    image-20220127231106-8.png

    In the top half of the User variables section is an entry called "Path".  Select it and click on "Edit".  Do not edit the path of the System variables section unless you know what you are doing.
    image-20220127231323-9.png

    Click on "New" and add the following "C:\Local\ffmpeg\bin"
    image-20220127231805-12.png

    and then click on the "Move up" button until that new entry appears at the top of the list
    image-20220127231836-13.png

    Click on OK, and ffmpeg will be available for use on the command line. 
    image-20220127232109-14.png

    Click on OK to close the Environment Variables settings, and then click on OK to close the System Properties.
     
  5. Start a command line window by typing cmd.exe into the search bar and open the Command Prompt
    image-20220127232411-15.png
     
  6. in that command prompt, type in "ffmpeg" and you should see this:
    image-20220127232635-16.png

    If you get an error like this, either you typed in the command incorrectly (as I did in the following example) or you did not configured your user path correctly and you have to go back and correct it
    image-20220127232731-17.png

    You are now ready to capture video

Mac OSX

  1. Install VLC
  2. Install Keka

Video Capture


Windows Video Capture

Open a command window, and run the following commands:

cd Desktop
ffmpeg -f gdigrab -t 6 -draw_mouse 1 -framerate 60 -i desktop -c:v libx264rgb -crf 0 -preset ultrafast screenCapture.mkv

This will create a video file called "screenCapture.mkv" on your desktop that you can replay using VLC Media Player.

The parameters to the ffmpeg command have the following meaning

-f gdigrabgdigrab is the windows framebuffer, where the screen is stored
-t 6capture 6 seconds of video and exit.  3600 = 1 hour, 14400 = 4 hours
-draw_mouse 1capture the mouse pointer
-i desktopcapture the entire desktop -   remember to maximize your window
-c:v libx264rgbthis video encoder will preserve the rgb color values losslessly
-crf 0lossless compression
-preset ultrafastsave the data as quickly as possible, don't waste too much time compressing the data

If you want to save the for long term storage, you can losslessly compress the file even further with the following command

fmpeg -i screenCapture.mkv -c:v libx264rgb -crf 0 -preset veryslow screenCaptureS.mkv

 

Mac Video Capture

sfasd

asdfasdf