Skip to content

@remotion/cli: Implement --disallow-parallel-encoding option #5386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 16, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 16, 2025

This PR implements a new CLI flag --disallow-parallel-encoding for the render and benchmark commands, replacing the hardcoded disallowParallelEncoding: false values.

Changes Made

Core Implementation

  • New option file: Created packages/renderer/src/options/disallow-parallel-encoding.tsx following the same pattern as other boolean options
  • CLI flag: Added --disallow-parallel-encoding flag to both render and benchmark commands
  • Config support: Added Config.setDisallowParallelEncoding() method for configuration files

Code Changes

  • Replaced hardcoded disallowParallelEncoding: false in packages/cli/src/render.tsx (line 249)
  • Replaced hardcoded disallowParallelEncoding: false in packages/cli/src/benchmark.ts (line 479)
  • Added proper option resolution following CLI flag → config → default pattern

Documentation

  • Added CLI documentation in packages/docs/docs/cli/render.mdx (marked as available from v4.0.315)
  • Added CLI documentation in packages/docs/docs/cli/benchmark.mdx
  • Added config documentation in packages/docs/docs/config.mdx with TypeScript example

Usage Examples

CLI Usage

# Render with disallowed parallel encoding
npx remotion render --disallow-parallel-encoding src/index.ts my-comp out.mp4

# Benchmark with disallowed parallel encoding  
npx remotion benchmark --disallow-parallel-encoding src/index.ts

Config Usage

// remotion.config.ts
import {Config} from '@remotion/cli/config';

Config.setDisallowParallelEncoding(true);

Benefits

  • Memory efficiency: Allows users to trade speed for lower memory usage during rendering
  • Consistency: Follows the same option patterns as other boolean flags like --muted
  • Flexibility: Provides both CLI and config file options for different use cases

The option resolution follows the standard Remotion precedence: CLI flag takes precedence over config file, which takes precedence over the default value (false).

Fixes #5385.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link

vercel bot commented Jun 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bugs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2025 11:59am
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 16, 2025 11:59am

@Copilot Copilot AI changed the title [WIP] Implement CLI flag for disallowParallelEncoding Implement CLI flag for disallowParallelEncoding Jun 16, 2025
@Copilot Copilot AI requested a review from JonnyBurger June 16, 2025 09:07
Copilot finished work on behalf of JonnyBurger June 16, 2025 09:07
@JonnyBurger JonnyBurger changed the title Implement CLI flag for disallowParallelEncoding @remotion/cli: Implement --disallow-parallel-encoding option Jun 16, 2025
@JonnyBurger JonnyBurger marked this pull request as ready for review June 16, 2025 09:36
@JonnyBurger JonnyBurger merged commit 9ace89b into main Jun 16, 2025
13 of 14 checks passed
@JonnyBurger JonnyBurger deleted the copilot/fix-5385 branch June 16, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement CLI flag for disallowParallelEncoding
2 participants