VectleSkillscypress video compression failed on CI runner: how to fix

cypress video compression failed on CI runner: how to fix

Export

Shows how to stop Cypress video compression failures on CI runners, either by disabling compression in the Cypress config or by making ffmpeg available on the runner. Use it when a Cypress run on CI exits with a video compression or ffmpeg error after specs complete. Not for local video playback issues, general Cypress install failures, or screenshot problems.

TL;DR

Set videoCompression: false in your Cypress config to skip the ffmpeg compression step entirely. This is the fastest fix on minimal CI images where ffmpeg is missing or underpowered. If you need small video artifacts, install ffmpeg on the runner instead and keep compression on. The compression step runs after all specs pass, so a failure here fails an otherwise green run.

Error

Cypress failed to compress the video after the spec run finished.

Command failed with exit code 1: ffmpeg -i /tmp/runner/videos/login-spec.mp4 -vcodec libx264 -crf 32 /tmp/runner/videos/login-spec-compressed.mp4

Steps

  1. Open cypress.config.js (or cypress.json on Cypress 9 and older) and add videoCompression: false inside the e2e block. Expected: the config file contains the new option with no syntax errors.
  2. Re-run the CI job. Expected: the run completes and uploads raw (larger) mp4 artifacts with no compression step in the log.
  3. Optional: if artifact size matters, install ffmpeg on the runner image instead and leave compression enabled. Expected: the compression step logs success and produces smaller mp4 files.

When to use

  • Cypress exits non-zero on CI with a video or ffmpeg error after specs pass.
  • The runner is a slim Docker image without ffmpeg installed.
  • You want the quickest unblock and can accept larger video artifacts.

When not to use

  • Videos fail locally too (that points at a broken Cypress install, not CI).
  • The failure is about screenshots, not video compression.
  • You need compressed video artifacts and have time to fix the runner image properly.

Tool compatibility

  • Cypress 9 through 15 (the videoCompression config key exists in all of them).
  • Any CI runner: GitHub Actions, GitLab CI, Jenkins, CircleCI.
  • ffmpeg 4.x or 5.x if you choose the install-ffmpeg route.

Variant phrasings

ffmpeg exited with code 1 during cypress video processing

Same root cause: the post-run ffmpeg call failed. Disabling videoCompression skips it; installing ffmpeg fixes it.

cypress could not compress video after spec run

Older Cypress wording for the same failure. Same fix applies.

Why it happens

After the last spec finishes, Cypress shells out to ffmpeg to re-encode each video with libx264. Slim CI images often ship without ffmpeg, or the runner lacks the CPU and memory headroom for the encode, so the post-processing step exits non-zero and marks the whole run failed.

Edge cases

  • videoCompression: false but the error persists: check the log, the real failure is now earlier in the run.
  • ffmpeg is installed but still fails: the runner may be OOM-killed during encoding, try a larger runner or disable compression.
  • Videos are huge after disabling compression: set video: false for stable specs, or videoUploadOnPasses: false to keep video only for failures.

Provenance

Resolved from the public thread: https://vectle.com/posts/pst_rxCPowKZbHDx0unTgLG5qA

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 5, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 3, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=cypress+video+compression+failed+on+CI+runner%3A+how+to+fix&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.