From 2ed7730db4692e221422dd574de27bbe463327c9 Mon Sep 17 00:00:00 2001 From: Adrian Hilber Date: Wed, 4 Nov 2026 20:44:55 +0100 Subject: [PATCH 1/3] Image variant with H.264 and H.265 (proprietary codecs) A second image, -codecs, uses a CEF build of the same version with H.264 and H.265 software decoding (video, MSE, WebRTC receive). The Dockerfile takes CEF_URL; docker/cef-codecs holds the Chromium patches and the build's URL and SHA-1; a tag codecs- builds and pushes the variant. Licensing is the user's responsibility (docs/proprietary-codecs.md). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017ybuzgBaGxuB5UiaE8dRa4 --- .github/workflows/container-codecs.yaml | 76 +++++ CHANGELOG.md | 6 + README.md | 4 + docker/Dockerfile | 4 +- docker/cef-codecs/cef.env | 4 + docker/cef-codecs/chromium-media-hevc.patch | 121 ++++++++ docker/cef-codecs/ffmpeg-hevc.patch | 286 +++++++++++++++++++ docker/cef-codecs/webrtc-h265-software.patch | 151 ++++++++++ docs/proprietary-codecs.md | 60 ++++ tests/codecs/README.md | 21 ++ tests/codecs/codecs.html | 71 +++++ 11 files changed, 803 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/container-codecs.yaml create mode 100644 docker/cef-codecs/cef.env create mode 100644 docker/cef-codecs/chromium-media-hevc.patch create mode 100644 docker/cef-codecs/ffmpeg-hevc.patch create mode 100644 docker/cef-codecs/webrtc-h265-software.patch create mode 100644 docs/proprietary-codecs.md create mode 100644 tests/codecs/README.md create mode 100644 tests/codecs/codecs.html diff --git a/.github/workflows/container-codecs.yaml b/.github/workflows/container-codecs.yaml new file mode 100644 index 0000000..00763c3 --- /dev/null +++ b/.github/workflows/container-codecs.yaml @@ -0,0 +1,76 @@ +name: Container (H.264/H.265) + +# The image variant with a CEF build that plays H.264 and H.265 (docs/proprietary-codecs.md). +# A tag codecs- (for example codecs-1.3.3) builds that commit and pushes +# -codecs. Normal releases (v*.*.*) are not touched. +on: + push: + tags: ["codecs-*"] + +concurrency: + group: container-codecs-${{ github.ref }} + cancel-in-progress: false + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-24.04 + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + + - id: cef + name: Read the CEF build and refuse an existing tag + run: | + . docker/cef-codecs/cef.env + echo "url=${CEF_CODECS_URL}" >> "$GITHUB_OUTPUT" + echo "sha1=${CEF_CODECS_SHA1}" >> "$GITHUB_OUTPUT" + tag="${GITHUB_REF_NAME#codecs-}-codecs" + echo "tag=${tag}" >> "$GITHUB_OUTPUT" + if docker manifest inspect "${REGISTRY}/${IMAGE_NAME,,}:${tag}" >/dev/null 2>&1; then + echo "image tag ${tag} exists; tags are never moved" >&2 + exit 1 + fi + + - uses: docker/setup-buildx-action@v3 + + - uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=${{ steps.cef.outputs.tag }} + type=raw,value=codecs + flavor: | + latest=false + labels: | + org.opencontainers.image.title=mxl-browser-source (H.264/H.265) + org.opencontainers.image.description=MXL media function: a web page rendered offscreen with CEF, built with proprietary codecs (H.264, H.265). Codec licensing is the user's responsibility. + org.opencontainers.image.source=https://github.com/LeeO86/mxl-browser-source + org.opencontainers.image.revision=${{ github.sha }} + org.opencontainers.image.licenses=MIT + io.dmf.mxl.revision=218ddaa0a08c12ffe75fc475ae65aa3d9eef16d7 + + - uses: docker/build-push-action@v6 + with: + context: . + file: docker/Dockerfile + push: true + build-args: | + CEF_URL=${{ steps.cef.outputs.url }} + CEF_SHA1=${{ steps.cef.outputs.sha1 }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha,scope=codecs + cache-to: type=gha,mode=max,scope=codecs diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d7473..7ba8f77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Image variant 1.3.3-codecs + +- **H.264 and H.265 (proprietary codecs).** A second image, `-codecs`, uses a CEF build of the same version with H.264 and H.265 decoding in software (`