Skip to content

Commit

Permalink
Merge pull request #8 from remotion-dev/7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger authored Oct 3, 2024
2 parents 9f911d5 + 4d5cd78 commit 407b764
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 104 deletions.
15 changes: 8 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
keys:
- ffmpeg_source-linux-x64
- run: sudo apt-get update
- run: sudo apt-get install -y yasm nasm clang cargo make zlib1g-dev meson ninja-build autoconf automake libtool patchelf
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- run: sudo apt-get install -y yasm nasm clang make zlib1g-dev meson ninja-build autoconf automake libtool patchelf
- run: node clean.mjs
- run: node compile-ffmpeg.mjs
- run: node generate-bindings.mjs
- run: source "$HOME/.cargo/env" && node generate-bindings.mjs
- run: node zip.mjs
- run: node test-ffmpeg.mjs
- store_artifacts:
Expand Down Expand Up @@ -63,7 +64,7 @@ jobs:
- ffmpeg
build-linux-arm-gnu:
machine:
image: ubuntu-2004:202101-01
image: ubuntu-2004:2024.05.1
resource_class: arm.medium
steps:
- checkout
Expand All @@ -87,7 +88,7 @@ jobs:
- ffmpeg
build-linux-arm-musl:
machine:
image: ubuntu-2004:202101-01
image: ubuntu-2004:2024.05.1
resource_class: arm.medium
steps:
- checkout
Expand Down Expand Up @@ -121,7 +122,7 @@ jobs:
keys:
- ffmpeg_source-windows
- run: sudo apt-get update
- run: sudo apt-get install -y yasm nasm mingw-w64 mingw-w64-tools libz-mingw-w64-dev cargo clang build-essential zlib1g zlib1g-dev meson ninja-build autoconf automake libtool
- run: sudo apt-get install -y yasm nasm mingw-w64 mingw-w64-tools libz-mingw-w64-dev clang build-essential zlib1g zlib1g-dev meson ninja-build autoconf automake libtool
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- run: source "$HOME/.cargo/env" && rustup target add x86_64-pc-windows-gnu
- run: node clean.mjs
Expand All @@ -143,15 +144,15 @@ jobs:

build-macos:
macos:
xcode: 12.5.1
xcode: 13.4.1
steps:
- checkout
- node/install:
node-version: "18.12"
- restore_cache:
keys:
- ffmpeg_source-macos
- run: brew install yasm nasm pkg-config cmake make meson ninja libtool
- run: brew install yasm nasm pkg-config cmake make meson ninja libtool automake gcc
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- run: node clean.mjs
- run: node compile-ffmpeg.mjs
Expand Down
98 changes: 36 additions & 62 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ name = "split"
path = "main.rs"

[dependencies]
ffmpeg-next = { git = "https://github.com/JonnyBurger/rust-ffmpeg-upstream", rev = "8ac86804d137223c84cf3305f82b5055239a92ba" }
bindgen = { version = "0.59", default-features = false, features = ["runtime"] }
ffmpeg-next = { git = "https://github.com/zmwangx/rust-ffmpeg", rev = "a7b50dd5f909e071affffe238d434d184da30aee" }
bindgen = { version = "0.70", default-features = false, features = ["runtime"] }

[profile.dev]
rpath = true
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ COPY opus.gz app/opus.gz
COPY sample-5s.webm app/sample-5s.webm
COPY sample.mp4 app/sample.mp4
COPY sample-av1.webm app/sample-av1.webm
COPY prores.patch app/prores.patch
COPY aac.patch app/aac.patch

RUN apk add curl
Expand Down
1 change: 0 additions & 1 deletion Dockerfile-aws
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ COPY opus.gz app/opus.gz
COPY sample-5s.webm app/sample-5s.webm
COPY sample.mp4 app/sample.mp4
COPY sample-av1.webm app/sample-av1.webm
COPY prores.patch app/prores.patch
COPY aac.patch app/aac.patch

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
Expand Down
10 changes: 5 additions & 5 deletions aac.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c
index fcee8b65ac..07edcef4f2 100644
index 2723a0312e..8d5c7e68f6 100644
--- a/fftools/ffmpeg_dec.c
+++ b/fftools/ffmpeg_dec.c
@@ -214,7 +214,7 @@ static void audio_ts_process(void *logctx, Decoder *d, AVFrame *frame)
@@ -252,7 +252,7 @@ static void audio_ts_process(DecoderPriv *dp, AVFrame *frame)
// on samplerate change, choose a new internal timebase for timestamp
// generation that can represent timestamps from all the samplerates
// seen so far
- tb = audio_samplerate_update(logctx, d, frame);
- tb = audio_samplerate_update(dp, frame);
+ tb = frame->time_base;
pts_pred = d->last_frame_pts == AV_NOPTS_VALUE ? 0 :
d->last_frame_pts + d->last_frame_duration_est;
pts_pred = dp->last_frame_pts == AV_NOPTS_VALUE ? 0 :
dp->last_frame_pts + dp->last_frame_duration_est;

12 changes: 2 additions & 10 deletions compile-ffmpeg.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ enableX265(isMusl, isWindows);
enableLibMp3Lame(isWindows);
enableOpus(isWindows);

const TAG = "n6.1";
const TAG = "n7.1";

if (fs.existsSync("ffmpeg")) {
execSync("git stash", {
Expand All @@ -147,9 +147,6 @@ if (fs.existsSync("ffmpeg")) {
cwd: "ffmpeg",
stdio: "inherit",
});
execSync("git apply prores.patch --directory ffmpeg", {
stdio: "inherit",
});
execSync("git apply aac.patch --directory ffmpeg", {
stdio: "inherit",
});
Expand All @@ -161,9 +158,6 @@ if (fs.existsSync("ffmpeg")) {
cwd: "ffmpeg",
stdio: "inherit",
});
execSync("git apply prores.patch --directory ffmpeg", {
stdio: "inherit",
});
execSync("git apply aac.patch --directory ffmpeg", {
stdio: "inherit",
});
Expand All @@ -180,9 +174,7 @@ const extraCFlags = [

const extraLdFlags = [
"-L" + PREFIX + "/lib",
process.platform === "darwin" && process.arch === "arm64"
? "-Wl,-ld_classic"
: null,
process.platform === "darwin" && process.arch === "arm64" ? "-Wl" : null,
].filter(Boolean);

execSync("cp -r remotion ffmpeg", { stdio: "inherit" });
Expand Down
16 changes: 0 additions & 16 deletions prores.patch

This file was deleted.

0 comments on commit 407b764

Please sign in to comment.