This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +27
-10
lines changed Expand file tree Collapse file tree 5 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 1
1
[submodule "third_party/x264 "]
2
2
path = third_party/x264
3
3
url = https://github.com/ffmpegjs/x264
4
+ [submodule "third_party/zlib "]
5
+ path = third_party/zlib
6
+ url = https://github.com/madler/zlib.git
Original file line number Diff line number Diff line change 3
3
set -e -o pipefail
4
4
5
5
NPROC=$( grep -c ^processor /proc/cpuinfo)
6
- BUILD_DIR=$PWD /build
6
+ ROOT_DIR=$PWD
7
+ BUILD_DIR=$ROOT_DIR /build
8
+
9
+ build_zlib () {
10
+ cd third_party/zlib
11
+ rm -rf build zconf.h
12
+ mkdir build
13
+ cd build
14
+ emmake cmake .. \
15
+ -DCMAKE_INSTALL_PREFIX=${BUILD_DIR}
16
+ emmake make install -j${NPROC}
17
+ cd ${ROOT_DIR}
18
+ }
7
19
8
20
build_x264 () {
9
21
cd third_party/x264
@@ -12,7 +24,7 @@ build_x264() {
12
24
--disable-thread \
13
25
--prefix=$BUILD_DIR
14
26
emmake make install-lib-static -j${NPROC}
15
- cd -
27
+ cd ${ROOT_DIR}
16
28
}
17
29
18
30
configure_ffmpeg () {
@@ -49,7 +61,7 @@ build_ffmpegjs() {
49
61
-Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Llibpostproc -L${BUILD_DIR} /lib \
50
62
-Qunused-arguments -Oz \
51
63
-o dist/ffmpeg-core.js fftools/ffmpeg_opt.c fftools/ffmpeg_filter.c fftools/ffmpeg_hw.c fftools/cmdutils.c fftools/ffmpeg.c \
52
- -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -lpostproc -lm -lx264 \
64
+ -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -lpostproc -lm -lx264 -lz \
53
65
--closure 1 \
54
66
--pre-js javascript/prepend.js \
55
67
-s USE_SDL=2 \
@@ -62,6 +74,7 @@ build_ffmpegjs() {
62
74
}
63
75
64
76
main () {
77
+ build_zlib
65
78
build_x264
66
79
configure_ffmpeg
67
80
make_ffmpeg
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ check_command() {
14
14
}
15
15
16
16
build () {
17
- docker run \
17
+ docker run -it \
18
18
-v ${PWD} :/src \
19
19
trzeci/emscripten:${EMSCRIPTEN_VERSION} \
20
20
sh -c " bash ./${TARGET} -js.sh"
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments