---
title: "Reducing Instagram’s basic video compute time by 94 percent"
description: "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."
url: "https://swe.quest/articles/reducing-instagram-s-basic-video-compute-time-by-94-percent-8efd07bfee25d57c"
canonical: "https://engineering.fb.com/2022/11/04/video-engineering/instagram-video-processing-encoding-reduction/"
source: "Meta Engineering"
published: "2022-11-04"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["video-media","cost-optimization","capacity-planning","performance"]
---

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

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2022-11-04, 5 min read, Case study. Original: [https://engineering.fb.com/2022/11/04/video-engineering/instagram-video-processing-encoding-reduction/](https://engineering.fb.com/2022/11/04/video-engineering/instagram-video-processing-encoding-reduction/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Video & media](https://swe.quest/tags/video-media.md) (Domains)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)
- [Capacity planning](https://swe.quest/tags/capacity-planning.md) (Reliability & operations)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- video codecs basics ([easy posts on Video & media](https://swe.quest/tags/video-media.md?difficulty=easy))
- adaptive bitrate streaming ([easy posts on Stream processing](https://swe.quest/tags/stream-processing.md?difficulty=easy))

## Keywords

Instagram, FFmpeg, MP4Box, DASH, H.264, adaptive bit rate streaming

## Related posts

- [How Facebook encodes your videos](https://swe.quest/articles/how-facebook-encodes-your-videos-a25a3c51f5bfb7c5.md): Meta Engineering · 2021-04-05 · Medium · 12 min read · Video & media, Machine learning, Scheduling, Cost optimization
  Facebook prioritizes advanced video encodings (VP9, slower H264 recipes) by a Benefit/Cost score instead of hard-coded rules.
- [How Meta brought AV1 to Reels](https://swe.quest/articles/how-meta-brought-av1-to-reels-f3c22ae15f525134.md): Meta Engineering · 2023-02-21 · Medium · 12 min read · Video & media, Mobile, Performance engineering
  Meta deployed AV1 encoding and delivery for Facebook and Instagram Reels, using SVT-AV1 for encoding and the dav1d software decoder on iOS and Android because most phones lack AV1 hardware decoders.
- [Enhancing HDR on Instagram for iOS With Dolby Vision](https://swe.quest/articles/enhancing-hdr-on-instagram-for-ios-with-dolby-vision-4075611ec7eeb01d.md): Meta Engineering · 2025-11-17 · Medium · 9 min read · Video & media, Mobile, Open source
  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.
- [Scaling robotics datasets with video encoding](https://swe.quest/articles/scaling-robotics-datasets-with-video-encoding-d6f6eb77294415c9.md): Hugging Face · 2024-08-27 · Medium · 18 min read · Video & media, Machine learning, Performance engineering, Storage systems
  LeRobot stores the camera frames of robotics datasets as AV1 video instead of per-frame PNGs.
- [Adopting AV1 for Real-Time Communication (RTC) at Scale](https://swe.quest/articles/adopting-av1-for-real-time-communication-rtc-at-scale-c700b86b1446a111.md): Meta Engineering · 2026-06-22 · Medium · 18 min read · Video & media, Communications, Mobile, Performance engineering
  Meta now runs AV1 for real-time video calls on most mobile devices in Messenger and WhatsApp.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
