| ; | |
| var __importDefault = (this && this.__importDefault) || function (mod) { | |
| return (mod && mod.__esModule) ? mod : { "default": mod }; | |
| }; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.ffprobeCommand = exports.ffmpegCommand = exports.dynamicLibEnv = void 0; | |
| const node_child_process_1 = require("node:child_process"); | |
| const node_path_1 = __importDefault(require("node:path")); | |
| const renderer_1 = require("@remotion/renderer"); | |
| const client_1 = require("@remotion/renderer/client"); | |
| const parsed_cli_1 = require("./parsed-cli"); | |
| const dynamicLibEnv = (indent, logLevel, binariesDirectory) => { | |
| const lib = node_path_1.default.dirname(renderer_1.RenderInternals.getExecutablePath({ | |
| type: 'compositor', | |
| indent, | |
| logLevel, | |
| binariesDirectory, | |
| })); | |
| return { | |
| RUST_BACKTRACE: 'full', | |
| ...(process.platform === 'darwin' | |
| ? { | |
| DYLD_LIBRARY_PATH: lib, | |
| } | |
| : process.platform === 'win32' | |
| ? { | |
| PATH: `${lib};${process.env.PATH}`, | |
| } | |
| : { | |
| LD_LIBRARY_PATH: lib, | |
| }), | |
| }; | |
| }; | |
| exports.dynamicLibEnv = dynamicLibEnv; | |
| const ffmpegCommand = (args, logLevel) => { | |
| const { value: binariesDirectory } = client_1.BrowserSafeApis.options.binariesDirectoryOption.getValue({ | |
| commandLine: parsed_cli_1.parsedCli, | |
| }); | |
| const binary = renderer_1.RenderInternals.getExecutablePath({ | |
| type: 'ffmpeg', | |
| indent: false, | |
| logLevel, | |
| binariesDirectory, | |
| }); | |
| renderer_1.RenderInternals.makeFileExecutableIfItIsNot(binary); | |
| const done = (0, node_child_process_1.spawnSync)(binary, args, { | |
| stdio: 'inherit', | |
| env: (0, exports.dynamicLibEnv)(false, logLevel, binariesDirectory), | |
| cwd: process.cwd(), | |
| }); | |
| process.exit(done.status); | |
| }; | |
| exports.ffmpegCommand = ffmpegCommand; | |
| const ffprobeCommand = (args, logLevel) => { | |
| const { value: binariesDirectory } = client_1.BrowserSafeApis.options.binariesDirectoryOption.getValue({ | |
| commandLine: parsed_cli_1.parsedCli, | |
| }); | |
| const binary = renderer_1.RenderInternals.getExecutablePath({ | |
| type: 'ffprobe', | |
| indent: false, | |
| logLevel, | |
| binariesDirectory, | |
| }); | |
| renderer_1.RenderInternals.makeFileExecutableIfItIsNot(binary); | |
| const done = (0, node_child_process_1.spawnSync)(binary, args, { | |
| cwd: process.cwd(), | |
| stdio: 'inherit', | |
| env: (0, exports.dynamicLibEnv)(false, logLevel, binariesDirectory), | |
| }); | |
| process.exit(done.status); | |
| }; | |
| exports.ffprobeCommand = ffprobeCommand; | |
Xet Storage Details
- Size:
- 2.69 kB
- Xet hash:
- 67a8ccf1b0a99c6a3c935c2aeb250d1f217d1cc4d97e87d134846e704e6b7244
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.