Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TRI-4524] The ffmpeg extension installs 5.1.6 (not 7.x) #1688

Open
matt-aitken opened this issue Feb 9, 2025 · 3 comments · May be fixed by #1777
Open

[TRI-4524] The ffmpeg extension installs 5.1.6 (not 7.x) #1688

matt-aitken opened this issue Feb 9, 2025 · 3 comments · May be fixed by #1777

Comments

@matt-aitken
Copy link
Member

matt-aitken commented Feb 9, 2025

This is because we install ffmpeg using apt-get and it only installs the latest version that's connected to the base image you use (as far as I can gather). We call apt-get update, but that doesn't help…

Instead a different approach needs to be taken. You can create this ffmpeg7 extension yourself by creating this file in your codebase, then importing the ffmpeg() function into the build extensions in your trigger.config file.

import { BuildExtension } from "@trigger.dev/build";

export function ffmpeg7(): BuildExtension {
  return {
    name: "ffmpeg-7",
    onBuildComplete(context) {
      if (context.target === "dev") {
        return;
      }

      context.logger.debug("Adding ffmpeg 7");

      context.addLayer({
        id: "ffmpeg",
        image: {
          instructions: [
            "RUN apt-get update && apt-get install -y --no-install-recommends wget xz-utils && apt-get clean && rm -rf /var/lib/apt/lists/*",
            "RUN wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz -O ffmpeg.tar.xz && tar xvf ffmpeg.tar.xz -C /usr/bin --strip-components=1 --no-anchored 'ffmpeg' 'ffprobe' && rm ffmpeg.tar.xz",
          ],
        },
        deploy: {
          env: {
            FFMPEG_PATH: "/usr/bin/ffmpeg",
            FFPROBE_PATH: "/usr/bin/ffprobe",
          },
          override: true,
        },
      });
    },
  };
}

TRI-4524

@matt-aitken matt-aitken changed the title The ffmpeg extension installs 5.1.6 (not 7.x) [TRI-4524] The ffmpeg extension installs 5.1.6 (not 7.x) Feb 9, 2025
@Rudra-Sankha-Sinhamahapatra
Copy link

Rudra-Sankha-Sinhamahapatra commented Mar 8, 2025

@matt-aitken only creating this file will resolve that ? Although I have added it by creating a PR , is there anything else needed . Happy to hear. #1777

@Rudra-Sankha-Sinhamahapatra Rudra-Sankha-Sinhamahapatra linked a pull request Mar 8, 2025 that will close this issue
3 tasks
@maximedupre
Copy link

Is there a reason why the above PR can't be merged and make ffmpeg 7.x the default version? :)

@maximedupre
Copy link

maximedupre commented Mar 26, 2025

@matt-aitken The proposed solution doesn't actually work (anymore)

> [base 3/4] RUN wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz -O ffmpeg.tar.xz && tar xvf ffmpeg.tar.xz -C /usr/bin --strip-components=1 --no-anchored 'ffmpeg' 'ffprobe' && rm ffmpeg.tar.xz:
#0 0.238 --2025-03-26 11:54:01--  https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
#0 0.239 Resolving johnvansickle.com (johnvansickle.com)... 107.180.57.212
#0 0.269 Connecting to johnvansickle.com (johnvansickle.com)|107.180.57.212|:443... connected.
#0 0.425 ERROR: The certificate of 'johnvansickle.com' is not trusted.
#0 0.425 ERROR: The certificate of 'johnvansickle.com' doesn't have a known issuer.
------
Error: failed to solve: process "/bin/sh -c wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz -O ffmpeg.tar.xz && tar xvf ffmpeg.tar.xz -C /usr/bin --strip-components=1 --no-anchored 'ffmpeg' 'ffprobe' && rm ffmpeg.tar.xz" did not complete successfully: exit code: 5%

Edit

Modifying the wget command to [...] RUN wget --no-check-certificate [...] works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants