Skip to content

Conversation

@JonnyBurger
Copy link
Member

@JonnyBurger JonnyBurger commented Oct 23, 2025

  • Allow enabling Compress without enabling Convert
  • Give an estimation for file size
  • remotion.dev/compress

- Created CompressUi component with video and audio bitrate controls
- Added compress section to ConvertSections type and ordering
- Integrated compression state management in ConvertUi
- Pass bitrate values to mediabunny video and audio conversion callbacks
- Support separate bitrate control for video (500 Kbps - 10 Mbps) and audio (64 - 320 Kbps)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@vercel
Copy link
Contributor

vercel bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
bugs Ready Ready Preview Comment Oct 23, 2025 8:43am
remotion Ready Ready Preview Comment Oct 23, 2025 8:43am

@JonnyBurger JonnyBurger changed the title Add compression option to ConvertUi component remotion.dev/convert: Add compression option to ConvertUi component Oct 23, 2025
{hasVideo ? (
<>
<Label htmlFor="video-bitrate">Video bitrate</Label>
<Select
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SelectTrigger components are missing id attributes that should match the htmlFor attributes on their corresponding labels, breaking the label-to-input association for accessibility.

View Details
📝 Patch Details
diff --git a/packages/convert/app/components/CompressUi.tsx b/packages/convert/app/components/CompressUi.tsx
index 904a73611e..a6d3088349 100644
--- a/packages/convert/app/components/CompressUi.tsx
+++ b/packages/convert/app/components/CompressUi.tsx
@@ -42,7 +42,7 @@ export const CompressUi: React.FC<{
 							setVideoBitrate(val === 'none' ? null : Number(val))
 						}
 					>
-						<SelectTrigger>
+						<SelectTrigger id="video-bitrate">
 							<SelectValue placeholder="Select video bitrate" />
 						</SelectTrigger>
 						<SelectContent>
@@ -71,7 +71,7 @@ export const CompressUi: React.FC<{
 							setAudioBitrate(val === 'none' ? null : Number(val))
 						}
 					>
-						<SelectTrigger>
+						<SelectTrigger id="audio-bitrate">
 							<SelectValue placeholder="Select audio bitrate" />
 						</SelectTrigger>
 						<SelectContent>

Analysis

Missing id attributes break label-to-input accessibility association in CompressUi

What fails: SelectTrigger components in CompressUi.tsx lack id attributes that match their Label htmlFor attributes, breaking programmatic label-to-input association

How to reproduce:

  1. Navigate to CompressUi component with screen reader
  2. Focus the select inputs for video/audio bitrate
  3. Screen reader will not announce the label text
  4. Click on the label text - select will not receive focus

Result: Labels with htmlFor="video-bitrate" and htmlFor="audio-bitrate" have no matching elements, so label.control is null and accessibility features fail

Expected: Labels should programmatically associate with their inputs per HTML specification, enabling screen reader announcements and click-to-focus behavior

Pattern established: Other components (ConvertForm.tsx, downloadModel.tsx) correctly implement matching htmlFor/id pairs

- Replace exact bitrate pickers with quality level selectors
- Import QUALITY_* constants from mediabunny
- Updated CompressUi to use quality levels (Very Low, Low, Medium, High, Very High)
- Updated ConvertUi state to use quality instead of bitrate
- Pass quality parameter to mediabunny video and audio conversion callbacks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@vercel vercel bot temporarily deployed to Preview – remotion October 23, 2025 08:36 Inactive
Comment on lines +92 to +97
"dependsOn": ["make"],
"outputs": ["build", ".vercel"],
"outputLogs": "new-only"
},
"@remotion/convert#build-spa": {
"dependsOn": ["^make"],
"dependsOn": ["make"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"dependsOn": ["make"],
"outputs": ["build", ".vercel"],
"outputLogs": "new-only"
},
"@remotion/convert#build-spa": {
"dependsOn": ["^make"],
"dependsOn": ["make"],
"dependsOn": ["^make"],
"outputs": ["build", ".vercel"],
"outputLogs": "new-only"
},
"@remotion/convert#build-spa": {
"dependsOn": ["^make"],

The turbo.json build dependencies were changed from ["^make"] to ["make"], which removes the requirement for dependency packages' make tasks to run first. This could cause build failures if these tasks depend on code from other packages.

View Details

Analysis

Broken turbo dependency configuration causes convert package build failures

What fails: @remotion/convert#build-page and @remotion/convert#build-spa tasks fail with module resolution errors when workspace dependencies aren't built first

How to reproduce:

# Remove built dependencies
rm -rf packages/{captions,paths,shapes,whisper-web}/dist
# Try building convert package
bunx turbo run @remotion/convert#build-page

Result: Build fails with Failed to resolve entry for package "@remotion/whisper-web". The package depends on workspace packages (@remotion/captions, @remotion/paths, @remotion/shapes, @remotion/whisper-web) that must be built first.

Expected: Tasks should wait for upstream dependencies to build successfully, as specified in Turbo task dependencies documentation - ^make runs dependencies' make tasks first, while make only looks within the same package.

Root cause: The convert package has no make script, so "dependsOn": ["make"] resolves to nothing, bypassing dependency builds entirely.

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.

2 participants