remotion-dev/remotion · error · RemotionRenderingOutputError

Remotion rendering error: {decoded_result['message']}

Error message

Remotion rendering error: {decoded_result['message']}

What it means

Raised when the parsed Lambda response dict has type === 'error'. Unlike errorMessage (a runtime crash), this is a structured Remotion error: the function ran successfully but the render itself failed in a controlled way and Remotion reported it via the typed protocol.

Source

Thrown at packages/lambda-python/remotion_lambda/remotionclient.py:505

            raise RemotionInvalidArgumentException(
                f"Invalid Lambda invocation parameters: {e}"
            ) from e
        except json.JSONDecodeError as e:
            raise RemotionException(
                f"Failed to decode final Lambda response: {e}. Raw response: {result_raw}"
            ) from e
        except UnicodeDecodeError as e:
            raise RemotionException(
                f"Failed to decode Lambda response payload: {e}"
            ) from e

        if 'errorMessage' in decoded_result:
            raise RemotionRenderingOutputError(
                f"Lambda function returned an error: {decoded_result['errorMessage']}"
            )

        if 'type' in decoded_result and decoded_result['type'] == 'error':
            raise RemotionRenderingOutputError(
                f"Remotion rendering error: {decoded_result['message']}"
            )
        if 'type' not in decoded_result or decoded_result['type'] != 'success':
            raise RemotionRenderingOutputError(
                f"Unexpected Lambda response format: {result_raw}"
            )

        return decoded_result

    def _custom_serializer(self, obj: Any) -> Any: # Added type hints
        """A custom JSON serializer that handles enums and objects."""
        if isinstance(obj, Enum):
            return obj.value if hasattr(obj, 'value') else obj.name
        # Check if it's a dataclass instance before calling asdict
        # This often works better with mypy than just a try-except.
        if hasattr(obj, '__dataclass_fields__'):
            return asdict(obj)
        if hasattr(obj, '__dict__'):

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Read the 'message' value from the error - it is Remotion's specific description of the rendering failure.
  2. Reproduce the render locally (`remotion render`) to get a clearer stack trace with the same input props.
  3. Verify the composition id exists in the deployed bundle (`remotion compositions`).
  4. Confirm all asset URLs in input props are publicly accessible and return 200.

Example fix

// before
client.render_media('non-existent-comp', input_props={...})

# after
# first run `remotion compositions` against the deployed serve URL
client.render_media('Main', input_props={...})
Defensive patterns

Strategy: try-catch

Try / catch

try:\n    result = client.render_media(...)\nexcept RemotionRenderingOutputError as e:\n    msg = str(e)  # contains Remotion's 'message'\n    log.error('Render failed: %s', msg)\n    raise

Prevention

When it happens

Trigger: Render produced a controlled failure: invalid composition id, missing input props, asset fetch failures, frame rendering exceptions captured by Remotion's own error handling. The 'message' field carries Remotion's human-readable description.

Common situations: Wrong composition id passed; referenced an asset URL that returns 404; input props schema mismatch in the composition code; private/unreachable media URL; corrupted bundle structure.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/d8e3a3f4445cae78. Report an issue: GitHub.