MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / getGpuEncoderName

Function getGpuEncoderName

packages/engine/src/utils/gpuEncoder.ts:93–109  ·  view source on GitHub ↗
(encoder: GpuEncoder, codec: "h264" | "h265")

Source from the content-addressed store, hash-verified

91}
92
93export function getGpuEncoderName(encoder: GpuEncoder, codec: "h264" | "h265"): string {
94 if (!encoder) return codec === "h264" ? "libx264" : "libx265";
95 switch (encoder) {
96 case "nvenc":
97 return codec === "h264" ? "h264_nvenc" : "hevc_nvenc";
98 case "videotoolbox":
99 return codec === "h264" ? "h264_videotoolbox" : "hevc_videotoolbox";
100 case "vaapi":
101 return codec === "h264" ? "h264_vaapi" : "hevc_vaapi";
102 case "qsv":
103 return codec === "h264" ? "h264_qsv" : "hevc_qsv";
104 case "amf":
105 return codec === "h264" ? "h264_amf" : "hevc_amf";
106 default:
107 return codec === "h264" ? "libx264" : "libx265";
108 }
109}
110
111// Minimum probe dimensions must clear every GPU encoder's hardware minimum.
112// NVIDIA data-center SKUs (L4/T4/A10/A100) reject frames below ~257px on

Callers 4

gpuEncoder.test.tsFile · 0.85
getProbeArgsFunction · 0.85
buildStreamingArgsFunction · 0.85
buildEncoderArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected