Add NVENC2

This commit is contained in:
Mylloon 2024-09-19 01:12:04 +02:00
parent 5841006f15
commit 482caad25f
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 12 additions and 6 deletions

View file

@ -15,11 +15,11 @@ Tool for sharing video to Discord.
irm https://git.mylloon.fr/Anri/dsr/raw/branch/main/install.ps1 | iex irm https://git.mylloon.fr/Anri/dsr/raw/branch/main/install.ps1 | iex
``` ```
> - If you have Discord Nitro: add `/nitro` flag when running DSR. > - If you have Discord Nitro: add `/nitro` flag.
> - If you have Discord Nitro Basic: add `/nitrobasic` flag when running DSR. > - If you have Discord Nitro Basic: add `/nitrobasic` flag.
> - If you have an NVidia GPU with NVenc: add `/nvenc` flag when running DSR. > - If you have an NVidia GPU with NVenc: add `/nvenc` (H.264) or `/nvenc2` (H.265) flag.
> - H.265 encoder is available : add `/h265` flag when running DSR (slower). > - H.265 encoder is available : add `/h265` flag (slower).
## More info ## More info
@ -27,7 +27,7 @@ Tool for sharing video to Discord.
- [x] Support drag&drop into the icon - [x] Support drag&drop into the icon
- [x] Keep the video under discord limitation - [x] Keep the video under discord limitation
- [x] If already under the limit, the file won't be compressed - [x] If already under the limit, the file won't be compressed
- [x] Basic NVenc (H.264) support - [x] Basic NVenc support
- [x] Nitro suppport via flags - [x] Nitro suppport via flags
- [x] Merge 2 audio files into one track when recorded with system audio and microphone - [x] Merge 2 audio files into one track when recorded with system audio and microphone
split up, while keeping the original ones (with conveniant metadata) split up, while keeping the original ones (with conveniant metadata)

View file

@ -172,11 +172,17 @@ app.whenReady().then(() => {
const argv = process.argv; const argv = process.argv;
if (argv.includes("/nvenc")) { if (argv.includes("/nvenc")) {
// Use NVenc // Use NVenc H.264
codec = "h264_nvenc"; codec = "h264_nvenc";
hwAcc = "-hwaccel cuda"; hwAcc = "-hwaccel cuda";
} }
if (argv.includes("/nvenc2")) {
// Use NVenc H.265
codec = "hevc_nvenc";
hwAcc = "-hwaccel cuda";
}
if (argv.includes("/h265")) { if (argv.includes("/h265")) {
// Use H.265 encoder // Use H.265 encoder
codec = "libx265"; codec = "libx265";