Video Capture of Computer Screens
Required Programs
- VLC Media Player - required for playback of just about any kind of video content you can imagine
- 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
- FFmpeg - the ultimate Swiss Army Knife multitool of multimedia encoding/decoding
Installation
- VLC installs are straight forward. Run the installer and you're done.
- FFmpeg is a bit more complicated, and it depends on your platform.
Windows
- Run the VLC installer
- Install 7-zip
- 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:
The contents of the ffmpeg filder should look like this:
Select all the files and move them into the installation directory. That is C:\Local\ffmpeg\ in this example.
- 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.
When you find it, right click in it to bring up the local context menu and select Properties
In newer versions of Windows, the properties page looks like this:
Look for the "Advanced system settings" (right middle in the above screenshot) and click on it
Select "Environment Variables" and the following screen will appear
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.
Click on "New" and add the following "C:\Local\ffmpeg\bin"
and then click on the "Move up" button until that new entry appears at the top of the list
Click on OK, and ffmpeg will be available for use on the command line.
Click on OK to close the Environment Variables settings, and then click on OK to close the System Properties.
- Start a command line window by typing cmd.exe into the search bar and open the Command Prompt
- in that command prompt, type in "ffmpeg" and you should see this:
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
You are now ready to capture video
Mac OSX
- Install VLC
- 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 gdigrab | gdigrab is the windows framebuffer, where the screen is stored |
-t 6 | capture 6 seconds of video and exit. 3600 = 1 hour, 14400 = 4 hours |
-draw_mouse 1 | capture the mouse pointer |
-i desktop | capture the entire desktop - remember to maximize your window |
-c:v libx264rgb | this video encoder will preserve the rgb color values losslessly |
-crf 0 | lossless compression |
-preset ultrafast | save 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