mirror of
https://github.com/DevL0rd/SkyNX
synced 2024-11-13 23:17:06 +00:00
Add Intel GPU Encoding
This commit is contained in:
parent
79c8857c73
commit
95f08c5592
4 changed files with 7 additions and 1 deletions
|
@ -77,6 +77,9 @@ function startVideoProcess() {
|
|||
} else if(encoding == "AMDVCE"){ //AMD Video Coding Engine
|
||||
ffmpegVideoArgs = ["-probesize", "50M", "-hwaccel", "auto", "-f", "gdigrab", "-framerate", fps, "-video_size", screenWidth + "x" + screenHeight, "-offset_x", "0", "-offset_y", "0", "-draw_mouse", "1", "-i", "desktop", "-f", "h264", "-c:v", "h264_amf", "-usage", "1", "-rc", "cbr", "-vf", "scale=1280x720", "-pix_fmt", "yuv420p", "-b:v", quality + "M", "-minrate", quality - 3 + "M", "-maxrate", quality + "M", "-bufsize", (quality / (fps / 4)) + "M", "tcp://" + ip + ":2222"];
|
||||
console.log("Using AMD Video Coding Engine");
|
||||
} else if(encoding == "QSV"){
|
||||
ffmpegVideoArgs = ["-probesize", "50M", "-hwaccel", "auto", "-f", "gdigrab", "-framerate", fps, "-video_size", screenWidth + "x" + screenHeight, "-offset_x", "0", "-offset_y", "0", "-draw_mouse", "1", "-i", "desktop", "-f", "h264", "-c:v", "h264_qsv", "-preset", "faster", "-profile", "baseline", "-vf", "scale=1280x720", "-pix_fmt", "yuv420p", "-b:v", quality + "M", "-minrate", quality - 3 + "M", "-maxrate", quality + "M", "-bufsize", (quality / (fps / 4)) + "M", "tcp://" + ip + ":2222"];
|
||||
console.log("Using Intel QSV Encoding");
|
||||
} else { //CPU Software Encoding
|
||||
ffmpegVideoArgs = ["-probesize", "50M", "-hwaccel", "auto", "-f", "gdigrab", "-framerate", fps, "-video_size", screenWidth + "x" + screenHeight, "-offset_x", "0", "-offset_y", "0", "-draw_mouse", "1", "-i", "desktop", "-f", "h264", "-vf", "scale=1280x720", "-preset", "ultrafast", "-tune", "zerolatency", "-pix_fmt", "yuv420p", "-profile:v", "baseline", "-x264-params", "nal-hrd=cbr", "-b:v", quality + "M", "-minrate", quality - 3 + "M", "-maxrate", quality + "M", "-bufsize", (quality / 2) + "M", "tcp://" + ip + ":2222"];
|
||||
console.log("Using CPU Encoding");
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
<a class="dropdown-item" href="javascript:setEncoding('CPU')">CPU</a>
|
||||
<a class="dropdown-item" href="javascript:setEncoding('NVENC')">Nvidia Encoding</a>
|
||||
<a class="dropdown-item" href="javascript:setEncoding('AMDVCE')">AMD Video Coding Engine</a>
|
||||
<a class="dropdown-item" href="javascript:setEncoding('QSV')">Intel QuickSync</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -94,6 +94,8 @@ function applyClientSettings() {
|
|||
$("#encodingDrop").html("Encoding (Nvidia)");
|
||||
} else if(clientSettings.encoding == "AMDVCE"){
|
||||
$("#encodingDrop").html("Encoding (AMD)")
|
||||
} else if(clientSettings.encoding == "QSV"){
|
||||
$("#encodingDrop").html("Encoding (Intel)");
|
||||
} else {
|
||||
$("#encodingDrop").html("Encoding (CPU)");
|
||||
clientSettings.encoding = "CPU";
|
||||
|
|
|
@ -138,7 +138,7 @@ function startStreamer(arg) {
|
|||
if (arg.abxySwap) {
|
||||
args.push("/abxySwap");
|
||||
}
|
||||
if (arg.encoding == "NVENC" || arg.encoding == "AMDVCE") {
|
||||
if (arg.encoding == "NVENC" || arg.encoding == "AMDVCE" || arg.encoding == "QSV") {
|
||||
args.push("/e");
|
||||
args.push(arg.encoding);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue