Forum Discussion
How can I record a video that I am watching on my computer?
This approach is a highly effective way to record a video that I am watching on my computer. Here is a basic command that captures your entire screen and saves it as an MP4 file.
text
ff mpeg -f gdigrab -framerate 30 -i desktop -c:v libx264 -preset ultrafast output.mp4
- -f gdigrab: This tells FF mpeg to use the Windows GDI screen capture method .
- -framerate 30: This sets the recording frame rate to 30 Frames Per Second. You can change this to 60 for smoother motion .
- -i desktop: This specifies that the entire desktop is the input source .
- -c:v libx264: This uses the H.264 video codec, which provides a good balance of quality and file size .
- -preset ultrafast: This prioritizes recording speed to reduce the load on your CPU during capture .
- output.mp4: The name of your final video file.
When it comes to how to record a video that I am watching on my computer, you would press Q or CTRL + C in the Command Prompt window to stop the recording.
FF mpeg's strength lies in its flexibility. You can modify the command to better suit your needs.
Capture a Specific Region: Instead of the whole screen, you can define a specific area.
text
ff mpeg -f gdigrab -framerate 30 -offset_x 100 -offset_y 100 -video_size 1280x720 -i desktop output.mp4
This captures a 1280x720 pixel region starting 100 pixels from the top-left corner of your screen.
Capture a Specific Window: You can even target a particular application window by its title.
text
ff mpeg -f gdigrab -framerate 30 -i title=Calculator output.mp4
Optimize for CPU Performance: If you have a powerful PC and want the absolute highest quality for how to record a video that I am watching on my computer, you can use lossless encoding. This creates very large files but preserves perfect quality.
text
ff mpeg -f gdigrab -framerate 60 -i desktop -c:v libx264 -preset ultrafast -crf 0 output.mp4
The -crf 0 flag enables lossless encoding.