Deploying custom AEM Asset Compute workers with FFmpeg exceeding the Adobe I/O Runtime size limit
This article describes the deployment limitation for custom Adobe Experience Manager (AEM) Asset Compute workers that require an FFmpeg binary larger than the Adobe I/O Runtime 22 MB action size limit, and outlines supported workarounds.
Description description
When building a custom AEM Asset Compute worker using Adobe App Builder and Adobe I/O Runtime (Node.js 22), you need to include a Linux x64 FFmpeg binary to process video assets, such as extracting the first frame of an MP4 as a PNG rendition. However, the Adobe I/O Runtime enforces a strict 22 MB limit on the compressed action package, which prevents deployment if your worker and its dependencies (such as FFmpeg) exceed this size.
Environment
- Adobe Experience Manager as a Cloud Service (AEMaaCS)
- Asset Compute Service
- Adobe App Builder
- Adobe I/O Runtime (Node.js 22)
Symptoms
- Deployment of the custom Asset Compute worker fails due to the action package exceeding the 22 MB compressed size limit.
- The required FFmpeg binary alone is larger than the allowed limit.
Cause
The Adobe I/O Runtime enforces a 22 MB compressed action package size limit. FFmpeg isn’t available in the managed runtime, and custom container images aren’t supported for Asset Compute workers. This prevents deployment of workers that require large binaries.
Resolution resolution
Follow the steps below to resolve the issue:
-
Confirm the action package size:
- Ensure your complete worker package (including FFmpeg and all dependencies) is under 22 MB compressed. The limit applies to the ZIP file uploaded to Adobe I/O Runtime.
-
Attempt to reduce FFmpeg binary size:
- Build a custom FFmpeg binary with only the required codecs and features enabled to minimize its size. In some cases, a minimal build may fit within the 22 MB compressed limit.
-
Consider downloading FFmpeg at runtime:
- Modify your worker to download and extract FFmpeg from an external source during execution. Note that this may increase cold start latency and isn’t officially supported.
-
Use an external video processing service:
- If the FFmpeg binary can’t be reduced below the size limit, implement your worker to call an externally hosted video-processing service (such as a cloud function or microservice running FFmpeg) to perform the required frame extraction and return the result to the worker.
-
Evaluate Dynamic Media add-on:
- If your organization is licensed for the Dynamic Media add-on, check if it can generate the required video thumbnails or renditions out of the box.
-
Verify deployment:
- After applying one of the above workarounds, attempt to deploy your Asset Compute worker, and confirm that the required video rendition is generated, as expected.