rdp / screen-capture-recorder-to-video-windows-free

a free open source windows "screen capture" device and recorder (also allows VLC/ffmpeg and others to capture/stream desktop/audio)
https://github.com/rdp/screen-capture-recorder-to-video-windows-free/releases
Other
2.06k stars 456 forks source link

Weird issue Changing Screen Resolution does not get reflected Windows 10 #138

Open ranjanpr opened 3 years ago

ranjanpr commented 3 years ago

I am using ffmpeg to capture screen using screen-capture-recorder.dll after registering it as directshow device. The command which i use is like this

ffmpeg.exe -rtbufsize 150M -f dshow -framerate 30 -i video="screen-capture-recorder":audio="Microphone (Realtek Audio)" -c:v libx264 -r 30 -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p "test.mp4"

It works perfectly if the screen resolution is not changed even with scaling changed to any percent in windows display settings. For example on a 4k Monitor it works for 3840x2160 @ 100%, 150%, 200% even at 350%. Now if i change the resolution to 1920x1080 at any scale the recording is cropped. What i have observed is if i reboot the machine or sleep/unsleep the issues goes away. Thereafter screen recording works perfectly.

It seems like the screen-capture-recorder itself does not reflect changed resolution. Is there any way to fix it?

rdp commented 3 years ago

That is an interesting idea...

On Friday, September 4, 2020, Prashant Ranjan notifications@github.com wrote:

I am using ffmpeg to capture screen using screen-capture-recorder.dll after registering it as directshow device. The command which i use is like this

ffmpeg.exe -rtbufsize 150M -f dshow -framerate 30 -i video="screen-capture-recorder":audio="Microphone (Realtek Audio)" -c:v libx264 -r 30 -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p "test.mp4"

It works perfectly if the screen resolution is not changed even with scaling changed to any percent in windows display settings. For example on a 4k Monitor it works for 3840x2160 @ 100%, 150%, 200% even at 350%. Now if i change the resolution to 1920x1080 at any scale the recording is cropped. What i have observed is if i reboot the machine or sleep/unsleep the issues goes away. Thereafter screen recording works perfectly.

It seems like the screen-capture-recorder itself does not reflect changed resolution. Is there any way to fix it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.< https://ci4.googleusercontent.com/proxy/eR98WRqLdxJMgY-tCQeSuQ8XfEqr5lwJVc6DMlWo--iwjwML9H1cTj-DK2wDkJuL3wGiKbbRS5bvJq1eFkP98PKhDiwLvUMvcAtEoPAyWvHhA2-LNQUMf5_ND6QJ5AyDB2NRE40KKWyWOT7rd19JaLMVmtmivb0YLzxL387PXlQm7yrNj8fZjNB7u3rWQLiI45VESYY1UTWq3bGknkW_tpcqK6M=s0-d-e1-ft#https://github.com/notifications/beacon/AAADBUE3MKA7OWPOJ4RH7ULSECQPHA5CNFSM4QXV4UH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KKMVMQA.gif>

ranjanpr commented 3 years ago

I have done a workaround for this issue by cropping the ffmpeg screen recording to the actual display resolution set in display settings. e.g. 3840x2160 display recording when recorded at 1920x1080 resolution ffmpeg.exe -rtbufsize 150M -f dshow -framerate 30 -i video="screen-capture-recorder":audio="Microphone (Realtek Audio)" -vf crop=1920:1080:0:0 -c:v libx264 -r 30 -preset ultrafast -tune zerolatency -crf 28 -pix_fmt yuv420p "test.mp4"

However this issue requires fixing in screen-capture-recorder so that the horizontal and vertical resolution reported by it is proper. @rdp Any pointer in this regard to fix would be highly appreciated.