Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build ffmpeg wasm with libaom using docker #833

Open
rathesh77 opened this issue Jan 31, 2025 · 0 comments
Open

Cannot build ffmpeg wasm with libaom using docker #833

rathesh77 opened this issue Jan 31, 2025 · 0 comments

Comments

@rathesh77
Copy link

rathesh77 commented Jan 31, 2025

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 ?

@rathesh77 rathesh77 changed the title Cannot build ffmpeg wasm with libaom using the Dockerfile Cannot build ffmpeg wasm with libaom using Dockerfile Jan 31, 2025
@rathesh77 rathesh77 changed the title Cannot build ffmpeg wasm with libaom using Dockerfile Cannot build ffmpeg wasm with libaom using docker Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant