fix: use Playwright's bundled FFmpeg when system ffmpeg not on PATH#3
Merged
DeDuckProject merged 4 commits intomainfrom Mar 11, 2026
Merged
fix: use Playwright's bundled FFmpeg when system ffmpeg not on PATH#3DeDuckProject merged 4 commits intomainfrom
DeDuckProject merged 4 commits intomainfrom
Conversation
In CI (GitHub Actions), `playwright install chromium --with-deps` downloads its own FFmpeg binary to the ms-playwright cache directory, but it is not added to the system PATH. The bare `ffmpeg` command in post-processor.ts therefore fails, causing the pipeline to fall back to screenshots instead of producing a GIF. `resolveFfmpegPath()` now tries system ffmpeg first, then scans the Playwright cache directory (~/.cache/ms-playwright on Linux, etc.) for the bundled binary. Works on Linux, macOS, and Windows without any changes to the CI workflow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🎬 UI Demo PreviewChanges detected in: What changed: The product page UI has been enhanced with a 'Best Seller' badge, a formatted price display ($129.99), an updated cart counter showing 'X in cart', and a new Wishlist button that toggles to '♥ Wishlisted' and shows a confirmation message when clicked. Demo script (auto-generated)import type { Page } from '@playwright/test';
export async function demo(page: Page): Promise<void> {
await page.goto('http://localhost:3000');
await page.waitForLoadState('networkidle');
await page.waitForTimeout(1500);
// Highlight the 'Best Seller' badge
const badge = page.locator('.badge');
await badge.scrollIntoViewIfNeeded();
await page.waitForTimeout(1500);
// Highlight the price
const price = page.locator('.price');
await price.scrollIntoViewIfNeeded();
await page.waitForTimeout(1500);
// Click 'Add to Cart' first time
await page.getByRole('button', { name: 'Add to Cart' }).click();
await page.waitForTimeout(1000);
// Click 'Add to Cart' second time
await page.getByRole('button', { name: 'Add to Cart' }).click();
await page.waitForTimeout(1500);
// Show the counter now reads '2 in cart'
const counter = page.locator('#counter');
await counter.scrollIntoViewIfNeeded();
await page.waitForTimeout(1500);
// Click the Wishlist button
await page.getByRole('button', { name: '♡ Wishlist' }).click();
await page.waitForTimeout(1500);
// Show the 'Added to wishlist!' confirmation message
const wishlistMsg = page.locator('#wishlist-msg');
await wishlistMsg.scrollIntoViewIfNeeded();
await page.waitForTimeout(2000);
}Generated by git-glimpse |
Playwright's bundled FFmpeg is compiled with --disable-everything and only supports WebM encoding for recording — it lacks the fps, palettegen, and paletteuse filters required for GIF conversion. Install system ffmpeg via apt-get in the demo workflow to fix post-processing. Also add meaningful UI changes to the example app (price display, wishlist button, best-seller badge) so the diff analyzer detects UI changes and the pipeline runs end-to-end instead of short-circuiting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Recordings were uploaded via uploadArtifact() which produces a zip download link that cannot be rendered inline in GitHub markdown. Switch to uploadToGitHubAssets() (already used for screenshots) which returns a direct browser_download_url that GitHub renders as an inline image via . Also removes the unused @actions/artifact dependency from the bundle, shrinking the action dist from 5.0MB to 2.1MB. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

In CI (GitHub Actions),
playwright install chromium --with-depsdownloads its own FFmpeg binary to the ms-playwright cache directory, but it is not added to the system PATH. The bareffmpegcommand in post-processor.ts therefore fails, causing the pipeline to fall back to screenshots instead of producing a GIF.resolveFfmpegPath()now tries system ffmpeg first, then scans the Playwright cache directory (~/.cache/ms-playwright on Linux, etc.) for the bundled binary. Works on Linux, macOS, and Windows without any changes to the CI workflow.