-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
122 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
# GPU Acceleration | ||
|
||
test | ||
Encoding is performed on CPU by default. While ffmpeg uses available CPU instructions to speed up the process, it's still much slower compared to encoding directly on GPU, sometimes in order of magnitude. | ||
|
||
Given you have a GPU capable of encoding AV1 (NVIDIA GeForce RTX 450+), specify `av1_nvenc` codec in imgit configuration under encoding options to utilize it. Following sample configuration will make imgit use GPU acceleration when encoding main content files, as well as dense and cover variants: | ||
|
||
```js | ||
imgit({ | ||
encode: { | ||
main: { | ||
specs: [ | ||
[/^image\/.+/, { ext: "avif", codec: "av1_nvenc" }], | ||
[/^video\/.+/, { ext: "mp4", codec: "av1_nvenc" }] | ||
] | ||
}, | ||
dense: { | ||
specs: [ | ||
[/^image\/.+/, { ext: "avif", codec: "av1_nvenc" }] | ||
] | ||
}, | ||
cover: { | ||
specs: [[/.*/, { | ||
ext: "avif", select: 0, scale: 0.05, blur: 0.4, | ||
codec: "av1_nvenc" | ||
}]] | ||
} | ||
}, | ||
}); | ||
``` | ||
|
||
Consult NVIDIA docs for available encode options: https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/ffmpeg-with-nvidia-gpu. |
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Plugins |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "bundler" | ||
} | ||
}, | ||
"include": [".vitepress/**/*"] | ||
} |