John
John

Reputation: 1759

FFMPEG is not recording the whole window

I'm using FFMPEG to record a window as illustrated in the figure below. In all cases, the right hand side of the recorded window is cropped. The command I'm giving is

ffmpeg -f gdigrab -i title="example.txt - Notepad++" output.mkv

Any suggestion on how to fix this problem is much appreciated.

Using FFMPEG to record a window

Here are some additional info:

This is what the recorded area looks like in the example above

FFMPEG cropping right hand side of window

Update 1:

Recording the whole desktop works fine, however, when recording a region using x and y offsets, the region captured is correct, but the region indicated is wrong. I illustrate this in the image below that shows a screen capture of the desktop during recording. The background image is a grid and the taskbar has been hidden.

enter image description here

The size of the area to capture is specified to 1280x720, but the region indicated is 1600x900. Also, the x offset is specified to 400px, but the region indicted starts at 500px.

The area recorded is correct! The image below shows a screenshot of the recording during playback in vlc, note that the "misplaced" region indicator can be seen

enter image description here

Update 2:

I noticed that the cursor, the mouse, is not correctly placed when capturing from the desktop, see recording below. Everything looks fine during recording, but at playback the cursor is misplaced.

enter image description here

The command issued for the recording above was:

ffmpeg -f gdigrab -framerate 30 -offset_x 1820 -offset_y 100 -video_size 1280x720 -i desktop output5.mkv

Windows 10 / ffmpeg-20181215-011c911-win64-static

Upvotes: 5

Views: 3209

Answers (1)

NitrousWolf
NitrousWolf

Reputation: 66

As stated in the comments to the question, ffmpeg does not handle different DPI settings in Windows. However I believe there is a solution to the scaling issue mentioned. It is as follows:

  1. Go to where ffmpeg.exe is installed and open the property window on it, img: ffmpeg property window
  2. If you are admin enough then click the "Change settings for all users" button img: all users properties window
  3. Click the "Change high DPI settings" button img: DPI scaling override
  4. Tick "Override high DPI scaling behavior. And ensure "Scaling performed by: Automatic" is selected

Reference:

https://github.com/rdp/screen-capture-recorder-to-video-windows-free/issues/56#issuecomment-306900403

Upvotes: 5

Related Questions