A Missing Piece of the HDR Pipeline
When an iPhone records an HDR video, it embeds two extra layers of metadata in the file. One, Dolby Vision, tunes color, brightness, and contrast to the target display. The other, ambient viewing environment (amve), tells the playback device about the lighting conditions under which the video was encoded, allowing it to adjust rendering when the viewer’s surroundings differ.
Instagram and Facebook have supported HDR video playback on iOS since 2022, but their encoding pipeline was discarding both of these metadata types. The culprit was FFmpeg, which Meta uses for all derived encodings and which historically lacked support for amve and Dolby Vision. Without that metadata, HDR content didn’t look as intended—a problem that became obvious when a screen was dimmed. After working with partners to close that gap, Instagram for iOS is now the first Meta app to deliver Dolby Vision video from end to end, with plans to extend the support to other apps.
How Videos Move Through Meta
An uploaded video passes through three stages at Meta:
- Client processing. The creator’s device flattens the composition into a single HEVC Main 10 file. For iPhone HDR footage, this is where amve and Dolby Vision metadata are generated and attached to the stream.
- Server processing. The transcoding system creates several versions—an SDR rendition for non-HDR devices, a broadly compatible VP9 copy, and an AV1 version for the most popular videos that balances quality and file size. Different bitrates are produced to suit varying network conditions. All of these are made with FFmpeg, and previously, this is where the metadata was lost.
- Consumption. The viewer’s device selects an appropriate rendition, decodes it, and draws each frame. On iOS, playback runs through Apple’s
AVSampleBufferDisplayLayer(AVSBDL), which consumes amve and Dolby Vision data along with the decoded frames.
First, the Easy Lift: amve
Meta’s player is built from lower-level components, which let the engineering team inspect the bitstream between the decoder and AVSBDL. In 2022 they noticed that amve metadata was identical on every frame of every video they examined. The quick fix was to hardcode those values in the player pipeline.
That was never sustainable. It relied on an assumption that amve values were constant for all iPhone-produced content—something that could break with a new iOS version or device—and amve is not a concept on Android, so HDR video created on Android and viewed on an iPhone would render incorrectly. In 2024 Meta worked with the community to bring amve support into FFmpeg and added logging to track the values. The two-year-old assumption that the values never change still holds, but the pipeline is ready if it ever doesn’t.
The Harder Part: Dolby Vision in AV1
Bringing Dolby Vision to the delivery pipeline had two fundamental challenges.
Profile Tuning for a Codec We Actually Ship
iPhone-produced HDR uses Dolby Vision profile 8.4: profile 8 means HEVC, and the .4 suffix indicates it is compatible with HLG for players without Dolby Vision support. Meta largely delivers video as VP9 or AV1, not HEVC, and VP9 has no mechanism for carrying the required metadata. So Dolby Vision needed to ride inside AV1.
Dolby has defined profile 10 for that purpose. But neither FFmpeg nor Shaka packager supported profile 8 or profile 10 properly. Meta collaborated with Dolby and FFmpeg developers to implement the missing support in FFmpeg, specifically enabling transcoding of HEVC profile 8.4 into AV1 profile 10.4 with the libaom and libsvtav1 encoders. Fixes also went into the dav1d decoder and Shaka packager to handle Dolby Vision metadata.
Manual Extraction for AVSBDL
If you pass AVSBDL a raw HEVC bitstream from an iPhone camera, Dolby Vision is decoded automatically. But Meta decodes its buffers independently, because it needs to play formats like AV1 that older iPhones don’t natively decode. That means the Dolby Vision metadata must be extracted manually. Working from Dolby’s freshly published spec for profile 10 inside AV1, Meta implemented that extraction and repackaged the metadata into a format AVSBDL accepts.
To validate the setup, Meta published identical posts with and without the Dolby Vision metadata. Dolby measured the actual screen brightness at varying device brightness settings:

The measurements showed that displays receiving Dolby Vision metadata produced image brightness much more closely aligned with the device’s brightness setting—so the content looked the way it was encoded to look.
An A/B Test That Failed First
Meta A/B tests new features before rolling them out, but you cannot A/B test bitstream metadata directly. Instead, the team produced an additional rendition of every video that contained the new metadata, delivering it to a test population while a control group got the standard experience. They then compared watch time, load time, connection type, and playback errors across the two groups.
When the first test ran on Instagram Reels in 2024, the results were counterintuitive: Dolby Vision content had lower average watch time. The cause was not the image quality but the load time. Adding the metadata cost about 100 kbps per video on average, an overhead that pushed some users to just skip to the next Reel.
Dolby’s answer was a compressed metadata format that lowers the overhead to about 25 kbps. Implementing it meant work on two fronts. In FFmpeg, Meta and the Dolby team added a bitstream filter to compress and decompress Dolby Vision metadata. On the client side, Apple had no support for the compressed format, so Meta wrote its own decompression logic—roughly 2,000 lines of code.
The second A/B test was a success. Viewers of content with Dolby Vision metadata spent more time in the app. Meta attributes this to a better experience in low-light environments, where screens are set to lower brightness and properly rendered HDR video is less straining to watch.
What Ships Today and What Comes Next
Because the metadata had a tangible positive impact, Instagram for iOS became the first Meta app to ship with Dolby Vision from June 2025. As of that date, every AV1 encoding derived from an iPhone-produced HDR upload includes the Dolby Vision metadata. The support is now a permanent part of the encoding recipes, ready to be switched on elsewhere. Work is already under way to extend it to Facebook Reels.
There are limits to how much this can be showcased on a web page—Dolby Vision is not consistently supported across browsers and displays. To see the difference, you have to watch HDR content on an iPhone through Instagram. But the work is broader than one app: amve and Dolby Vision support is in FFmpeg, available to the whole community, and Meta has the foundation in place to roll Dolby Vision out to more platforms and operating systems.



