Skip to content

Commit 9b58272

Browse files
committed
remove redundant code
1 parent eeb2df4 commit 9b58272

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

packages/build/src/extensions/core/ffmpeg.ts

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function ffmpeg(options: FfmpegOptions = {}): BuildExtension {
3636
// Use static build for version 7 or 7.x
3737
if (options.version === "7" || options.version?.startsWith("7.")) {
3838
context.addLayer({
39-
id: "ffmpeg7",
39+
id: "ffmpeg",
4040
image: {
4141
instructions: [
4242
// Install ffmpeg after checksum validation
@@ -80,40 +80,3 @@ export function ffmpeg(options: FfmpegOptions = {}): BuildExtension {
8080
},
8181
};
8282
}
83-
84-
/**
85-
* Add ffmpeg 7.x to the build, and automatically set the FFMPEG_PATH and FFPROBE_PATH environment variables.
86-
* This uses the static build from johnvansickle.com to install the latest 7.x version.
87-
*
88-
* @returns The build extension.
89-
*/
90-
91-
export function ffmpeg7(): BuildExtension {
92-
return {
93-
name: "ffmpeg7",
94-
onBuildComplete(context) {
95-
if (context.target === "dev") {
96-
return;
97-
}
98-
99-
context.logger.debug("Adding ffmpeg 7");
100-
101-
context.addLayer({
102-
id: "ffmpeg7",
103-
image: {
104-
instructions:[
105-
"RUN apt-get update && apt-get install -y --no-install-recommends wget xz-utils && apt-get clean && rm -rf /var/lib/apt/lists/*",
106-
"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",
107-
],
108-
},
109-
deploy: {
110-
env: {
111-
FFMPEG_PATH: "/usr/bin/ffmpeg",
112-
FFPROBE_PATH: "/usr/bin/ffprobe",
113-
},
114-
override: true,
115-
}
116-
})
117-
}
118-
}
119-
}

0 commit comments

Comments
 (0)