Skip to content

Commit

Permalink
Updated the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zlatinski committed Jan 16, 2025
1 parent 3b51589 commit 4b39a5e
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 42 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ Currently, the sample application supports Linux and Windows10 operating systems
Features
========

- [x] Extracts (DEMUX via FFMPEG) compressed video from .mp4, .mkv .mov and others video containers using h.264 (AVC) or h.265 (HEVC) compression formats.
- [x] Extracts (DEMUX via FFMPEG) compressed video from .mp4, .mkv .mov and others video containers using h.264 (AVC), h.265 (HEVC) or AV1 compression formats.
- [x] The HW video decoder processes textures to Vulkan Video Images that can be directly sampled from Vulkan Samplers (Textures).
- [x] Converts the YCbCr (YUV) Images to RGB while sampling the decoded images using the [VK_KHR_sampler_ycbcr_conversion](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_sampler_ycbcr_conversion.html)
- [x] Displays the post-processed video frames using Vulkan WSI.
- [x] Provides the h.264/5 SPS/PPS video picture parameters inlined with each frame's parameters. This isn't compliant with the Vulkan Video Specification. Proper handling of such parameters must be done using an object of type VkVideoSessionParametersKHR.
- [x] Added support for VkVideoSessionParametersKHR for full compliance with the Vulkan Video Specification.
- [ ] Use Video display timing synchronization (such as VK_EXT_present_timing) at the WSI side - currently the video is played at the maximum frame rate that the display device can support. The video may be played at a faster rate than it is authored.
- [ ] Convert the sample's framework to be compatible with the rest of the nvpro-samples.


For instructions on how to build the sample decode application, please see [the build instructions.](https://github.com/nvpro-samples/vk_video_samples/blob/main/vk_video_decoder/BUILD.md)
Expand Down Expand Up @@ -50,11 +47,13 @@ Features
- [x] Support for B frames
- [x] Encoding frames from graphical application
- [x] Different YCbCr chroma subsampling and bit depth options
- [x] Support for h.264 standard
- [x] Support for h.265 standard
- [x] Support for av1 standard
- [ ] Support for encoding tuning and quality levels
- [ ] Better Support for rate control
- [ ] Support for multi-threaded encoding
- [ ] Test 10-bit encoding
- [x] Better Support for rate control
- [x] Support for multi-threaded encoding
- [x] Tested 10-bit encoding

For instructions on how to build the sample decode application, please see [the build instructions.](https://github.com/nvpro-samples/vk_video_samples/blob/main/vk_video_encoder/BUILD.md)

Expand Down Expand Up @@ -110,4 +109,4 @@ On Windows:

Do not use `~all~` or `~explicit~` options with `VK_LOADER_LAYERS_DISABLE` because these options disable the validation layers that other applications might attempt to enable programmaticaly.

For more information on Layers configuration please refer to the [LunarG, Layers Configuration](https://vulkan.lunarg.com/doc/sdk/1.3.290.0/windows/layer_configuration.html)
For more information on Layers configuration please refer to the [LunarG, Layers Configuration](https://vulkan.lunarg.com/doc/sdk/1.3.290.0/windows/layer_configuration.html)
49 changes: 31 additions & 18 deletions vk_video_decoder/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file in this repository for mo
## Repository Set-Up

Please make sure you have installed the latest NVIDIA BETA drivers from https://developer.nvidia.com/vulkan-driver.
The minimum supported BETA driver versions by this application are 527.86 (Windows) / 525.47.04 (Linux) that
The minimum supported BETA driver versions by this application are 553.51 (Windows) / 550.40.82 (Linux) that
must support Vulkan API version 1.3.230 or later.
The Windows and Linux BETA drivers are available for download at https://developer.nvidia.com/vulkan-beta-51769-windows
and https://developer.nvidia.com/vulkan-beta-5154924-linux, respectively.
The Windows and Linux BETA drivers are available for download at https://developer.nvidia.com/vulkan-driver.

### Download the Repository

Expand All @@ -32,15 +31,15 @@ Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file in this repository for mo

$ git clone $VULKAN_VIDEO_GIT_REPO

APP_INSTALLED_LOC=$(pwd)/"vk_video_samples/vk_video_decoder"
APP_INSTALLED_LOC=$(PWD)/"vk_video_samples/vk_video_decoder"

## Building On Windows

### Windows Build Requirements

Windows 10 or Windows 11 with the following software packages:

- Microsoft Visual Studio VS2017 or later (any version).
- Microsoft Visual Studio VS2019 or later (any version).
- [CMake](http://www.cmake.org/download/)
- Tell the installer to "Add CMake to the system PATH" environment variable.
- [Python 3](https://www.python.org/downloads)
Expand All @@ -54,8 +53,8 @@ Windows 10 or Windows 11 with the following software packages:
- Tell the installer to treat line endings "as is" (i.e. both DOS and Unix-style line endings).
- Install both the 32-bit and 64-bit versions, as the 64-bit installer does not install the
32-bit libraries and tools.
- [Vulkan SDK](https://vulkan.lunarg.com)
- install current Vulkan SDK (i.e. VulkanSDK-1.3.*-Installer.exe) from https://vulkan.lunarg.com/
- [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)
- install current Vulkan SDK (i.e. VulkanSDK-1.4.304.0-Installer.exe or later) from https://vulkan.lunarg.com/
- [FFMPEG libraries for Windows]
Download the latest version of the FFMPEG shared libraries archive from https://github.com/BtbN/FFmpeg-Builds/releases.
The archive must have the following pattern in the name ffmpeg-*-win64-*-shared.zip
Expand All @@ -72,18 +71,17 @@ Windows 10 or Windows 11 with the following software packages:

1. Open a Developer Command Prompt for VS201x
2. Change directory to `<APP_INSTALLED_LOC>` -- the vk_video_decoder root of the cloned git repository
3. Run `update_external_sources.bat` -- this will download and build external components
4. Create a `build` directory, change into that directory, and run cmake and build as follows:
3. Create a `build` directory, change into that directory, and run cmake and build as follows:

### Windows Build for debug - using shell

cmake .. -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_INSTALL_PREFIX="$(pwd)/install/Debug" -DCMAKE_BUILD_TYPE=Debug
cmake .. -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_INSTALL_PREFIX="$(PWD)/install/Debug" -DCMAKE_BUILD_TYPE=Debug
cmake --build . --parallel 16 --config Debug
cmake --build . --config Debug --target INSTALL

### Windows Build for release - using shell

cmake .. -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_INSTALL_PREFIX="$(pwd)/install/Release" -DCMAKE_BUILD_TYPE=Release
cmake .. -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_INSTALL_PREFIX="$(PWD)/install/Release" -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel 16 --config Release
cmake --build . --config Release --target INSTALL

Expand All @@ -100,7 +98,7 @@ Make sure the library is either installed in the C:\Windows\System folder, or th
### Linux Build Requirements

This repository has been built and tested on the two most recent Ubuntu LTS versions with
Vulkan SDK vulkansdk-linux-x86_64-1.2.189.0.tar.gz from https://vulkan.lunarg.com/sdk/home#linux.
Vulkan SDK vulkansdk-linux-x86_64-1.4.304.0.tar.xz from https://vulkan.lunarg.com/sdk/home#linux.
Currently, the oldest supported version is Ubuntu 18.04.5 LTS, meaning that the minimum supported
compiler versions are GCC 7.5.0 and Clang 6.0.0, although earlier versions may work.
It should be straightforward to adapt this repository to other Linux distributions.
Expand All @@ -113,8 +111,8 @@ It should be straightforward to adapt this repository to other Linux distributio

2. In a Linux terminal, `cd <APP_INSTALLED_LOC>` -- the root of the cloned git repository
cd $APP_INSTALLED_LOC
3. Execute `./update_external_sources.sh` -- this will download and build external components
$ ./update_external_sources.sh
3. Execute `./ubuntu-update-dependencies.sh` -- this will download and build external components
$ ./ubuntu-update-dependencies.sh
4. Create a `build` directory, change into that directory:

mkdir build
Expand Down Expand Up @@ -147,9 +145,25 @@ Before you begin, check if your driver has Vulkan Video extensions enabled:
$ vulkaninfo | grep VK_KHR_video

The output should be:
VK_KHR_video_decode_queue : extension revision 1
VK_KHR_video_encode_queue : extension revision 1
VK_KHR_video_queue : extension revision 1
VK_KHR_video_decode_av1 : extension revision 1
VK_KHR_video_decode_h264 : extension revision 9
VK_KHR_video_decode_h265 : extension revision 8
VK_KHR_video_decode_queue : extension revision 8
VK_KHR_video_encode_h264 : extension revision 14
VK_KHR_video_encode_h265 : extension revision 14
VK_KHR_video_encode_queue : extension revision 12
VK_KHR_video_maintenance1 : extension revision 1
VK_KHR_video_queue : extension revision 8
VK_KHR_video_decode_av1 : extension revision 1
VK_KHR_video_decode_h264 : extension revision 9
VK_KHR_video_decode_h265 : extension revision 8
VK_KHR_video_decode_queue : extension revision 8
VK_KHR_video_encode_h264 : extension revision 14
VK_KHR_video_encode_h265 : extension revision 14
VK_KHR_video_encode_queue : extension revision 12
VK_KHR_video_maintenance1 : extension revision 1
VK_KHR_video_queue : extension revision 8


To run the Vulkan Video Decode sample from the build dir (for Windows change to build\install\Debug\bin\ or build\install\Release\bin\):

Expand Down Expand Up @@ -207,4 +221,3 @@ files to be used as project files for QtCreator

Note that installing the WDK breaks the MSVC vcvarsall.bat build scripts provided by MSVC,
requiring that the LIB, INCLUDE, and PATHenv variables be set to the WDK paths by some other means

44 changes: 28 additions & 16 deletions vk_video_encoder/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file in this repository for mo
## Repository Set-Up

Please make sure you have installed the latest NVIDIA BETA drivers from https://developer.nvidia.com/vulkan-driver.
The minimum supported BETA driver versions by this application are 538.31 (Windows) / 535.43.23 (Linux) that
must support Vulkan API version 1.3.274 or later.
The Windows and Linux BETA drivers are available for download at https://developer.nvidia.com/vulkan-beta-51769-windows
and https://developer.nvidia.com/vulkan-beta-5154924-linux, respectively.
The minimum supported BETA driver versions by this application are 553.51 (Windows) / 550.40.82 (Linux) that
must support Vulkan API version 1.3.230 or later.
The Windows and Linux BETA drivers are available for download at https://developer.nvidia.com/vulkan-driver.

### Download the Repository

Expand Down Expand Up @@ -54,8 +53,8 @@ Windows 10 or Windows 11 with the following software packages:
- Tell the installer to treat line endings "as is" (i.e. both DOS and Unix-style line endings).
- Install both the 32-bit and 64-bit versions, as the 64-bit installer does not install the
32-bit libraries and tools.
- [Vulkan SDK](https://vulkan.lunarg.com)
- install current Vulkan SDK (i.e. VulkanSDK-1.3.*-Installer.exe) from https://vulkan.lunarg.com/
- [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)
- install current Vulkan SDK (i.e. VulkanSDK-1.4.304.0-Installer.exe or later) from https://vulkan.lunarg.com/
- [FFMPEG libraries for Windows]
Download the latest version of the FFMPEG shared libraries archive from https://github.com/BtbN/FFmpeg-Builds/releases.
The archive must have the following pattern in the name ffmpeg-*-win64-*-shared.zip
Expand All @@ -72,8 +71,7 @@ Windows 10 or Windows 11 with the following software packages:

1. Open a Developer Command Prompt for VS201x
2. Change directory to `<APP_INSTALLED_LOC>` -- the vk_video_encoder root of the cloned git repository
3. Run `update_external_sources.bat` -- this will download and build external components
4. Create a `build` directory, change into that directory, and run cmake and build as follows:
3. Create a `build` directory, change into that directory, and run cmake and build as follows:

### Windows Build for debug - using shell

Expand All @@ -100,7 +98,7 @@ Make sure the library is either installed in the C:\Windows\System folder, or th
### Linux Build Requirements

This repository has been built and tested on the two most recent Ubuntu LTS versions with
Vulkan SDK vulkansdk-linux-x86_64-1.2.189.0.tar.gz from https://vulkan.lunarg.com/sdk/home#linux.
Vulkan SDK vulkansdk-linux-x86_64-1.4.304.0.tar.xz from https://vulkan.lunarg.com/sdk/home#linux.
Currently, the oldest supported version is Ubuntu 18.04.5 LTS, meaning that the minimum supported
compiler versions are GCC 7.5.0 and Clang 6.0.0, although earlier versions may work.
It should be straightforward to adapt this repository to other Linux distributions.
Expand All @@ -113,8 +111,8 @@ It should be straightforward to adapt this repository to other Linux distributio

2. In a Linux terminal, `cd <APP_INSTALLED_LOC>` -- the root of the cloned git repository
cd $APP_INSTALLED_LOC
3. Execute `./update_external_sources.sh` -- this will download and build external components
$ ./update_external_sources.sh
3. Execute `./ubuntu-update-dependencies.sh` -- this will download and build external components
$ ./ubuntu-update-dependencies.sh
4. Create a `build` directory, change into that directory:

mkdir build
Expand Down Expand Up @@ -147,11 +145,25 @@ Before you begin, check if your driver has Vulkan Video extensions enabled:
$ vulkaninfo | grep VK_KHR_video

The output should be:
VK_KHR_video_encode_h264 : extension revision 14
VK_KHR_video_encode_h265 : extension revision 14
VK_KHR_video_encode_queue : extension revision 12
VK_KHR_video_maintenance1 : extension revision 1
VK_KHR_video_queue : extension revision 8
VK_KHR_video_decode_av1 : extension revision 1
VK_KHR_video_decode_h264 : extension revision 9
VK_KHR_video_decode_h265 : extension revision 8
VK_KHR_video_decode_queue : extension revision 8
VK_KHR_video_encode_h264 : extension revision 14
VK_KHR_video_encode_h265 : extension revision 14
VK_KHR_video_encode_queue : extension revision 12
VK_KHR_video_maintenance1 : extension revision 1
VK_KHR_video_queue : extension revision 8
VK_KHR_video_decode_av1 : extension revision 1
VK_KHR_video_decode_h264 : extension revision 9
VK_KHR_video_decode_h265 : extension revision 8
VK_KHR_video_decode_queue : extension revision 8
VK_KHR_video_encode_h264 : extension revision 14
VK_KHR_video_encode_h265 : extension revision 14
VK_KHR_video_encode_queue : extension revision 12
VK_KHR_video_maintenance1 : extension revision 1
VK_KHR_video_queue : extension revision 8


To run the Vulkan Video Encode sample from the build dir (for Windows change to build\install\Debug\bin\ or build\install\Release\bin\):

Expand Down

0 comments on commit 4b39a5e

Please sign in to comment.