首页 Function Compute Function Compute FAQ Code development General FAQ How do I install FFmpeg of a specified version?

How do I install FFmpeg of a specified version?

更新时间: 2026-04-01 04:42:41

Function Compute includes FFmpeg in its runtime environments. If the built-in version does not meet your requirements, use one of the following methods to install a specific version.

Method 1: Use a custom container image (recommended)

Select Web Function and set the runtime to Custom Container Image. This gives you full control over the runtime environment, including the FFmpeg version and any other dependencies.

Method 2: Package FFmpeg into a layer or code package

For built-in runtimes and custom runtimes, download the amd64 FFmpeg binary from johnvansickle.com/ffmpeg and package it into a layer or code package.

Use a layer when the same FFmpeg binary is shared across multiple functions — it keeps deployment packages small and lets you update FFmpeg independently of your function code.

Package FFmpeg into a layer

Download the amd64 static build from johnvansickle.com/ffmpeg and package it into a layer zip file. For instructions on the required zip structure and how to upload the zip as a layer, see Build a .zip file for a layer.

Package FFmpeg into a code package

If you include FFmpeg directly in your function's code package, run chmod +x ffmpeg before compressing the package to grant the binary executable permissions.

上一篇: Can I deploy static resources in Function Compute? 下一篇: What do I do if a code package contains garbled characters after it is uploaded to Function Compute?
阿里云首页 函数计算 相关技术圈