From 167881ef8520916d4748e5289f9006daa50a6799 Mon Sep 17 00:00:00 2001 From: Jonny Burger Date: Fri, 14 Mar 2025 10:36:35 +0100 Subject: [PATCH 1/3] free free --- .gitignore | 1 + compile-fdkaac.mjs | 31 +++++++++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 22ef6c3..0fa339e 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ av1 zimg fdk-aac-2.0.2 fdkaac.tar.gz +fdk-aac-free-2.0.0 diff --git a/compile-fdkaac.mjs b/compile-fdkaac.mjs index 711a8ca..f68f389 100644 --- a/compile-fdkaac.mjs +++ b/compile-fdkaac.mjs @@ -4,23 +4,25 @@ import { PREFIX } from "./const.mjs"; import path from "path"; export const enableFdkAac = async (isWindows) => { - if (!fs.existsSync("fdkaac")) { + if (!fs.existsSync("fdk-aac-free-2.0.0")) { const response = execSync( - "curl -L https://sourceforge.net/projects/opencore-amr/files/fdk-aac/fdk-aac-2.0.2.tar.gz/download?use_mirror=gigenet > fdkaac.tar.gz" + // Free version of fdk-aac, without any license issues + // https://src.fedoraproject.org/rpms/fdk-aac-free/tree/rawhide + // https://en.wikipedia.org/wiki/Fraunhofer_FDK_AAC + // > However, Fedora states that this will not affect the fdk-aac-free package, which enables only the commonly used "Low Complexity AAC" profile, which is what most people use. + "curl -L https://people.freedesktop.org/~wtay/fdk-aac-free-2.0.0.tar.gz > fdkaac.tar.gz" ); execSync("tar -xzf fdkaac.tar.gz", { stdio: "inherit", }); } + execSync("autoreconf -vif", { cwd: "fdk-aac-free-2.0.0" }); + execSync( [ - path.posix.join( - process.cwd().replace(/\\/g, "/"), - "fdk-aac-2.0.2", - "configure" - ), - `--prefix=${path.resolve("fdk-aac-2.0.2", PREFIX)}`, + "./configure", + `--prefix=${path.resolve("fdk-aac-free-2.0.0", PREFIX)}`, "--enable-static", "--disable-shared", "--with-pic", @@ -29,20 +31,25 @@ export const enableFdkAac = async (isWindows) => { .filter(Boolean) .join(" "), { - cwd: "fdk-aac-2.0.2", + cwd: "fdk-aac-free-2.0.0", stdio: "inherit", } ); execSync("make", { - cwd: "fdk-aac-2.0.2", + cwd: "fdk-aac-free-2.0.0", stdio: "inherit", }); execSync("make install", { - cwd: "fdk-aac-2.0.2", + cwd: "fdk-aac-free-2.0.0", stdio: "inherit", }); - execSync(`cp -r ${PREFIX} ../`, { cwd: "fdk-aac-2.0.2", stdio: "inherit" }); + execSync(`cp -r ${PREFIX} ../`, { + cwd: "fdk-aac-free-2.0.0", + stdio: "inherit", + }); }; + +await enableFdkAac(false); From 7e41f59c79ab9e92b86cb46ae4447fc40495e2e7 Mon Sep 17 00:00:00 2001 From: Jonny Burger Date: Fri, 14 Mar 2025 11:08:11 +0100 Subject: [PATCH 2/3] Update compile-fdkaac.mjs --- compile-fdkaac.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compile-fdkaac.mjs b/compile-fdkaac.mjs index f68f389..3ce2369 100644 --- a/compile-fdkaac.mjs +++ b/compile-fdkaac.mjs @@ -21,7 +21,11 @@ export const enableFdkAac = async (isWindows) => { execSync( [ - "./configure", + path.posix.join( + process.cwd().replace(/\\/g, "/"), + "fdk-aac-free-2.0.0", + "configure" + ), `--prefix=${path.resolve("fdk-aac-free-2.0.0", PREFIX)}`, "--enable-static", "--disable-shared", From 710120c8acec01bfcc17b044722bb70257e37f45 Mon Sep 17 00:00:00 2001 From: Jonny Burger Date: Fri, 14 Mar 2025 11:08:43 +0100 Subject: [PATCH 3/3] Update compile-fdkaac.mjs --- compile-fdkaac.mjs | 2 -- 1 file changed, 2 deletions(-) diff --git a/compile-fdkaac.mjs b/compile-fdkaac.mjs index 3ce2369..2a6b5b5 100644 --- a/compile-fdkaac.mjs +++ b/compile-fdkaac.mjs @@ -55,5 +55,3 @@ export const enableFdkAac = async (isWindows) => { stdio: "inherit", }); }; - -await enableFdkAac(false);