• Stefy Lanza (nextime / spora )'s avatar
    studio: stream big media instead of base64-ing it into a request · fbd20544
    Stefy Lanza (nextime / spora ) authored
    Uploads were read in the browser with FileReader, base64'd, and posted as one
    JSON document holding every source — so a phone video was a ~700 MB string in the
    browser, another copy in the request, and another in the handler, and nginx's 1 MB
    default rejected it long before any of that mattered.
    
    Now the browser POSTs each File as a raw body to /api/upload, which streams it to
    disk a megabyte at a time and hands back a path; extraction takes paths. Nothing
    base64s client-side, and neither end ever holds a whole file. JSON bodies are
    capped at 32 MB (they only carry settings now) and the upload endpoint is
    dispatched before the body is parsed, since it is binary.
    
    Big videos are also frame-sampled LOCALLY before anything is sent: the extractor
    only ever looks at evenly-spaced frames, so shipping 24 of them instead of the
    film is the same result for a fraction of the traffic (--max-upload-mb, default
    64; 0 sends the file). Oversized stills are downscaled to 2048px, and voice
    cloning now sends a 90s mono clip rather than the entire soundtrack.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_0182DhR1eFNPQyGmDrpHbedY
    fbd20544
Name
Last commit
Last update
..
assets Loading commit data...
canary_service.py Loading commit data...
character_studio.py Loading commit data...
crisperwhisper_service.py Loading commit data...
gen_township_fighters.py Loading commit data...
h3_common.py Loading commit data...
h3_service.py Loading commit data...
manual_multimodal_test_client.py Loading commit data...
parler_tts_service.py Loading commit data...
pyannote_service.py Loading commit data...
review_outputs.py Loading commit data...
video_dubber.py Loading commit data...
video_editor.py Loading commit data...
videogen.py Loading commit data...