Repository navigation
fix(studio-server): proxy MPEG-4 Part 2 and MJPEG video the browser cannot decode - #7310
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Reviewed at a34b58f. Requesting changes. There's one blocker.
Blocker: the Comments workflow fails. In mediaCodecMap.ts, comment lines go from 87 to 88 (19.4% → 19.5%) because of the new // MPEG-4 Part 2 … Chrome answers error code 4. line. Drop it. The PR body and the test names already carry that context.
The rest checks out:
mjpegdoesn't catch cover art or stills.probeCodecFactsonly runs whenkind === "video", the kind comes from the file path, andmetadataFromProbeskipsattached_picstreams. So an mp3 or m4a with embedded art, or a.jpg, won't trigger a transcode.representativeMime: nullmeans Safari, which can play MPEG-4 Part 2, also gets a copy. That's the same trade-offproresalready makes, so it's acceptable.- The
fails without the fix:line namesmediaCodecMap.test.tsand its newmpeg4/mjpegcases, which fail against main's table.
Collaborator
Author
|
Head a3371e9 drops the comment line; the table change and its test are unchanged. |
Contributor
There was a problem hiding this comment.
Re-reviewed at a3371e9. Approving.
- The only change since a34b58f removes the one comment line that the
Commentscheck counted.mediaCodecMap.tsnow adds no comment lines over its base. - My earlier findings still hold.
mjpegdoesn't catch cover art or stills, because the codec is only probed for video-kind files andattached_picstreams are skipped. Thefails without the fix:line is valid.
All workflows, including Comments, were still queued on this head when I reviewed. This approval doesn't stand in for them.
Contributor
SanHsien
added a commit
to SanHsien/hyperframes
that referenced
this pull request
Nov 6, 2026
…view to heygen-com#7250 Adopts heygen-com#7310 (MPEG-4 Part 2 / MJPEG get browser-playable copies), heygen-com#7316 (check_report counts the copies a check waited for) and heygen-com#7317 (render reads a composition src like the preview and refuses paths outside the project). Defers heygen-com#7309 (needs heygen-com#6912); heygen-com#7314 does not apply. PR axis advances to heygen-com#7250 (heygen-com#7243 closed unmerged, heygen-com#7249 open and pinned as monitored; monitored 96->97). Co-authored-by: Miguel Ángel <miguel.sierra@heygen.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changed
BROWSER_HOSTILE_CODECSgainsmpeg4(MPEG-4 Part 2: OpenCV's defaultmp4v,ffmpeg -c:v mpeg4) andmjpeg, both with no representative mime and pre-warm on, asproresis. A project video in either codec now gets a browser-playable copy instead of "no copy" (browser_safe_codec).Why
Chrome refuses both inside an mp4 (
<video>error code 4, readyState 0), but the table lists only hevc, prores, theora, av1 and vp9, so the studio server answers the copy request with 404 and the player stays blank. Reproduced:ffmpeg -f lavfi -i testsrc2=size=640x360:rate=30 -t 1 -c:v mpeg4 m.mp4(and-c:v mjpeg -pix_fmt yuvj420p) in Chrome 156 on macOS: error code 4; the same clip as H.264 plays. H.264 4:4:4 and High 10 also play, so they are not added.What I measured
mediaCodecMap.tsat main (thempeg4andmjpegmime and pre-warm cases), 41 pass with it (bun install, build, vitest on a Linux box).What I did NOT exercise
Size
About 14 changed lines in 2 files: a lone table change with its test; nothing open on this table to carry it.