diff --git a/Dockerfile b/Dockerfile index 51275c4..2d746ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,19 +20,7 @@ ENV FFMPEG_MT=$FFMPEG_MT RUN apt-get update && \ apt-get install -y pkg-config autoconf automake libtool ragel -# Build x264 -FROM emsdk-base AS x264-builder -ENV X264_BRANCH=4-cores -ADD https://github.com/ffmpegwasm/x264.git#$X264_BRANCH /src -COPY build/x264.sh /src/build.sh -RUN bash -x /src/build.sh -# Build x265 -FROM emsdk-base AS x265-builder -ENV X265_BRANCH=3.4 -ADD https://github.com/ffmpegwasm/x265.git#$X265_BRANCH /src -COPY build/x265.sh /src/build.sh -RUN bash -x /src/build.sh # Build libvpx FROM emsdk-base AS libvpx-builder @@ -136,8 +124,6 @@ RUN bash -x /src/build.sh FROM emsdk-base AS ffmpeg-base RUN embuilder build sdl2 sdl2-mt ADD https://github.com/FFmpeg/FFmpeg.git#$FFMPEG_VERSION /src -COPY --from=x264-builder $INSTALL_DIR $INSTALL_DIR -COPY --from=x265-builder $INSTALL_DIR $INSTALL_DIR COPY --from=libvpx-builder $INSTALL_DIR $INSTALL_DIR COPY --from=lame-builder $INSTALL_DIR $INSTALL_DIR COPY --from=opus-builder $INSTALL_DIR $INSTALL_DIR @@ -151,9 +137,6 @@ COPY --from=zimg-builder $INSTALL_DIR $INSTALL_DIR FROM ffmpeg-base AS ffmpeg-builder COPY build/ffmpeg.sh /src/build.sh RUN bash -x /src/build.sh \ - --enable-gpl \ - --enable-libx264 \ - --enable-libx265 \ --enable-libvpx \ --enable-libmp3lame \ --enable-libtheora \ @@ -173,8 +156,6 @@ COPY src/fftools /src/src/fftools COPY build/ffmpeg-wasm.sh build.sh # libraries to link ENV FFMPEG_LIBS \ - -lx264 \ - -lx265 \ -lvpx \ -lmp3lame \ -logg \ diff --git a/build/aom.sh b/build/aom.sh index 256907e..c052f87 100755 --- a/build/aom.sh +++ b/build/aom.sh @@ -24,4 +24,4 @@ emmake cmake .. \ -DAOM_EXTRA_C_FLAGS="$CFLAGS" \ -DAOM_EXTRA_CXX_FLAGS="$CFLAGS" \ ${CM_FLAGS[@]} -emmake make install -j +emmake make install -j2 diff --git a/build/ffmpeg-wasm.sh b/build/ffmpeg-wasm.sh index 0fe38f1..66fca07 100755 --- a/build/ffmpeg-wasm.sh +++ b/build/ffmpeg-wasm.sh @@ -24,8 +24,7 @@ CONF_FLAGS=( -lavdevice -lavfilter -lavformat - -lavutil - -lpostproc + -lavutil -lswresample -lswscale -Wno-deprecated-declarations diff --git a/build/ffmpeg.sh b/build/ffmpeg.sh index da89c45..e2ee087 100755 --- a/build/ffmpeg.sh +++ b/build/ffmpeg.sh @@ -30,4 +30,4 @@ CONF_FLAGS=( ) emconfigure ./configure "${CONF_FLAGS[@]}" $@ -emmake make -j +emmake make -j2 diff --git a/build/freetype2.sh b/build/freetype2.sh index 4600b70..bcf974d 100755 --- a/build/freetype2.sh +++ b/build/freetype2.sh @@ -12,4 +12,4 @@ emconfigure ./autogen.sh emconfigure ./configure "${CONF_FLAGS[@]}" # build apinames manually to prevent it built by emcc gcc -o objs/apinames src/tools/apinames.c -emmake make install -j +emmake make install -j2 diff --git a/build/fribidi.sh b/build/fribidi.sh index 27ed999..bfdebd7 100755 --- a/build/fribidi.sh +++ b/build/fribidi.sh @@ -12,5 +12,5 @@ CONF_FLAGS=( ) emconfigure ./autogen.sh "${CONF_FLAGS[@]}" # A hacky to fix "Too many symbolic links" error -emmake make install -j || true +emmake make install -j2 || true mkdir -p $INSTALL_DIR/lib/pkgconfig && cp fribidi.pc $INSTALL_DIR/lib/pkgconfig/ diff --git a/build/harfbuzz.sh b/build/harfbuzz.sh index 459cb0d..39a2432 100755 --- a/build/harfbuzz.sh +++ b/build/harfbuzz.sh @@ -19,4 +19,4 @@ CONF_FLAGS=( ) emconfigure ./autogen.sh "${CONF_FLAGS[@]}" -emmake make install -j +emmake make install -j2 diff --git a/build/lame.sh b/build/lame.sh index 59e6758..74f8de6 100755 --- a/build/lame.sh +++ b/build/lame.sh @@ -12,4 +12,4 @@ CONF_FLAGS=( --disable-gtktest ) CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}" -emmake make install -j +emmake make install -j2 diff --git a/build/libass.sh b/build/libass.sh index ffe91e2..073261b 100755 --- a/build/libass.sh +++ b/build/libass.sh @@ -13,4 +13,4 @@ CONF_FLAGS=( ) ./autogen.sh && emconfigure ./configure "${CONF_FLAGS[@]}" -emmake make install -j +emmake make install -j2 diff --git a/build/libvpx.sh b/build/libvpx.sh index 727ba8b..b80d1a6 100755 --- a/build/libvpx.sh +++ b/build/libvpx.sh @@ -17,6 +17,6 @@ CONF_FLAGS=( ) emconfigure ./configure "${CONF_FLAGS[@]}" -emmake make install -j +emmake make install -j2 # Fix ffmpeg configure error: "libvpx enabled but no supported decoders found" emranlib $INSTALL_DIR/lib/libvpx.a diff --git a/build/ogg.sh b/build/ogg.sh index 178601d..1ebad49 100755 --- a/build/ogg.sh +++ b/build/ogg.sh @@ -12,4 +12,4 @@ CONF_FLAGS=( emconfigure ./autogen.sh emconfigure ./configure "${CONF_FLAGS[@]}" -emmake make install -j +emmake make install -j2 diff --git a/build/opus.sh b/build/opus.sh index 0cd9faa..811ed10 100755 --- a/build/opus.sh +++ b/build/opus.sh @@ -16,4 +16,4 @@ CONF_FLAGS=( emconfigure ./autogen.sh CFLAGS=$CFLAGS emconfigure ./configure "${CONF_FLAGS[@]}" -emmake make install -j +emmake make install -j2 diff --git a/build/theora.sh b/build/theora.sh index 94474fb..f6953cf 100755 --- a/build/theora.sh +++ b/build/theora.sh @@ -17,4 +17,4 @@ CONF_FLAGS=( ) emconfigure ./autogen.sh "${CONF_FLAGS[@]}" -emmake make install -j +emmake make install -j2 diff --git a/build/vorbis.sh b/build/vorbis.sh index 5c90655..a196ee8 100755 --- a/build/vorbis.sh +++ b/build/vorbis.sh @@ -17,4 +17,4 @@ CONF_FLAGS=( ) emconfigure ./autogen.sh "${CONF_FLAGS[@]}" -emmake make install -j +emmake make install -j2 diff --git a/build/wavpack.sh b/build/wavpack.sh index eebfcf1..190fe05 100755 --- a/build/wavpack.sh +++ b/build/wavpack.sh @@ -16,4 +16,4 @@ CONF_FLAGS=( --disable-maintainer-mode ) CFLAGS=$CFLAGS emconfigure ./autogen.sh "${CONF_FLAGS[@]}" -emmake make install -j +emmake make install -j2 diff --git a/build/x264.sh b/build/x264.sh index 5002d20..bf51955 100755 --- a/build/x264.sh +++ b/build/x264.sh @@ -13,4 +13,4 @@ CONF_FLAGS=( ) emconfigure ./configure "${CONF_FLAGS[@]}" -emmake make install-lib-static -j +emmake make install-lib-static -j2 diff --git a/build/x265.sh b/build/x265.sh index d264b2f..6951c84 100755 --- a/build/x265.sh +++ b/build/x265.sh @@ -39,17 +39,17 @@ mkdir -p main 10bit 12bit cd 12bit emmake cmake ../.. -DCMAKE_CXX_FLAGS="$CXXFLAGS" ${FLAGS_12BIT[@]} -emmake make -j +emmake make -j2 cd ../10bit emmake cmake ../.. -DCMAKE_CXX_FLAGS="$CXXFLAGS" ${FLAGS_10BIT[@]} -emmake make -j +emmake make -j2 cd ../main ln -sf ../10bit/libx265.a libx265_main10.a ln -sf ../12bit/libx265.a libx265_main12.a emmake cmake ../.. -DCMAKE_CXX_FLAGS="$CXXFLAGS" ${FLAGS_MAIN[@]} -emmake make -j +emmake make -j2 mv libx265.a libx265_main.a # Merge static libraries @@ -61,4 +61,4 @@ ADDLIB libx265_main12.a SAVE END EOF -emmake make install -j +emmake make install -j2 diff --git a/build/zimg.sh b/build/zimg.sh index 3ba768e..03dd128 100644 --- a/build/zimg.sh +++ b/build/zimg.sh @@ -14,4 +14,4 @@ CONF_FLAGS=( emconfigure ./autogen.sh emconfigure ./configure "${CONF_FLAGS[@]}" -emmake make install -j \ No newline at end of file +emmake make install -j2 \ No newline at end of file