Repository navigation
Transcode chat videos with their sound, in the jail or the app's sandbox (GRYT-1669) - #47
Merged
Merged
Conversation
…box (GRYT-1669) Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 worker half of Gryt-chat/server#277.
uploads/is a chat video.runChatVideoJobwrites it out again asuploads/{id}.mp4with a poster, or refuses it.transcodeChatVideo): AV1 (SVT, preset 10, CRF 38) and stereo AAC 128k in MP4. Every frame is scaled into 1280px keeping its shape, at most 30 fps (-fpsmax). Only the first audio track is kept, and only if there is one. No metadata, chapters, subtitles or data streams. Ten-minute limit.chatVideoOnDesktopasks the app's sandbox for achatvideojob (client PR alongside), andcheckChatVideoAnswerchecks the answer like every other one.chatvideo-v1where the jail or the app sandbox works.Tested in the built image: withaudio.mp4, H.264, the resizing WebM, HEVC, MOV, a portrait phone video (comes out 720×1280) and an 8K VP9 all converted in under a second, with AAC audio where the source had sound. HLS-as-mp4, random bytes and a truncated MP4 were refused. 61 unit tests pass.
What to look at: the bigger ffmpeg surface (audio decoders and swresample) in the Dockerfile. It runs in the same jail.
Review-required (image-worker).
🤖 Generated with Claude Code