Introduction
Nowadays cloud gaming is becoming more and more popular. Benefits are obvious: Instead of downloading and installing large files, you just connect to server from diversity of devices.
Let’s take a look how it works in case of video-streaming cloud games. First, user run a game on their device. Then an application sends signal to the servers, chooses the best available server in cloud and connects the user to it. Actually, the game is stored and played on the server. To allow user to see video stream, server application captures the image, encodes it and sends it via Internet to the client app, which decodes the received pictures. Next, user makes some actions like pressing buttons on keyboard or controllers. Final step is sending this information to the server. This endless cycle continues while user plays the game.
As we can see screen capturing is one of essential parts of cloud gaming. In this case, screen capture speed is extremely important point, because we want to play in real time without any freezes and interruptions. Along with cloud gaming, screen capture feature is also useful in remote desktop and other content capturing scenarios etc.
Intel has a solution especially for cloud gaming developers – optimized Screen Capture plug-in as part of Intel® Media SDK 2016 and Intel® Media Server Studio 2016. It is development library, which enables the media acceleration capabilities of Intel platforms for Windows Desktop front frame buffer capturing. The Intel® Media SDK Screen Capture package includes a hardware accelerated (HW) plug-in library exposing graphics acceleration capabilities, implemented as Intel® Media SDK Decode plug-in. The plug-in can be loaded into/used with only Intel Media SDK Hardware Library and combining with Intel-powered encoder, decoder and screen capturing make your game server work faster.
Screen Capture procedure can use decode plug-in and other SDK components. Capturing display are available in NV12 or RGB4 formats. Moreover, the following Screen Capturing features are supported:
- Display Selection - opportunity to choose a display to capture for systems with enabled virtual display. Display selection feature is available on systems with virtual displays only (without physical display connected) and RGB4 output fourcc format.
- Dirty Rectangles detection - possibility to detect only changed regions on the captured display image.
Set up steps:
- Download and install Intel® Media SDK 2016 or Intel® Media Server Studio 2016.
- Screen capture plugin is available at following path: <Installed_Directory>/Intel_Media_SDK_XX/bin/x64(win32)/ 22d62c07e672408fbb4cc20ed7a053e4.
- Download latest samples package from https://software.intel.com/media-sdk-support/code-samples
Launch Screen capture plugin:
Following is an example command line to run screen capture plugin with sample_decode:
sample_decode.exe capture -w [Width] -h [Height] -d3d11 -p 22d62c07e672408fbb4cc20ed7a053e4 -o [output] -n [number of frames] - hw
(If plugin is installed at different directory, provide complete path to plugin or copy plugin to same folder directory before running sample_decode)
On hybrid graphics (Intel graphics + Discrete Graphics) screen capturing also supports software (SW) implementation (Replace parameter -hw with -sw in above command line). Also, please note SW implementation is not optimized and expect a performance drop vs HW implementation.
For understanding and usability ease of Screen capture feature, refer to tutorial_screen_capture package attached below.
Limitations and Hardware Requirements:
Refer to Screen capture manual and Intel® Media SDK release notes.
Connect with other developers and Intel team on IDZ Media forum with any questions, comments and feedback on Intel® Media SDK Screen capture.