add H265 (slow asf)
This commit is contained in:
parent
ee64d06e0a
commit
5841006f15
2 changed files with 9 additions and 4 deletions
|
@ -17,7 +17,9 @@ Tool for sharing video to Discord.
|
||||||
|
|
||||||
> - If you have Discord Nitro: add `/nitro` flag when running DSR.
|
> - If you have Discord Nitro: add `/nitro` flag when running DSR.
|
||||||
> - If you have Discord Nitro Basic: add `/nitrobasic` flag when running DSR.
|
> - If you have Discord Nitro Basic: add `/nitrobasic` flag when running DSR.
|
||||||
|
|
||||||
> - If you have an NVidia GPU with NVenc: add `/nvenc` flag when running DSR.
|
> - If you have an NVidia GPU with NVenc: add `/nvenc` flag when running DSR.
|
||||||
|
> - H.265 encoder is available : add `/h265` flag when running DSR (slower).
|
||||||
|
|
||||||
## More info
|
## More info
|
||||||
|
|
||||||
|
@ -25,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 support
|
- [x] Basic NVenc (H.264) 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)
|
||||||
|
|
|
@ -175,9 +175,11 @@ app.whenReady().then(() => {
|
||||||
// Use NVenc
|
// Use NVenc
|
||||||
codec = "h264_nvenc";
|
codec = "h264_nvenc";
|
||||||
hwAcc = "-hwaccel cuda";
|
hwAcc = "-hwaccel cuda";
|
||||||
|
}
|
||||||
|
|
||||||
// Increase video bitrate
|
if (argv.includes("/h265")) {
|
||||||
videoBitrate = Math.floor(videoBitrate);
|
// Use H.265 encoder
|
||||||
|
codec = "libx265";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compress the video
|
// Compress the video
|
||||||
|
@ -192,7 +194,8 @@ app.whenReady().then(() => {
|
||||||
-i "${file}" \
|
-i "${file}" \
|
||||||
-c:v ${codec} -b:v ${videoBitrate}k -pass 2 -c:a copy \
|
-c:v ${codec} -b:v ${videoBitrate}k -pass 2 -c:a copy \
|
||||||
${mappingTracks} -f mp4 \
|
${mappingTracks} -f mp4 \
|
||||||
${metadataAudio} \
|
-profile:v main \
|
||||||
|
${audioTracks.length === 3 ? metadataAudio : ""} \
|
||||||
${shareOpt} \
|
${shareOpt} \
|
||||||
"${finalFile}"`
|
"${finalFile}"`
|
||||||
).catch((e) => registerError(win, e));
|
).catch((e) => registerError(win, e));
|
||||||
|
|
Loading…
Reference in a new issue