This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +37
-1
lines changed Expand file tree Collapse file tree 4 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ $SCRIPT_ROOT/build-theora.sh
32
32
$SCRIPT_ROOT /build-opus.sh
33
33
# build freetype2
34
34
$SCRIPT_ROOT /build-freetype2.sh
35
+ # build libwebp
36
+ $SCRIPT_ROOT /build-libwebp.sh
35
37
# build aom (disabled as it is extremely slow)
36
38
# $SCRIPT_ROOT/build-aom.sh
37
39
# configure FFmpeg with Emscripten
Original file line number Diff line number Diff line change 9
9
-I. -I./fftools -I$BUILD_DIR /include
10
10
-Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -L$BUILD_DIR /lib
11
11
-Wno-deprecated-declarations -Wno-pointer-sign -Wno-implicit-int-float-conversion -Wno-switch -Wno-parentheses -Qunused-arguments
12
- -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -lpostproc -lm -lx264 -lx265 -lvpx -lwavpack -lmp3lame -lfdk-aac -lvorbis -lvorbisenc -lvorbisfile -logg -ltheora -ltheoraenc -ltheoradec -lz -lfreetype -lopus -pthread
12
+ -lavdevice -lavfilter -lavformat -lavcodec -lswresample -lswscale -lavutil -lpostproc -lm -lx264 -lx265 -lvpx -lwavpack -lmp3lame -lfdk-aac -lvorbis -lvorbisenc -lvorbisfile -logg -ltheora -ltheoraenc -ltheoradec -lz -lfreetype -lopus -lwebp - pthread
13
13
fftools/ffmpeg_opt.c fftools/ffmpeg_filter.c fftools/ffmpeg_hw.c fftools/cmdutils.c fftools/ffmpeg.c
14
14
-o wasm/dist/ffmpeg-core.js
15
15
-s USE_SDL=2 # use SDL2
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -euo pipefail
4
+ source $( dirname $0 ) /var.sh
5
+
6
+ LIB_PATH=third_party/libwebp
7
+ CXXFLAGS=" -s USE_PTHREADS=1 $OPTIM_FLAGS "
8
+ CM_FLAGS=(
9
+ -DCMAKE_INSTALL_PREFIX=$BUILD_DIR
10
+ -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN_FILE
11
+ -DBUILD_SHARED_LIBS=OFF
12
+ -DZLIB_LIBRARY=$BUILD_DIR /lib
13
+ -DZLIB_INCLUDE_DIR=$BUILD_DIR /include
14
+ -DWEBP_ENABLE_SIMD=ON
15
+ -DWEBP_BUILD_ANIM_UTILS=OFF
16
+ -DWEBP_BUILD_CWEBP=OFF
17
+ -DWEBP_BUILD_DWEBP=OFF
18
+ -DWEBP_BUILD_GIF2WEBP=OFF
19
+ -DWEBP_BUILD_IMG2WEBP=OFF
20
+ -DWEBP_BUILD_VWEBP=OFF
21
+ -DWEBP_BUILD_WEBPINFO=OFF
22
+ -DWEBP_BUILD_WEBPMUX=OFF
23
+ -DWEBP_BUILD_EXTRAS=OFF
24
+ )
25
+ echo " CM_FLAGS=${CM_FLAGS[@]} "
26
+
27
+ cd $LIB_PATH
28
+ mkdir -p build
29
+ cd build
30
+ emmake cmake .. -DCMAKE_C_FLAGS=" $CXXFLAGS " ${CM_FLAGS[@]}
31
+ emmake make clean
32
+ emmake make install
33
+ cd $ROOT_DIR
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ FLAGS=(
18
18
--enable-libvorbis # enable libvorbis
19
19
--enable-libfreetype # enable freetype
20
20
--enable-libopus # enable opus
21
+ --enable-libwebp # enable libwebp
21
22
# --enable-libaom # enable libaom
22
23
)
23
24
echo " FFMPEG_CONFIG_FLAGS=${FLAGS[@]} "
You can’t perform that action at this time.
0 commit comments