Skip to main content

yt-dlp Instagram HDR

A yt-dlp plugin that adds HDR formats for Instagram Reels, Stories, IGTV, and video posts.

Supports VP9 Profile 2 and AV1 10-bit HDR. By default, the plugin starts with Instagram's web API and checks the iOS API when a successful web response lacks HDR or separate audio. It combines HDR, SDR, progressive video and audio formats for the same media item, so no extra extractor arguments are needed for HDR discovery or bv+ba. The same CDN object is listed once even when it arrives from both APIs, from different edge hosts or under several video_versions entries. xHE-AAC is excluded unless explicitly enabled, or unless it is the only audio-only format available; a progressive video never replaces a separate audio track. Video and audio are merged without re-encoding (unless the hevc option is enabled) and the HDR video is verified with ffprobe.

Requirements

  • Python 3.11+ for current yt-dlp (yt-dlp dropped Python 3.10 in 2026.11.23). The plugin itself still runs on Python 3.10, where pip installs the newest yt-dlp that supports it, 2026.10.21
  • yt-dlp 2026.08.19+ (tested up to 2026.11.23)
  • FFmpeg and ffprobe on your PATH (the executables, not the Python ffmpeg package)
  • Authenticated Instagram cookies for the plugin's API extraction

Optional HEVC conversion requires an FFmpeg build with hevc_videotoolbox (macOS) or libx265. No conversion is performed unless you enable it.

Installation

If you know how yt-dlp was installed, jump to pip, pipx, or manual installation (Homebrew and standalone executables). Otherwise, identify the installation with the commands below; unavailable commands can be skipped.

macOS

command -v yt-dlp
pipx list
python3 -m pip show yt-dlp
brew list --versions yt-dlp

Linux

command -v yt-dlp
pipx list
python3 -m pip show yt-dlp

Windows (PowerShell)

Get-Command yt-dlp
pipx list
py -m pip show yt-dlp

Use the result that matches your output:

Output Installation type
package yt-dlp ... in pipx list pipx
Name: yt-dlp from pip show pip
yt-dlp <version> from brew list manual
yt-dlp has a path, but the checks above report it as missing manual

Package(s) not found, nothing has been installed with pipx, and No such keg are negative results; continue to the next check. If command -v or Get-Command cannot find yt-dlp, install yt-dlp first.

If more than one check finds yt-dlp, use the manual method to avoid installing the plugin into the wrong Python environment.

pip

Run these commands in the same Python environment as yt-dlp.

macOS/Linux:

python3 -m pip install -U yt-dlp-instagram-hdr

Windows:

py -m pip install -U yt-dlp-instagram-hdr

pipx

pipx inject yt-dlp yt-dlp-instagram-hdr --force

Manual

Download the latest .whl from Releases, and place it, without extracting it, in:

  • macOS/Linux: $XDG_CONFIG_HOME/yt-dlp/plugins/, or ~/.config/yt-dlp/plugins/ when it is not set
  • Windows: %APPDATA%/yt-dlp/plugins/

Create the folder if necessary. Keep only one version of this plugin there; when updating, replace the old yt_dlp_instagram_hdr-*.whl with the new wheel. See yt-dlp's plugin installation documentation for other supported locations.

Updating

For pip, repeat the installation command with -U. For pipx:

pipx upgrade yt-dlp --include-injected

For manual installations, replace the wheel as described above. Updating yt-dlp itself does not update a manually installed plugin.

Usage

Authenticated downloading can expose the account to challenges, session invalidation or suspension. A yt-dlp maintainer explicitly documents this risk of flagged or banned accounts. The plugin cannot guarantee that an account will not be suspended, and cannot determine which browser account is your main account. Avoid supplying a session for an account you cannot afford to lose. A separate browser profile using the same account still exposes that account.

For public content, you can first try without authenticated cookies:

yt-dlp "VIDEO_URL"

This uses yt-dlp's built-in extractor; available formats and anonymous access depend on Instagram. For authenticated extraction, choose the browser/profile deliberately and log in there first. Replace VIDEO_URL with a Reel (/reel/, /reels/), post (/p/), IGTV (/tv/, which is also where instagram://media?id= resolves) or Story (/stories/) URL, keeping the quotes. instagram.com/share/... links are not supported by yt-dlp; open one in a browser and use the canonical URL it lands on. A link to one slide of a carousel carries ?img_index=N; with --no-playlist that slide alone is downloaded, and without it the whole post is, as yt-dlp does elsewhere. --cookies-from-browser chrome is still supported; to select a Chrome profile explicitly, use --cookies-from-browser "chrome:PROFILE_DIRECTORY", replacing PROFILE_DIRECTORY with that profile's directory name or path (shown at chrome://version). Replace chrome with your supported browser name if needed. Cookies are credentials, not a protection against account restrictions.

Default: download HDR when available, without converting the video codec.

yt-dlp --cookies-from-browser chrome "VIDEO_URL"

yt-dlp selects the best available formats and merges video/audio when needed. Merging is not re-encoding: an .mp4 can still contain VP9 or AV1 video. The HDR verified message is a read-only metadata check, not a conversion; if the check fails, a warning is printed and the download is kept. It also runs when the HEVC conversion was enabled but skipped, so the file that is actually produced is always the one that gets checked.

Apple's players (QuickTime, Photos, iPhone and iPad) cannot play VP9 in MP4, which is how Instagram delivers HDR. For files that play and save on Apple devices, enable the optional HEVC conversion.

List available formats with -F:

yt-dlp -F --cookies-from-browser chrome "VIDEO_URL"

Plugin HDR formats have IDs starting with hdr-. Their dynamic_range is HLG or HDR10 when the manifest states the transfer characteristic, and a bare HDR for a 10-bit BT.2020 rendition whose transfer it does not state. yt-dlp only understands SDR/HDR10/HDR10+/HDR12/HLG/DV, so for that bare value it leaves the -F HDR column empty and -S hdr ranks it below HLG. Select with -f "bv*[dynamic_range!=SDR]+ba/b" rather than [dynamic_range=HLG], which would miss those renditions; the format ID and format_note still say hdr. To explicitly select separate video and audio streams:

yt-dlp -f "bv+ba" --cookies-from-browser chrome "VIDEO_URL"

The automatic API selection preserves compatible audio from the web response when HDR comes from iOS. For silent videos, use the default selection instead, since an audio-only stream may not exist.

You can also use a cookie file:

yt-dlp --cookies cookies.txt "VIDEO_URL"

The cookie file must use the Netscape format supported by yt-dlp. Treat it as a password: do not share it or commit it to a repository.

Without authenticated cookies, the plugin shows a warning and delegates to yt-dlp's built-in Instagram extractor. With authentication, media without HDR keeps the available SDR and audio formats from the same response.

Account access and request limits

The default api=auto starts with the web application ID and yt-dlp's browser headers. After a successful response without HDR or separate audio, it makes one additional media request using the iOS application ID and user agent, then combines formats by media ID. This uses a mobile application identity with browser cookies and carries the account risk described above. Use instagramhdr:api=web to restrict extraction to the web API. Neither mode fabricates device IDs or random telemetry. Changing headers cannot make authenticated automation indistinguishable from normal browsing.

yt-dlp's own instagram:app_id is honoured when instagramhdr:api is unset: web, ios or either of those two application IDs selects the matching mode, so the application ID, host, user agent and impersonation setting stay consistent. instagramhdr:api takes precedence when both are given, and any other application ID prints a warning and uses the web API.

Metadata requests made by this plugin are spaced by two seconds by default, shared between Reels and Stories in the same yt-dlp run. Use yt-dlp's --sleep-requests SECONDS to set an explicit interval. This limits request bursts; it is not an Instagram-approved rate or a guarantee against suspension. Avoid running multiple download processes with the same session.

HTTP 401/403/404/429, login/verification redirects and recognized challenge or restriction JSON responses stop further metadata requests through this plugin for the current run, including with --ignore-errors. There is no automatic authenticated fallback after these errors. A 404 can indicate unavailable media or a session restriction, so it also stops the run's plugin requests. Check the account in Instagram and resolve restrictions before trying again; repeatedly refreshing cookies is not a fix for account limits. The stop flag is local to that yt-dlp process, not a persistent or cross-process account lock. Extractors outside this plugin, including the explicitly disabled mode, retain yt-dlp's own behavior.

Stories preserve the tray's available audio and video formats. When the tray omits HDR, the plugin requests media details (a tray's SDR manifest can omit available HDR). Automatic mode also checks iOS when HDR or separate audio is still missing. With a specific Story URL and --no-playlist, other Stories are not queried for media details.

Instagram can return different formats for web and mobile clients. Automatic mode handles this without extra arguments. To start directly with the iOS API:

yt-dlp --cookies-from-browser "chrome:PROFILE_DIRECTORY" --extractor-args "instagramhdr:api=ios" "VIDEO_URL"

This option prints a warning and also checks the web API when the iOS response lacks compatible separate audio, unless include_xhe_aac is enabled and xHE-AAC audio is available. All modes retain the request interval and stop protections; an access rejection never triggers a request with another client. They preserve the available VP9/AV1 HDR downloads, optional HEVC conversion, Stories and the audio options below. Availability still depends on the API responses; the plugin cannot force Instagram to expose an HDR rendition.

Plugin options

Disable the HDR plugin and force yt-dlp's built-in Instagram extractor:

yt-dlp --cookies-from-browser chrome --extractor-args "instagramhdr:disable" "VIDEO_URL"

Include xHE-AAC (mp4a.40.42) audio alongside the other audio formats:

yt-dlp --cookies-from-browser chrome --extractor-args "instagramhdr:include_xhe_aac" -F "VIDEO_URL"

Remove -F to download. Enabling this option can make yt-dlp select xHE-AAC, which some players do not support. Leave it off for better compatibility.

Photos are offered as a single image format: the largest still Instagram returns for that item. This applies to photo posts, to the photo items of a mixed carousel (which otherwise failed the whole post with No video formats found!) and to photo Stories (which were skipped silently). Since that file already is the largest still, such an item lists no separate thumbnails, so --write-thumbnail writes nothing extra for it and --embed-thumbnail skips it instead of failing on a JPEG. Video items are unaffected. To list only the videos again:

yt-dlp --cookies-from-browser chrome --extractor-args "instagramhdr:images=false" "VIDEO_URL"

With images=false a photo-only item has no formats, so yt-dlp reports an error for it; add -i to skip such items in a carousel or Story.

Optional HEVC conversion

HEVC conversion is disabled by default: without instagramhdr:hevc, the original video codec is preserved. Merging video/audio and verifying HDR metadata do not re-encode the video.

For better compatibility with HEVC-capable Apple devices and other players, explicitly enable conversion of HDR downloads to HEVC Main 10 (hvc1). The result is an .mp4 whatever --merge-output-format says; --remux-video can still change its container afterwards. --recode-video would re-encode it again, so with it the conversion is skipped with a warning; likewise with -x. This is a lossy re-encode and takes additional time; it preserves and checks the HDR colour tags, but is not a lossless copy. VideoToolbox is used when your FFmpeg has it, with libx265 as a slower software fallback. Audio, subtitles and cover art are copied:

yt-dlp --cookies-from-browser chrome --extractor-args "instagramhdr:hevc" "VIDEO_URL"

The HEVC file is usually larger than the download (about 1.3–3× in tests). For smaller files at lower quality, pass encoder options; they are applied after the plugin's defaults. -q:v sets the VideoToolbox quality (default 50, higher is better) and -crf the libx265 quality (default 22, lower is better):

yt-dlp --cookies-from-browser chrome --extractor-args "instagramhdr:hevc" --ppa "InstagramHDRHEVC:-q:v 40 -crf 26" "VIDEO_URL"

--ppa adds options to whichever encoder runs, but it cannot choose one. instagramhdr:hevc_encoder does: auto (the default: VideoToolbox first, then libx265), videotoolbox, or x265. Only the named encoder is attempted, so the conversion fails instead of falling back if it is missing or its output does not verify. On Apple silicon libx265 reaches comparable quality at a smaller size than VideoToolbox, at a much slower speed:

yt-dlp --cookies-from-browser chrome --extractor-args "instagramhdr:hevc;hevc_encoder=x265" "VIDEO_URL"

When the conversion cannot run — no usable HEVC encoder, no ffprobe, a file in the way, or an encode that fails — a warning says why and the HDR download is kept as it is, with its --download-archive entry. The output must also carry the hvc1 codec tag that Apple players require: if extra --ppa options override it, the conversion is refused rather than reported as verified.

After a successful conversion the original is deleted, like with --recode-video, unless:

  • -k is used: the original is kept (as *.orig.mp4 when it was already an MP4), together with the separately downloaded video/audio streams (*.f<format>.*);
  • --no-overwrites is used and the original was not downloaded by this run (for example a file that yt-dlp reports as already downloaded): it is kept too (as *.orig.mp4 when it was already an MP4).

Running the same command again skips files that are already converted: like --remux-video, an existing <name>.mp4 (or the container chosen with --remux-video) counts as the finished result. If that file is an earlier download that is not HDR, a warning says so and it is kept; pass --force-overwrites to download it again. An existing file at the HEVC destination, or an existing *.orig.mp4 that would be kept, also stops the conversion unless --force-overwrites is given.

The option only affects HDR video selections; it does not turn SDR into HDR, and it is skipped (with a warning) when several video streams are merged with --video-multistreams. If your -f/-S options pick an SDR format although HDR formats exist, a warning says so before the download. Audio-only downloads, including -x, skip HDR conversion and verification. The option does not convert xHE-AAC audio, so enabling both options can still produce audio that your player cannot play.

Other controls

view_count is filled from Instagram's play count when the API does not report views, which is the usual case for Reels and Stories.

These instagramhdr options apply to Reels, posts, IGTV, and Stories. Boolean options accept 1/true/yes/on and 0/false/no/off, or no value at all (which means true); any other value is an error rather than a silent true, and an unknown option name or namespace prints a warning naming it. To combine options, separate them with semicolons inside the same quoted argument:

yt-dlp --cookies-from-browser chrome --extractor-args "instagramhdr:hevc;include_xhe_aac" "VIDEO_URL"

Use the instagramhdrstory key to override an option for Stories only. Advanced: instagramhdr:verify=false disables the default read-only HDR check; HEVC conversion still verifies its input and output.

The options are stored in the info JSON when the video is extracted. When downloading from --load-info-json, no extraction runs, so add the plugin's post-processors yourself:

yt-dlp --load-info-json FILE --use-postprocessor "InstagramHDRSelection:when=video" --use-postprocessor InstagramHDRHEVC --use-postprocessor "InstagramHDRVerify:when=after_move"

Troubleshooting

  • No HDR formats: check that the selected browser/profile is logged in and that the upload has HDR. Available SDR/audio formats are kept. Web and iOS can expose different formats; see the explicit iOS option and its account risk above.
  • HTTP 401/403/404/429 or account verification: the plugin stops its metadata requests for that run. Check the account and content directly in Instagram; resolve challenges and allow limits to clear before another attempt. Neither switching clients nor disabling the plugin bypasses Instagram's restrictions.
  • Missing FFmpeg/ffprobe or HEVC encoder: install the executables, check ffmpeg -version and ffprobe -version, or set --ffmpeg-location "PATH". ffmpeg -hide_banner -encoders must list hevc_videotoolbox or libx265.
  • SDR downloaded although HDR formats are listed: check -f/-S in your command and configuration; -f "bv*[dynamic_range!=SDR]+ba/b" prefers HDR.
  • Unexpected conversion: check your yt-dlp configuration for hevc or other conversion options. Use --ignore-config to test without saved settings.
  • Old plugin still loaded: remove duplicate copies of this plugin and check the plugin paths in yt-dlp --verbose -F --cookies-from-browser chrome "VIDEO_URL". A manually installed wheel may take precedence over a pip installation.

yt-dlp --verbose prints the plugin version, and a yt-dlp older than this plugin supports prints a warning instead of failing in confusing ways.

When reporting a problem, include the yt-dlp/plugin versions and the command used. Redact cookies, credentials, private URLs and other personal data from logs.

Testing a checkout

Run from the repository root with a Python environment containing yt-dlp:

python -m unittest discover -s tests -v
yt-dlp --ignore-config --no-plugin-dirs --plugin-dirs .. --cookies-from-browser chrome -F "VIDEO_URL"

The tests use the local source, not an installed wheel. The second command also loads this checkout; add --extractor-args "instagramhdr:hevc" and remove -F only when you want to test conversion. The automated tests do not contact Instagram.

License

MIT © 2026 Vinicius Roncetti

Metadata

Release files for yt-dlp-instagram-hdr 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for yt-dlp-instagram-hdr 0.7.0
File Interpreter ABI Platform Actions
yt_dlp_instagram_hdr-0.7.0-py3-none-any.whl Python 3 none any Details for yt_dlp_instagram_hdr-0.7.0-py3-none-any.whl

Release files / yt_dlp_instagram_hdr-0.7.0-py3-none-any.whl

Download URL yt_dlp_instagram_hdr-0.7.0-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df48c5623b485d4a735e4f1eeff13846c6bd34c741170d5fd742120e591e8899
BLAKE2b-256 checksum
How to use checksums
3689aea3898bf881b730d40a3f7790acf96840931755319d7208f30419d88b44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for yt-dlp-instagram-hdr 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for yt_dlp_instagram_hdr-0.7.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page