Skip to content

Build egress images on prod plus only the gst-plugins-rs plugins egress uses - #1445

Merged
pksgit merged 2 commits into
mainfrom
pradeepsharma/cs-2110-remove-unused-gstreamer-modules-from-egress-image
Oct 15, 2026
Merged

pksgit merged 2 commits into
mainfrom
pradeepsharma/cs-2110-remove-unused-gstreamer-modules-from-egress-image

Conversation

@pksgit

@pksgit pksgit commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

The egress and test images were built on prod-rs, which is prod plus the full gst-plugins-rs build (about 50 Rust plugins). Egress uses three Rust elements: rtpav1depay (rsrtp), dav1ddec (dav1d) and isofmp4mux (isobmff, for fmp4 output in #1419).

Both images now build on prod. A build-only stage on prod-rs copies just the plugin files providing the elements listed in build/egress/egress-rs-elements, which land in the final image as one small layer. The build fails if a listed element is missing from prod-rs or doesn't load in the final image. C elements need no entry, since all C plugins are in prod.

1.28.7-1, compressed amd64 arm64
prod 237.3 MB 230.1 MB
prod-rs (old base) 301.9 MB 293.1 MB
gst-plugins-rs layer in prod-rs 64.6 MB 63.1 MB
Copied Rust plugins layer (new) about 2.3 MB about 2.3 MB

So the GStreamer part of the egress image goes from prod-rs to prod + 2.3 MB, about 62 MB less to download.

Adding a Rust element: add it to build/egress/egress-rs-elements. No GStreamer image rebuild is needed: prod-rs still has every Rust plugin to copy from.

Verified (arm64, locally): built both images and ran the integration groups on the test image. file-room, file-track (including AV1), file-media, stream, segments, images and edge passed. multi failed in Web and ParticipantComposite while reading back the HLS manifest, identically on images built on unmodified prod-rs and on prod; it needs cloud storage this local setup doesn't have.

🤖 Generated with Claude Code

prod-rs is prod plus the full gst-plugins-rs build, about 300 plugins in
total. Egress uses three Rust elements: rtpav1depay (rsrtp), dav1ddec (dav1d)
and isofmp4mux (isobmff, for fmp4 output).

The rs build stage now deletes every gst-plugins-rs file except the plugins
that provide an element listed in build/gstreamer/egress-rs-elements. The
build fails if a listed element is missing, both in the build stage and in
the final image. prod-rs keeps prod as its base, so its first three layers
stay the same and C elements need no entry. Bumps .gst-version to 1.28.7-2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

AV-sync stats summary: view in run #38518124449

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@biglittlebigben biglittlebigben left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should leave the gstreamer:prod-rs image alone and remove the files from the egress image only at build time

@biglittlebigben

Copy link
Copy Markdown
Contributor

I think we should leave the gstreamer:prod-rs image alone and remove the files from the egress image only at build time

To actually prevent the extra data from being downloaded and then deleted in the next layer, we should start the egress build from the gstreamer:prod image and manually copy the plugins we need from the -rs image.

…ss uses

The egress and test images were built on prod-rs, which is prod plus the full
gst-plugins-rs build. Egress uses three Rust elements: rtpav1depay (rsrtp),
dav1ddec (dav1d) and isofmp4mux (isobmff, for fmp4 output).

Both images now build on prod. A build-only stage on prod-rs copies just the
plugin files providing the elements listed in build/egress/egress-rs-elements,
which land in the final image as one small layer. The build fails if a listed
element is missing from prod-rs or doesn't load in the final image. C elements
need no entry, since all C plugins are in prod. This replaces trimming
prod-rs itself, so build/gstreamer and .gst-version match main again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pksgit pksgit changed the title Ship only the gst-plugins-rs plugins egress uses in the prod-rs image Build egress images on prod plus only the gst-plugins-rs plugins egress uses Oct 14, 2026
@pksgit

pksgit commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

@biglittlebigben , let me know if you have any more comments. Thanks

@pksgit
pksgit merged commit 70d7c5b into main Oct 15, 2026
18 checks passed
@pksgit
pksgit deleted the pradeepsharma/cs-2110-remove-unused-gstreamer-modules-from-egress-image branch October 15, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants