Skip to content

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

Meta Engineering 8 min read Case study mediumAdept

Shipping Media Over QUIC at Meta Scale for Instagram Live Ingest

Instagram Live on iOS and Android now ingests live video over Media over QUIC (MoQ), an emerging IETF standard, replacing Meta's in-house QUIC-based RUSH protocol and reaching parity on streaming-quality and reliability metrics. The rollout used the open-source moxygen library on clients behind a single config switch. Edge endpoints translate MoQ frames back to RUSH so the backend didn't have to change, and server-side stream URL routing allowed experiment-based ramps that could be resized in minutes. Operational hurdles included a moving draft spec, UDP/443 blocking (handled by racing TCP and QUIC handshakes at session start), and encrypted framing, which required MoQ-aware edge tracing. Next steps are QMUX TCP fallback, subgroups for separate audio, video and metadata streams, MoQ playback with partial reliability, and real-time AI use cases.

Related posts

  • 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.

  • Enhancing HDR on Instagram for iOS With Dolby Vision

    Meta Engineering mediumAdept

    Instagram for iOS now preserves iPhone HDR metadata (ambient viewing environment and Dolby Vision) end to end, after FFmpeg-based server transcoding had been discarding it and degrading the image at low screen brightness. Meta upstreamed amve support to FFmpeg, implemented Dolby Vision Profile 8.4 to AV1 Profile 10.4 transcoding with fixes in libaom, SVT-AV1, dav1d and Shaka packager, and on the client extracts Dolby Vision metadata from its own AV1 decode path to feed AVSampleBufferDisplayLayer. A first A/B test showed lower watch time because the metadata added about 100 kbps and slowed loading. Switching to a compressed metadata format cut that to about 25 kbps, which required an FFmpeg bitstream filter and roughly 2000 lines of client-side decompression, and a second test showed increased time in app.

  • How we built a realtime system for responsive voice AI in six months

    OpenAI mediumAdept

    GPT-Live replaces turn-detector-based voice AI with a full-duplex voice model that listens and speaks simultaneously, delegating deeper reasoning and tool use to frontier models like GPT-5.5 over an asynchronous RPC path that never blocks media. The system separates a Go-based media fast path (replacing Python asyncio, with new p95 matching old p50) from application logic. It uses warm model-instance handoffs to perform context compaction without KV-cache rebuild pauses, prefills frontier-model sessions at call start, and derives discrete turns from overlapping speech via speculative and authoritative transcript views. Startup is cut to a single UDP packet through WARP, a set of backward-compatible WebRTC changes that reduces handshakes from six round trips to one, plus Instant Connect for pre-negotiated SDP. Shadow testing on production traffic showed that capacity depends on concurrent sessions and CPU-side stream handling, not just GPU throughput.

  • Better video for mobile RTC with AV1 and HD

    Meta Engineering mediumAdept

    Meta improved 1:1 mobile RTC video in Messenger, Instagram and WhatsApp by moving from H.264 to software AV1 for low-bandwidth calls (under 300 Kbps). AV1's palette mode, intra-block copy and reference picture resampling help with screen content and avoid key frames on resolution changes, and custom scalers plus face-based region-of-interest encoding add further gains. The costs are roughly 3x encoder CPU, a 5-6% battery increase and more out-of-memory crashes. Meta handles these with a hybrid encoder that switches to H.264 mid-call based on CPU, battery or encode time, and by disabling AV1 on low-memory devices. A lightweight in-product PSNR estimate showed about 2 dB gain over H.264, and an HD mode (720p, 30 fps, 3.5 Mbps) for high-end networks required better congestion detection, including ISP throttling detection.

  • How OpenAI delivers low-latency voice AI at scale

    OpenAI hardMaster

    OpenAI rearchitected its WebRTC stack for ChatGPT voice and the Realtime API by splitting a stateless UDP relay from a stateful Go/Pion transceiver that owns ICE, DTLS and SRTP state. The design avoids one-public-port-per-session media termination, which fits poorly with Kubernetes and cloud load balancers. Server-generated ICE ufrags encode routing hints, so the relay can steer the first STUN packet to the owning transceiver without an external lookup. Relay flows are kept in memory with Redis as a backup, and Cloudflare geo-steered signaling plus a globally distributed relay fleet shorten the first hop and cut setup latency.

The quest for software engineering knowledge.

Look:
Layout: