Cannot build ffmpeg wasm with libaom using docker
Closed this issue · 1 comments
rathesh77 commented
I would like to transcode av1 encoded video into mp4 and so I have been trying to build ffmpeg wasm with docker by adding these lines inside the dockerfile. The point here is to include libaom.
# Build libaom
FROM emsdk-base AS libaom-builder
ENV LIBAOM_BRANCH=master
ADD https://github.com/ffmpegwasm/aom.git#$LIBAOM_BRANCH /src
COPY build/aom.sh /src/build.sh
RUN bash -x /src/build.sh
COPY --from=libaom-builder $INSTALL_DIR $INSTALL_DIR
# Build ffmpeg
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 \
--enable-libvorbis \
--enable-libopus \
--enable-zlib \
--enable-libwebp \
--enable-libfreetype \
--enable-libfribidi \
--enable-libass \
--enable-libzimg \
--enable-libaom \
--enable-decoder=av1
but then the following errors show up when i run docker buildx build -o . .
43.87 -- Configuring incomplete, errors occurred!
43.87 See also "/src/cmbuild/CMakeFiles/CMakeOutput.log".
43.87 See also "/src/cmbuild/CMakeFiles/CMakeError.log".
43.87 emmake: error: 'cmake .. "-DAOM_EXTRA_C_FLAGS=-I/opt/include " "-DAOM_EXTRA_CXX_FLAGS=-I/opt/include " -DCMAKE_INSTALL_PREFIX=/opt -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DBUILD_SHARED_LIBS=0 -DAOM_TARGET_CPU=generic -DENABLE_DOCS=0 -DENABLE_TESTS=0 -DENABLE_EXAMPLES=0 -DENABLE_TOOLS=0 -DCONFIG_RUNTIME_CPU_DETECT=0 -DCONFIG_WEBM_IO=0' failed (returned 1)
------
5 warnings found (use docker --debug to expand):
- UndefinedVar: Usage of undefined variable '$LDFLAGS' (did you mean $CFLAGS?) (line 14)
- UndefinedVar: Usage of undefined variable '$EM_PKG_CONFIG_PATH' (line 15)
- UndefinedVar: Usage of undefined variable '$PKG_CONFIG_PATH' (line 17)
- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 185)
- UndefinedVar: Usage of undefined variable '$CFLAGS' (line 12)
Dockerfile:28
--------------------
26 | ADD https://github.com/ffmpegwasm/aom.git#$LIBAOM_BRANCH /src
27 | COPY build/aom.sh /src/build.sh
28 | >>> RUN bash -x /src/build.sh
29 |
30 | # Build x264
--------------------
Maybe i am using the wrong git repo for aom ?
hiven commented
How did you fix this?