I developed an application for capturing the desktop screen by referring sample_decode example. What I am observing is that:
1. While using HW Decoding + System Memory option, my capture rate is around 250 FPS. But if I start playing any video file (checked with a .mp4 file having 1280x720 AVC video) in Windows Media Player while capturing is ON, then capture rate is dropped to 15-20 FPS only.
2. While using HW Decoding + D3D11 Memory option, my capture rate is around 90-100 FPS. And if I start playing video file in Windows Media Player while capturing is ON, then capture rate is dropped to 10-12 FPS only.
Note: this capture rate drop does not occur if I play same file in VLC player.
My environment details:
IMSDK version: 220.127.116.119
Sample decode version: 18.104.22.168
OS: Windows 8.1
Desktop resolution: 1920x1080
System analyzer log is attached.
Hi Ramashaknar - Apologies for the delay. The engineer working on screen capture is on vacation, hence the delay.
(1) It's a known limitation and is captured in the Release Notes. Unfortunately, there is no fix for it yet - the limitation is due to WMP using a specific rendering mode which blocks native intel acceleration.
(2) If you measured the perf with and without video memory using this command line "sample_decode.exe capture -w 1920 -h 1080 -p "22d62c07e672408fbb4cc20ed7a053e4" -r", then the missing "-hw" flag can be the reason why video memory is slower than system memory, Add the flag and you should see the difference. If you have any further questions, please send the exact command lines used so that we can easily replicate here.
Thanks again for your patience, hope this helps.
Thanks for your reply.
(1). Ok. I gone through SDK release note (mediasdk_release_notes.pdf) and screen capture release note (mediasdkscreencap-man.pdf) now and found this:
a. Protected content capturing: Plug-in does not support protected content capturing. Performance degradations might be observed if there is running application with OPM (Output Protection Manager) session even without actual protected content playing is open.
b. Performance decrease during entering and exiting fullscreen mode: A performance decrease for a several frames might be observed during starting and stopping fullscreen mode of any application.
So is it limitation (a)? If so, can you please let me know (if possible) some more common apps which may run under this mode so that I get informed in advance and prepare my software accordingly.
(2). Regarding missing -hw flag, I was assuming that decoder will always run in hw acceleration mode only by default. until I don't mention "-sw" flag explicitly. Is it not so?
Anyway, I run it again with -hw flag but result is same: HW decoding with System memory is having better performance than HW decoding with Video memory (d3d11).
A. [sample_decode.exe capture -hw -d3d11 -w 1920 -h 1080 -p "22d62c07e672408fbb4cc20ed7a053e4"]
B. [sample_decode.exe capture -hw -w 1920 -h 1080 -p "22d62c07e672408fbb4cc20ed7a053e4"]
Note: I made little changes in sample_decode app, just to print the capture fps even when rendering is OFF.