UNPKG

@remotion/renderer

Version:

Render Remotion videos using Node.js or Bun

35 lines (34 loc) 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sampleRateOption = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const cliFlag = 'sample-rate'; let currentSampleRate = 48000; exports.sampleRateOption = { name: 'Sample Rate', cliFlag, description: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Controls the sample rate of the output audio. The default is", ' ', jsx_runtime_1.jsx("code", { children: "48000" }), " Hz. Match this to your source audio to avoid resampling artifacts."] })), ssrName: 'sampleRate', docLink: 'https://www.remotion.dev/docs/sample-rate', type: 48000, getValue: ({ commandLine }, compositionSampleRate) => { if (commandLine[cliFlag] !== undefined) { return { value: commandLine[cliFlag], source: 'cli' }; } if (currentSampleRate !== 48000) { return { value: currentSampleRate, source: 'config file' }; } if (compositionSampleRate) { return { value: compositionSampleRate, source: 'via calculateMetadata', }; } return { value: 48000, source: 'default' }; }, setConfig: (value) => { currentSampleRate = value; }, id: cliFlag, };