Repository navigation
fix(media-server): accept older video and audio codecs in imports again - #4201
Merged
Merged
Conversation
The codec allowlist refused MPEG-1/2, Windows Media, early MPEG-4, Flash video, H.263 and Theora, and MP2, WMA, AMR and ADPCM audio. Regular Cap imports of these in Matroska, MP4, MOV and 3GP transcoded before the list existed. Their FFmpeg decoders are mature, so they are allowed again. Cinepak, DV, Indeo and raw video stay refused.
Member
Author
|
@greptileai review |
The image builds name each test file they run, so the new file did not run there. The standalone build is the image the encoders use, so the older formats are now probed and transcoded with that image's FFmpeg on both architectures.
Member
Author
|
hey @greptileai, please re-review the PR |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
richiemcilroy
marked this pull request as ready for review
November 13, 2026 13:07
… devices NVIDIA nodes own their devices as root:root with mode 666, so the entrypoint added group 0 to the server's groups. A device anyone may read and write needs no group, so group 0 is skipped for it. A root-owned device that is not open to everyone still gets the group, as before.
|
Sandchest · Sandchest couldn't finish reviewing Details · earlier results on this pull request no longer apply to the latest commit. |
Member
Author
|
@greptileai review |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
/sandchest review |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The media server's codec allowlist refuses older formats that regular Cap imports used to transcode. This allows them again.
What was refused
The allowlist applies to every FFmpeg and ffprobe the server runs, so it covers regular Cap imports as well as Cap Infra uploads. It accepted H.264, HEVC, VP8, VP9, AV1, ProRes, MPEG-4 Part 2 and Motion JPEG video. Anything else was answered "This video format is not supported", including:
Change
media-input-policy.tsadds these to the accepted video codecs and to the decoder list. Their FFmpeg decoders are mature and long fuzzed. They decode on the CPU: GPU decoding is chosen only for the codecs in the encoder's own list, so no new GPU decoder is added.Cinepak, DV, Indeo and raw video stay refused, and the refusal tests now use Cinepak.
Measured
The same 14 synthetic fixtures were probed with the server's own probe and transcoded with its hardened spawn. Three versions were run: the commit before the allowlist, main, and this branch.
The container rows were refused before the allowlist too: the probe's parser does not read those containers. This change restores what worked before and nothing more.
Tests
legacy-codecs.integration.test.tsmakes one fixture per family with the local FFmpeg, then probes it and transcodes it to H.264 and AAC through the hardened spawn. A family whose encoder the local FFmpeg lacks (AMR, Theora on some builds) is skipped there. On main, all 10 that run fail. On this branch they pass.media-input-policy.test.tsandmedia-probe-hardening.test.ts: the lists include the new names, and Cinepak is refused by both the codec check and FFmpeg's own decoder list.The server no longer holds the root group on GPU nodes
The entrypoint gives the server the group of each GPU device so it can open them. On NVIDIA nodes the devices are owned by root:root with mode 666, so the server was given group 0 as well. A device anyone may read and write needs no group, so group 0 is now skipped for those devices. A root-owned device that is not open to everyone still gets the group, as before, and the entrypoint's existing check that the user can open each device is unchanged.
Checked in a container with the old and new entrypoint and a stand-in device:


Confidence Score: 5/5
The PR appears safe to merge, with no new findings or unresolved earlier findings.Summary
This PR restores older video and audio codecs for imports while keeping the existing container and input limits.
Reviews (5) · Last reviewed commit: "chore(media-server): keep only comments ..." · Reviewed by Greptile