Skip to content

Commit bebe8fd

Browse files
authored
Merge pull request #11 from remotion-dev/free-free
Compile against `libfdk-aac-free`
2 parents 024ffe0 + 710120c commit bebe8fd

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ av1
1717
zimg
1818
fdk-aac-2.0.2
1919
fdkaac.tar.gz
20+
fdk-aac-free-2.0.0

compile-fdkaac.mjs

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,29 @@ import { PREFIX } from "./const.mjs";
44
import path from "path";
55

66
export const enableFdkAac = async (isWindows) => {
7-
if (!fs.existsSync("fdkaac")) {
7+
if (!fs.existsSync("fdk-aac-free-2.0.0")) {
88
const response = execSync(
9-
"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"
9+
// Free version of fdk-aac, without any license issues
10+
// https://src.fedoraproject.org/rpms/fdk-aac-free/tree/rawhide
11+
// https://en.wikipedia.org/wiki/Fraunhofer_FDK_AAC
12+
// > 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.
13+
"curl -L https://people.freedesktop.org/~wtay/fdk-aac-free-2.0.0.tar.gz > fdkaac.tar.gz"
1014
);
1115
execSync("tar -xzf fdkaac.tar.gz", {
1216
stdio: "inherit",
1317
});
1418
}
1519

20+
execSync("autoreconf -vif", { cwd: "fdk-aac-free-2.0.0" });
21+
1622
execSync(
1723
[
1824
path.posix.join(
1925
process.cwd().replace(/\\/g, "/"),
20-
"fdk-aac-2.0.2",
26+
"fdk-aac-free-2.0.0",
2127
"configure"
2228
),
23-
`--prefix=${path.resolve("fdk-aac-2.0.2", PREFIX)}`,
29+
`--prefix=${path.resolve("fdk-aac-free-2.0.0", PREFIX)}`,
2430
"--enable-static",
2531
"--disable-shared",
2632
"--with-pic",
@@ -29,20 +35,23 @@ export const enableFdkAac = async (isWindows) => {
2935
.filter(Boolean)
3036
.join(" "),
3137
{
32-
cwd: "fdk-aac-2.0.2",
38+
cwd: "fdk-aac-free-2.0.0",
3339
stdio: "inherit",
3440
}
3541
);
3642

3743
execSync("make", {
38-
cwd: "fdk-aac-2.0.2",
44+
cwd: "fdk-aac-free-2.0.0",
3945
stdio: "inherit",
4046
});
4147

4248
execSync("make install", {
43-
cwd: "fdk-aac-2.0.2",
49+
cwd: "fdk-aac-free-2.0.0",
4450
stdio: "inherit",
4551
});
4652

47-
execSync(`cp -r ${PREFIX} ../`, { cwd: "fdk-aac-2.0.2", stdio: "inherit" });
53+
execSync(`cp -r ${PREFIX} ../`, {
54+
cwd: "fdk-aac-free-2.0.0",
55+
stdio: "inherit",
56+
});
4857
};

0 commit comments

Comments
 (0)