Skip to content

build: ffmpeg 9.1 and Python 3.15, pinned for Dependabot - #5

Merged
rainhead merged 1 commit into
mainfrom
update-ffmpeg-and-base
Nov 26, 2026
Merged

rainhead merged 1 commit into
mainfrom
update-ffmpeg-and-base

Conversation

@rainhead

Copy link
Copy Markdown
Collaborator

Updates ffmpeg from 7.0.2 to 9.1 and the Lambda base image from Python 3.14 to 3.15, and adds a Dependabot config so that both images and the GitHub Actions get version updates from now on. Images rendered after this deploys should be the same size and, to within rounding, the same pixels as the archive.

Why ffmpeg moved

The Dockerfile downloaded a static ffmpeg from johnvansickle.com, which has published nothing since 7.0.2 in August 2024, and it did so with no checksum. The binaries are now copied out of the mwader/static-ffmpeg image. That image and the Lambda base image are each pinned by tag and digest in core/Dockerfile, so a rebuild gets the same bytes and Dependabot can tell when either has a newer version.

A PNG size regression the upgrade brought, fixed here

On ffmpeg 9.1, the production segment in events/spectrogram_job.json rendered to an 851 KB PNG instead of 565 KB. ffmpeg 7 encoded PNG with no prediction filter, whatever its help text said. ffmpeg 9 applies the documented default, Paeth, which makes a noisy image like a spectrogram half as large again. encoder in core/app.py now passes -pred none.

Rendering that segment with the old image and with the new one:

format before after match
png 565,416 B 565,414 B PSNR 99 dB, so nearly every pixel is identical
webp, quality 80 115,412 B 116,928 B SSIM 0.996

The README's table of sizes and encode times has the new figures.

Dependabot

.github/dependabot.yml asks for one pull request a month covering GitHub Actions and the two FROM lines in the Dockerfile. It proposes both a newer tag (Python 3.16, ffmpeg 9.2) and a new digest when the same tag is rebuilt. CI builds the image and renders a clip, so a bump that breaks ffmpeg or the runtime fails its pull request before anything deploys. Dependabot security updates are now turned on in the repository settings, so a fix for a vulnerable action comes as its own pull request without waiting for the month.

Also

  • harden-runner goes to v2.23.0 and configure-aws-credentials to v6.3.1.
  • template.yaml had the SAM starter template's description ("python3.12"); it now says what the stack does. This changes the CloudFormation stack's description on deploy, nothing else.

Testing

The smoke test passes in the new image locally. sam validate --lint was not run locally (the SAM CLI isn't installed on this machine), so CI is the first to run it. CodeRabbit's CLI reviewed the branch and found nothing.

🤖 Generated with Claude Code

johnvansickle.com has published no ffmpeg build since 7.0.2 (August 2024),
so the static binaries now come from the mwader/static-ffmpeg image. Both it
and the Lambda base image are pinned by tag and digest in the Dockerfile,
and Dependabot proposes new versions of them and of the GitHub Actions in
one pull request a month.

ffmpeg 7 encoded PNG with no prediction filter, whatever its help said;
ffmpeg 9 applies the documented default, Paeth, which makes a spectrogram
half as large again. The encoder now asks for no filter, so a production
segment renders to the same size and, to within rounding, the same pixels.

Also bumps harden-runner to v2.23.0 and configure-aws-credentials to
v6.3.1, and replaces the SAM starter template's stack description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rainhead
rainhead merged commit 4254c07 into main Nov 26, 2026
2 checks passed
@rainhead
rainhead deleted the update-ffmpeg-and-base branch November 26, 2026 04:27
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

Successfully merging this pull request may close these issues.

1 participant