File tree Expand file tree Collapse file tree 5 files changed +31
-17
lines changed Expand file tree Collapse file tree 5 files changed +31
-17
lines changed Original file line number Diff line number Diff line change 21
21
- run : curl https://sh.rustup.rs -sSf | sh -s -- -y
22
22
- run : rm /opt/homebrew/opt/libx11/lib/libX11.6.dylib
23
23
- run : node clean.mjs
24
- - run : node compile-ffmpeg.mjs
24
+ - run : node compile-ffmpeg.mjs arm
25
25
- run : node generate-bindings.mjs
26
26
- run : node zip.mjs
27
27
- run : node test-ffmpeg.mjs
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ RUN apk add curl
18
18
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
19
19
RUN source "$HOME/.cargo/env"
20
20
RUN apk add yasm nasm curl git make ca-certificates pkgconfig bash cmake make cmake build-base llvm-static llvm-dev clang-static clang-dev perl zlib zlib-dev meson ninja autoconf automake libtool patchelf
21
- RUN cd app && CFLAGS="$CFLAGS -static-libgcc" CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++" LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++" node compile-ffmpeg.mjs musl
21
+ RUN cd app && CFLAGS="$CFLAGS -static-libgcc" CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++" LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++" node compile-ffmpeg.mjs musl arm
22
22
RUN source "$HOME/.cargo/env" && cd app && node generate-bindings.mjs musl
23
23
RUN source "$HOME/.cargo/env" && cd app && node zip.mjs
24
24
RUN source "$HOME/.cargo/env" && cd app && node test-ffmpeg.mjs
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ RUN amazon-linux-extras list
21
21
RUN amazon-linux-extras install epel python3.8 -y
22
22
RUN python3.8 -m pip install meson
23
23
RUN python3.8 -m pip install ninja
24
- RUN yum install yasm nasm unzip curl gcc gcc-c++ tar git make ca-certificates pkgconfig bash cmake make cmake build-base llvm-static llvm-dev clang-static clang-dev perl zlib zlib-devel clang-libs clang ninja autoconf automake libtool patchelf -y
25
- RUN cd app && CFLAGS="$CFLAGS -static-libgcc" CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++" LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++" node compile-ffmpeg.mjs || tail -n 30 ffmpeg/ffbuild/config.log
24
+ RUN yum install yasm nasm unzip curl gcc gcc-c++ tar git make ca-certificates pkgconfig bash make cmake3 build-base llvm-static llvm-dev clang-static clang-dev perl zlib zlib-devel clang-libs clang ninja autoconf automake libtool patchelf -y
25
+ RUN cd app && CFLAGS="$CFLAGS -static-libgcc" CXXFLAGS="$CXXFLAGS -static-libgcc -static-libstdc++" LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++" node compile-ffmpeg.mjs arm || tail -n 30 ffmpeg/ffbuild/config.log
26
26
RUN source "$HOME/.cargo/env" && cd app && node generate-bindings.mjs
27
27
RUN source "$HOME/.cargo/env" && cd app && node zip.mjs
28
28
RUN source "$HOME/.cargo/env" && cd app && node test-ffmpeg.mjs
Original file line number Diff line number Diff line change @@ -121,15 +121,16 @@ if (!existsSync(PREFIX)) {
121
121
}
122
122
123
123
execSync ( "git config --global advice.detachedHead false" ) ;
124
- const isWindows = process . argv [ 2 ] === "windows" ;
125
- const isMusl = process . argv [ 2 ] === "musl" ;
124
+ const isWindows = process . argv . includes ( "windows" ) ;
125
+ const isMusl = process . argv . includes ( "musl" ) ;
126
+ const isArm = process . argv . includes ( "arm" ) ;
126
127
127
128
await enableFdkAac ( isWindows ) ;
128
129
enableAv1 ( isWindows ) ;
129
130
enableZimg ( isWindows ) ;
130
131
enableVpx ( isWindows ) ;
131
132
enableX264 ( isMusl , isWindows ) ;
132
- enableX265 ( isMusl , isWindows ) ;
133
+ enableX265 ( isMusl , isWindows , isArm ) ;
133
134
enableLibMp3Lame ( isWindows ) ;
134
135
enableOpus ( isWindows ) ;
135
136
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { execSync } from "child_process";
4
4
import { PREFIX } from "./const.mjs" ;
5
5
import { compileFunction } from "vm" ;
6
6
7
- export const enableX265 = ( isMusl , isWindows ) => {
7
+ export const enableX265 = ( isMusl , isWindows , isArm ) => {
8
8
if ( isWindows ) {
9
9
execSync ( "cp x265-windows/lib/libx265.a remotion/lib/libx265.a" ) ;
10
10
execSync (
@@ -22,23 +22,36 @@ export const enableX265 = (isMusl, isWindows) => {
22
22
] . filter ( Boolean ) ;
23
23
24
24
if ( ! fs . existsSync ( "x265" ) ) {
25
- execSync (
26
- "git clone https://bitbucket.org/multicoreware/x265_git.git x265" ,
27
- {
25
+ if ( isArm && isMusl ) {
26
+ execSync ( "git clone https://github.com/videolan/x265 x265" , {
28
27
stdio : "inherit" ,
29
- }
30
- ) ;
28
+ } ) ;
29
+ } else {
30
+ execSync (
31
+ "git clone https://bitbucket.org/multicoreware/x265_git.git x265" ,
32
+ {
33
+ stdio : "inherit" ,
34
+ }
35
+ ) ;
36
+ }
31
37
}
32
38
33
39
execSync ( "git fetch" , {
34
40
cwd : "x265" ,
35
41
stdio : "inherit" ,
36
42
} ) ;
37
43
38
- execSync ( "git checkout 8f11c33acc267ba3f1d2bde60a6aa906e494cbde" , {
39
- cwd : "x265" ,
40
- stdio : "inherit" ,
41
- } ) ;
44
+ if ( isArm && isMusl ) {
45
+ execSync ( "git checkout 8f11c33acc267ba3f1d2bde60a6aa906e494cbde" , {
46
+ cwd : "x265" ,
47
+ stdio : "inherit" ,
48
+ } ) ;
49
+ } else {
50
+ execSync ( "git checkout stable" , {
51
+ cwd : "x265" ,
52
+ stdio : "inherit" ,
53
+ } ) ;
54
+ }
42
55
43
56
const staticallyLinkCLibrary = isMusl || isWindows ;
44
57
You can’t perform that action at this time.
0 commit comments