MCPcopy
hub / github.com/webadderallorg/Recordly / buildNativeVideoExportArgs

Function buildNativeVideoExportArgs

electron/ipc/nativeVideoExport.ts:278–314  ·  view source on GitHub ↗
(
	encoder: string,
	options: NativeVideoExportStartOptions,
	outputPath: string,
)

Source from the content-addressed store, hash-verified

276}
277
278export function buildNativeVideoExportArgs(
279 encoder: string,
280 options: NativeVideoExportStartOptions,
281 outputPath: string,
282): string[] {
283 const args = [
284 "-y",
285 "-hide_banner",
286 "-loglevel",
287 "error",
288 "-f",
289 "rawvideo",
290 "-pix_fmt",
291 "rgba",
292 "-s:v",
293 `${options.width}x${options.height}`,
294 "-framerate",
295 String(options.frameRate),
296 "-i",
297 "pipe:0",
298 "-vf",
299 "vflip",
300 "-an",
301 "-c:v",
302 encoder,
303 "-g",
304 String(Math.max(1, Math.round(options.frameRate * 5))),
305 ...getBitrateArgs(options.bitrate),
306 ];
307
308 if (encoder === "libx264") {
309 args.push(...getLibx264ModeArgs(options.encodingMode));
310 }
311
312 args.push("-pix_fmt", "yuv420p", "-movflags", "+faststart", outputPath);
313 return args;
314}
315
316export function buildNativeCudaOverlayStaticLayoutArgs(
317 config: NativeStaticLayoutExportArgsConfig,

Callers 2

registerExportHandlersFunction · 0.90
probeNativeVideoEncoderFunction · 0.90

Calls 2

getBitrateArgsFunction · 0.85
getLibx264ModeArgsFunction · 0.85

Tested by

no test coverage detected