diff --git a/src/misc/TextField.js b/src/misc/TextField.js
index 1599cfe..df225b2 100644
--- a/src/misc/TextField.js
+++ b/src/misc/TextField.js
@@ -18,6 +18,8 @@ export default function Component({
rows = 1,
env = false,
type = 'text',
+ min = null,
+ max = null,
helperText = null,
onChange = function (value) {},
}) {
@@ -32,10 +34,30 @@ export default function Component({
);
}
+ let inputProps = {};
+
+ if (min !== null) {
+ inputProps.min = min;
+ }
+
+ if (max !== null) {
+ inputProps.max = max;
+ }
+
return (
{label}
-
+
{helperText && {helperText}}
);
diff --git a/src/misc/coders/Encoders/video/av1_nvenc.js b/src/misc/coders/Encoders/video/av1_nvenc.js
index 2fbc208..5975dd8 100644
--- a/src/misc/coders/Encoders/video/av1_nvenc.js
+++ b/src/misc/coders/Encoders/video/av1_nvenc.js
@@ -11,6 +11,7 @@ import Helper from '../../helper';
function init(initialState) {
const state = {
+ gpu: '0',
bitrate: '4096',
fps: '25',
gop: '2',
@@ -31,6 +32,8 @@ function createMapping(settings, stream, skills) {
const local = [
'-codec:v',
'av1_nvenc',
+ '-gpu',
+ `${settings.gpu}`,
'-preset:v',
`${settings.preset}`,
'-tune:v',
@@ -196,6 +199,9 @@ function Coder({ stream = {}, settings = {}, skills = {}, onChange = function (s
+
+
+
);
}
diff --git a/src/misc/coders/Encoders/video/h264_nvenc.js b/src/misc/coders/Encoders/video/h264_nvenc.js
index db2c1e5..b7b91f8 100644
--- a/src/misc/coders/Encoders/video/h264_nvenc.js
+++ b/src/misc/coders/Encoders/video/h264_nvenc.js
@@ -11,6 +11,7 @@ import Helper from '../../helper';
function init(initialState) {
const state = {
+ gpu: '0',
bitrate: '4096',
fps: '25',
gop: '2',
@@ -32,6 +33,8 @@ function createMapping(settings, stream, skills) {
const local = [
'-codec:v',
'h264_nvenc',
+ '-gpu',
+ `${settings.gpu}`,
'-preset:v',
`${settings.preset}`,
'-tune:v',
@@ -206,6 +209,9 @@ function Coder({ stream = {}, settings = {}, skills = {}, onChange = function (s
+
+
+
);
}
diff --git a/src/misc/coders/Encoders/video/hevc_nvenc.js b/src/misc/coders/Encoders/video/hevc_nvenc.js
index e51f3ab..da14b9b 100644
--- a/src/misc/coders/Encoders/video/hevc_nvenc.js
+++ b/src/misc/coders/Encoders/video/hevc_nvenc.js
@@ -11,6 +11,7 @@ import Helper from '../../helper';
function init(initialState) {
const state = {
+ gpu: '0',
bitrate: '4096',
fps: '25',
gop: '2',
@@ -32,6 +33,8 @@ function createMapping(settings, stream, skills) {
const local = [
'-codec:v',
'hevc_nvenc',
+ '-gpu',
+ `${settings.gpu}`,
'-preset:v',
`${settings.preset}`,
'-tune:v',
@@ -203,6 +206,9 @@ function Coder({ stream = {}, settings = {}, skills = {}, onChange = function (s
+
+
+
);
}
diff --git a/src/misc/coders/settings/Video.js b/src/misc/coders/settings/Video.js
index 24d7c08..f56bcaa 100644
--- a/src/misc/coders/settings/Video.js
+++ b/src/misc/coders/settings/Video.js
@@ -6,6 +6,7 @@ import MenuItem from '@mui/material/MenuItem';
import Select from '../../../misc/Select';
import SelectCustom from '../../../misc/SelectCustom';
+import TextField from '../../../misc/TextField';
function Bitrate({
value = '',
@@ -322,6 +323,10 @@ function FpsMode({ value = '', onChange = function (event) {} }) {
);
}
+function GPU({ value = '', onChange = function (event) {} }) {
+ return GPU} value={value} onChange={onChange} type="number" min={0}>;
+}
+
export default {
Bitrate,
GOP,
@@ -333,4 +338,5 @@ export default {
Format,
PixFormat,
FpsMode,
+ GPU,
};