-
Notifications
You must be signed in to change notification settings - Fork 1
Installing and Building Streaming SDK
Clone the Streaming SDK Git repo along with its dependencies using the following command:
git clone --recurse-submodules https://github.com/GPUOpen-LibrariesAndSDKs/StreamingSDK.git
This would clone the Streaming SDK repo and pull AMF and MbedTLS submodules. Pre-compiled Ffmpeg DLLs/shared libraries are located in the AMF repo under Thirdparty/ffmpeg, so including Ffmpeg as a separate submodule is unnecessary. The Ffmpeg libraries contain code compiled for various platforms taken straight from Ffmpeg Github repo without any modifications.
To update an existing clone to the latest version use the following command:
git pull --recurse-submodules
Streaming SDK uses Cmake as the build system. CMake creates projects for various build systems and calls them behind the scene depending on your target platform. Follow the instructions below for the respective operating system to build AMD Interactive Streaming SDK and its samples.
On Windows we build it using Microsoft Visual Studio or Visual Studio Code. You can also build it using Visual Studio Code with the C/C++ extension. Make sure that you have Cmake installed.
AMF also depends on these prerequisites:
- The latest Vulkan SDK
- Windows SDK* version 10.0.26100.0 (Windows only)
- OCL SDK Lite
Once the Git repository has been cloned, open the StreamingSDK folder in Visual Studio or Visual Studio Code and build the entire project. This will build the Streaming SDK library, its dependencies and sample applications.
In Visual Studio set the 'CMake configuration file' option under Tools->Options...->CMake->General to Never Use CMake Presets.
NOTE: Streaming SDK uses the Windows SDK version which is the latest at the time of posting. It is possible, however, that by the time you clone the Streaming SDK repo, Microsoft might post a newer version of Windows SDK. If the current version of Windows SDK differs from the specified above, edit the root CMakeLists.txt file and change the value of the WINDOWS_SDK_VERSION variable to match the version of Windows SDK you have installed.
sudo apt update
sudo apt install cmake gcc ninja-build wget
sudo apt install openssl libssl-dev libx11-dev libxi-dev libevdev-dev libxcursor-dev libasound2-dev libpulse-dev opencl-headers ocl-icd-libopencl1 libxrandr-dev libxtst-dev libva2 libva-drm2 libva-x11-2 libvdpau1
- Download the latest Vulkan SDK and expand it to an accessible location
- Set the VULKAN_SDK environment variable to point to the Vulkan SDK installation directory. For example, if Vulkan SDK 1.4.313.0 is installed in /home/johndoe/VulkanSDK, the VULKAN_SDK environment variable should be set as follows:
export VULKAN_SDK=/home/johndoe/VulkanSDK/1.4.313.0/x86_64
- Install Visual Studio Code from the Ubuntu App Center.
- Run Visual Studio Code with elevated permissions. This is required for Server execution and debugging in VS Code, but not for the build process:
- Execute the command:
- sudo -E code --verbose --user-data-dir --no-sandbox
- Explanation:
- sudo -E: Runs the command with elevated permissions while preserving the user environment.
- code: The command to launch Visual Studio Code.
- --verbose: Provides detailed logging information, useful for debugging.
- --user-data-dir: Specifies a directory for user data. This prevents permission issues by directing data to a location under the user's home directory. --no-sandbox: Disables the sandbox, which is sometimes necessary for compatibility but should be used with caution for security reasons.
- Execute the command:
- Add the following extensions:
- C/C++
- C/C++ Extension Pack
- CMake Tools
Download the .DEB package and install it:
sudo apt install <path to the downloaded .deb file>
Run the AMDGPU Pro driver installation script:
sudo amdgpu-install -y --usecase=graphics,amf
or
sudo amdgpu-install -y --usecase=workstation,amf
If you already have the AMDGPU Pro driver installed, but lacking the AMF package, you can add it afterwards with the following command:
sudo apt install amf-amdgpu-pro
You can build and run the Interactive Streaming SDK client sample or your own client on systems with Intel and NVidia graphics as well. Note that only the client is compatible with non-AMD graphics. You need an AMD GPU to run the server.
Install the latest proprietary driver from NVidia. We recommend against using the open source Nouveau drivers
Intel drivers are installed together with your Linux OS.
IMPORTANT: You need to explicitly enable the accelerated video decoder by setting the ANV_VIDEO_DECODE environment variable to 1. It it is a good idea to add the export ANV_VIDEO_DECODE=1
line to your ~/.profile
Interactive Streaming SDK includes a 'Lite' version of AMF in the prebuilt/Linux/x86_64 directory in a form of a prebuilt shared library called libamfrtlt64.so.1.4.*. The last number in the file name might change as new versions of AMF are released. Include this shared library with your client application and a place a symlink to this shared libarary named libamfrtlt64.so.1 next to your client executable.
You can also install AMF Lite on AMD platforms as well, although this is unnecessary provided that AMF is installed.
- Open the root folder of your Streaming SDK repository in Visual Studio Code
- Please choose your preferred build system, either "Ninja" or "Unix Makefiles" by modifying the "generator" under "configurePresets" in the CMakePresets.json file. Set it to "Ninja" or "Unix Makefiles" according to your preference for each build type.
- Create the desired launch configurations by editing the .vscode/launch.json file.
- Specify the build type by selecting a preset in VS Code (presets are defined in CMakePresets.json):
- Open the Command Palette (Ctrl+Shift+P).
- Search for "CMake: Select Configure Preset".
- Choose one of the following: Debug, Release, ReleaseWithDebugInfo, or MinSizeRelease.
Alternatively, you can build it from the command line as follows:
cd <your project root directory>
/usr/bin/cmake --build "build" --target all --
Streaming SDK is an open source project, hence binaries can always be compiled from source and therefore ABI compatibility between different versions of Streaming SDK does not need to be maintained. We will make every effort to maintain consistency of the API between versions, however circumstances justifying some API changes may arise in the future.
We also highly recommend to include Streaming SDK repository as a Git submodule of your project's repository rather than cloning Streaming SDK and adding your application directly to it. This will make updates of Streaming SDK easier to handle in the future, as we fix bugs and add new functionality and platforms.