Archived
server: drop WebM output; /v1/videos always writes MP4
The reference workflow moved to MP4 as its default and it plays everywhere, so the
webm/webm-av1 containers, the `format` field and the container-aware writer are
maintenance without a user. This reverts them to the pre-webm shape: core/mm/mp4.{h,cpp}
and the Dockerfile/docs are byte-identical to upstream again (the writer's H.264
runtime-discovery and faststart were always upstream's), the ffmpeg build loses
libvpx/libaom/libopus and the webm muxer, and the runtime image loses libvpx9/libaom3/
libopus0. Input-side webm is untouched: media.cpp still demuxes webm/matroska
references, audio endpoints still accept webm uploads, and the decoder set keeps
VP8/VP9/AV1/Opus.
A `format` in a request is now refused as an unknown field.
videos_test drops the WebM case (and the format echo/caps checks), keeps the refusal;
engine_e2e, video_gen and videos suites pass, mm_test unchanged (pre-existing webp gap).
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
a1a75da7e9
commit
6131e59693
7 files changed
+125
-381
No files matched your search
+11
-16
@@ -11,9 +11,8 @@
|
||||
#
|
||||
# Stages:
|
||||
# ffmpeg FFmpeg with only the demuxers core/mm/media.cpp admits, the decoders their streams
|
||||
# need (pictures, video, audio with swresample), the three encoders the images API writes
|
||||
# (png, mjpeg, libwebp) and those the videos API writes (core/mm/video_out.cpp): H.264 +
|
||||
# AAC for mp4, VP9 + AV1 + Opus for WebM; all BSD/Apache, no GPL; docs/DOCKER.md
|
||||
# need (pictures, video, audio with swresample) and the three encoders the images API
|
||||
# writes (png, mjpeg, libwebp); the distribution's build pulls ~200 unused packages
|
||||
# llvm ROCm's libLLVM rebuilt from ROCm's llvm-project at the commit the image's clang
|
||||
# reports, with docker/llvm-vopd-pairing.patch, which makes LLVM 24's device code
|
||||
# repeatable across builds (cmake/RadAddPlugin.cmake, rad_hip_repeatable)
|
||||
@@ -52,18 +51,17 @@ ARG JOBS=
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential nasm pkg-config ca-certificates curl xz-utils zlib1g-dev libdav1d-dev \
|
||||
libwebp-dev libopenh264-dev libvpx-dev libaom-dev libopus-dev \
|
||||
libwebp-dev libopenh264-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /tmp
|
||||
# Demuxers: media.cpp's kFormats whitelist. Decoders: what those containers carry -- still
|
||||
# images, H.264 and HEVC (MP4, MOV, HEIF), VP8 and VP9 (WebM, WebP), AV1 through dav1d (WebM, MP4,
|
||||
# AVIF), MPEG-1/2/4, Theora and the FLV/H.263 family. JPEG XL is recognised and refused by name
|
||||
# (its only decoder is libjxl's). Encoders: the image output formats of media.cpp encode_image
|
||||
# (png, jpeg as mjpeg, webp through libwebp), and a generated video (core/mm/video_out.cpp): H.264
|
||||
# through libopenh264 and FFmpeg's own AAC in the mp4 muxer, and for WebM VP9 through libvpx and
|
||||
# AV1 through libaom with Opus through libopus in the webm muxer -- libvpx, libaom and libopus are
|
||||
# BSD, so, like libopenh264, the build stays LGPL. No protocols: media.cpp and video_out.cpp read
|
||||
# and write memory through their own I/O contexts.
|
||||
# (png, jpeg as mjpeg, webp through libwebp), and a generated video's MP4 (core/mm/mp4.cpp): H.264
|
||||
# through libopenh264 (BSD-licensed, so the build stays LGPL) and FFmpeg's own AAC, in the mp4
|
||||
# muxer. No protocols: media.cpp and mp4.cpp read and write memory through their own I/O
|
||||
# contexts.
|
||||
RUN echo 1000 > /proc/self/oom_score_adj 2>/dev/null || true; \
|
||||
curl -fsSL "https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz" -o ffmpeg.tar.xz \
|
||||
&& echo "${FFMPEG_SHA256} ffmpeg.tar.xz" | sha256sum -c - \
|
||||
@@ -71,11 +69,10 @@ RUN echo 1000 > /proc/self/oom_score_adj 2>/dev/null || true; \
|
||||
&& ./configure --prefix=/opt/ffmpeg --enable-shared --disable-static --disable-debug \
|
||||
--disable-programs --disable-doc --disable-network --disable-autodetect --disable-everything \
|
||||
--disable-avdevice --disable-avfilter --enable-swresample \
|
||||
--enable-zlib --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libaom --enable-libopus \
|
||||
--enable-zlib --enable-libdav1d --enable-libwebp \
|
||||
--enable-demuxer=mov,matroska,avi,mpegts,flv,ogg,gif,apng,image2pipe,image_png_pipe,image_jpeg_pipe,image_jpegls_pipe,image_jpegxl_pipe,image_webp_pipe,image_bmp_pipe,image_tiff_pipe,image_qoi_pipe,image_pgm_pipe,image_ppm_pipe,image_pbm_pipe,image_pam_pipe,image_gif_pipe,wav,w64,mp3,flac,aac,aiff \
|
||||
--enable-decoder=h264,hevc,vp8,vp9,libdav1d,mpeg4,mpeg1video,mpeg2video,mjpeg,jpegls,png,apng,gif,webp,bmp,tiff,qoi,pgm,ppm,pbm,pam,pgmyuv,theora,vp3,flv,h263,pcm_u8,pcm_s16le,pcm_s16be,pcm_s24le,pcm_s24be,pcm_s32le,pcm_s32be,pcm_f32le,pcm_f32be,pcm_f64le,pcm_alaw,pcm_mulaw,mp3float,mp2float,flac,vorbis,opus,aac \
|
||||
--enable-encoder=png,mjpeg,libwebp,libopenh264,aac,libvpx-vp9,libaom-av1,libopus \
|
||||
--enable-muxer=mp4,webm,matroska --enable-libopenh264 \
|
||||
--enable-encoder=png,mjpeg,libwebp,libopenh264,aac --enable-muxer=mp4 --enable-libopenh264 \
|
||||
--enable-parser=h264,hevc,vp8,vp9,av1,mpeg4video,mpegvideo,mjpeg,png,gif,bmp,webp,vp3,qoi,pnm,h263,jpegxl,mpegaudio,flac,aac,vorbis,opus \
|
||||
&& make -j"${JOBS:-$(nproc)}" \
|
||||
&& make install \
|
||||
@@ -142,12 +139,10 @@ ARG JOBS=
|
||||
# g++-14 rather than the default 13: hipcc compiles device-side translation units against its
|
||||
# libstdc++, which is also the runtime image's. gawk: tools/ops_doc_check.sh uses gensub, which
|
||||
# mawk lacks. libdav1d7, libwebp7 and libopenh264-7 are the runtime libraries of the ffmpeg stage's
|
||||
# AV1 decoder, WebP encoder and H.264 encoder; libvpx9, libaom3 and libopus0 of its VP9, AV1 and
|
||||
# Opus encoders (core/mm/video_out.cpp's WebM output); busybox-static goes into the runtime image.
|
||||
# AV1 decoder, WebP encoder and H.264 encoder; busybox-static goes into the runtime image.
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
cmake ninja-build pkg-config g++-14 gawk libdav1d7 libwebp7 libopenh264-7 \
|
||||
libvpx9 libaom3 libopus0 busybox-static \
|
||||
cmake ninja-build pkg-config g++-14 gawk libdav1d7 libwebp7 libopenh264-7 busybox-static \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=ffmpeg /opt/ffmpeg /opt/ffmpeg
|
||||
|
||||
Reference in new issue
Block a user