Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Wix Engineering 4 min read Case study mediumAdept

Architecting for 6 Billion Daily Requests: Inside Wix's Media Platform

Wix's media platform serves over 6 billion requests a day for 300M+ sites, and five design choices keep it fast and cheap. AVIF encoding in a Go service became viable by passing raw C pointers between C libraries via Go's unsafe package, avoiding Cgo copy overhead. Intermediate "Master" sizes cut resize CPU cost, and URL normalization maps equivalent manipulation requests to one canonical CDN cache key. Golden byte-equality tests fall back to SSIM/PSNR/VMAF perceptual checks after encoder upgrades, and signed tokens authorize which manipulations, such as a blurred preview versus full resolution, can be rendered from a single stored asset.

Assumes: CDN caching basicsimage codecs and resizingGo Cgo interop

Related posts

  • Video Invisible Watermarking at Scale

    Meta Engineering mediumAdept

    Meta runs ML-based invisible video watermarking (VideoSeal-style) as a custom FFmpeg filter for provenance use cases like detecting AI-generated video and identifying first uploaders. GPU deployment suffered from CPU-GPU frame transfer overhead, missing hardware video encoders, contention across parallel requests and model loading costs, so the team moved to CPU-only inference; with tuned encoder, decoder and PyTorch threading plus sampling parameters, single-process latency came within 5% of GPU and scaled across parallel FFmpeg processes more efficiently. A frame-selection method cut an initial ~20% BD-Rate regression, and crowdsourced manual review was needed because VMAF and SSIM missed watermark artifacts.

  • Reducing Instagram’s basic video compute time by 94 percent

    Meta Engineering mediumAdept

    Instagram cut the compute cost of its basic adaptive bit rate (ABR) video encodings by 94 percent by reusing the frames from its progressive encodings and repackaging them into a DASH-capable file structure instead of transcoding from the original upload. Both encoding types used the same H.264 codec with only minor profile and preset differences, so repackaging with MP4Box takes about 0.36s of CPU time versus 86s for a full ffmpeg transcode. The tradeoff is worse compression efficiency for basic ABR. An A/B framework that replicated traffic across equal-capacity test and control pools showed the freed compute raised advanced-encoding watch time coverage by 33 percent, which more than made up for the loss.

  • Intent to Ship: JPEG XL

    Mozilla Hacks easyNovice

    Firefox intends to ship JPEG XL support, built on jxl-rs, a Rust decoder written by Google Research in place of the earlier 100,000-line multithreaded C++ library to reduce attack surface. Chrome also plans to ship, so the format should work across browsers by year end. Firefox's implementation includes progressive rendering, which Safari's lacks, so the image becomes recognisable after only a few kB arrive. Size comparisons at matched SSIMULACRA 2 scores show AVIF smaller at web quality (116 kB vs 134 kB for a photo) while JPEG XL wins at lossless (1.45 MB vs 1.76 MB; 92 kB vs 164 kB for a screenshot), so developers should test on representative images.

  • FFmpeg at Meta: Media Processing at Scale

    Meta Engineering easyNovice

    Meta retired its long-diverged internal FFmpeg fork by working with FFmpeg developers, FFlabs and VideoLAN to upstream the two capabilities it depended on. Threaded multi-lane transcoding, which decodes once and runs all output encoders in parallel, arrived over FFmpeg 6.0 through 8.0. In-loop decoding in FFmpeg 7.0 enables real-time PSNR/SSIM/VMAF quality metrics for livestreams. Infrastructure-specific patches, such as support for Meta's MSVP transcoding ASIC via FFmpeg's standard hardware acceleration APIs, stay internal and are rebased with extensive validation.

  • State of open video generation models in Diffusers

    Hugging Face mediumAdept

    Open video generation models such as HunyuanVideo, CogVideoX, LTX-Video, Mochi-1 and Allegro share a common architecture: T5-style text encoders, a DiT-based denoiser over 3D spatio-temporal tokens, a spatially and temporally compressing VAE, and a scheduler. Diffusers runs them in a few lines of code but they need a lot of memory, about 60 GB for HunyuanVideo at default settings. Benchmarks combining bitsandbytes/FP8 quantization, CPU and group offloading, VAE tiling and layerwise casting bring HunyuanVideo down to about 6.6 GB with little extra latency. Timestep and guidance distillation speed up generation, and the finetrainers repo supports LoRA fine-tuning.

The quest for software engineering knowledge.

Look:
Layout: