Skip to content

Commit 2bebbe8

Browse files
authored
Merge pull request #6 from SimpNick6703/amd-intel
Add Support for AMD and Intel GPUs
2 parents 5081f02 + bc57eb0 commit 2bebbe8

2 files changed

Lines changed: 255 additions & 108 deletions

File tree

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ For using prebuilt binaries from releases, you just need to download the executa
1818
> [!NOTE]
1919
> You may view if your Nvidia GPU supports NVENC [here](https://developer.nvidia.com/video-encode-decode-support-matrix) and keep your Nvidia GPU driver version 570.0 or higher.
2020
21-
> [!CAUTION]
22-
> The script currently does not support other GPU vendors besides NVIDIA. It will fall back to CPU encoding if no compatible NVIDIA GPU is found.
23-
> AMD (`hevc_amf`) and Intel (`hevc_qsv`) GPU acceleration support may be added in future updates.
24-
2521
## How to use
2622
- In Windows:
2723
- Download any of the target filesize build from [releases](<https://github.com/SimpNick6703/Video-Compression/releases>).
@@ -32,7 +28,7 @@ https://github.com/user-attachments/assets/0272427b-0db4-40dd-bd14-37d705d110a0
3228
- In Linux:
3329
- Download your desired build from [releases](<https://github.com/SimpNick6703/Video-Compression/releases>).
3430
- Make your downloaded file executable: `chmod +x {size}mb-linux`
35-
- Run in terminal as `./{size}mb-linux <input.mp4> [output.mp4]`
31+
- Run in terminal as `./{size}mb-linux <input.mp4> [output.mp4] [target_size_in_mb]`
3632

3733
## How to Build
3834

@@ -56,3 +52,17 @@ To keep build artifacts for debugging:
5652
```bash
5753
python build.py --verbose
5854
```
55+
56+
## Encoder Priority Logic
57+
Platform | Encoder Priority Chain | Notes
58+
--- | --- | ---
59+
Windows | `hevc_nvenc` -> `hevc_amf` -> `hevc_qsv` -> `libx265` (CPU) | Explicit vendor-specific encoders are required.
60+
Linux | `hevc_nvenc` -> `hevc_vaapi` -> `libx265` (CPU) | `vaapi` covers both AMD and Intel integrated/dedicated.
61+
MacOS | `hevc_videotoolbox` -> `libx265` (CPU only) | VideoToolbox automatically handles AMD, Intel, & Apple Silicon. Older Nvidia GPUs aren't used by Nvidia Video Codec SDK on MacOS and handled by VideoToolbox if supported.
62+
63+
Considering the wide variety of hardware configurations, the script uses the following priority logic to select the best available encoder on majority of users' systems (fallback logic):
64+
> `hevc_nvenc` > `hevc_vaapi` > `hevc_videotoolbox` > `hevc_amf` > `hevc_qsv` > `libx265` (CPU)
65+
66+
> [!NOTE]
67+
> Only NVENC supports Two-Pass encoding among the listed encoders. Other encoders use Single-Pass encoding only.
68+
> If your dedicated GPU is being bypassed in favor of integrated GPU or CPU encoding, you'll need to manually change the priority logic in the script to suit your hardware setup. Or, you may simply remove unwanted encoders from the priority list in the script, build the executable again, and use that custom build.

0 commit comments

Comments
 (0)