fix(instagram): download Reel video instead of cover image - #282
Open
bachjessen wants to merge 1 commit into
Open
fix(instagram): download Reel video instead of cover image#282bachjessen wants to merge 1 commit into
bachjessen wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Instagram Reel embed metadata can expose only
display_url, which is the Reel cover image rather than the video. OmniGet previously treated that URL as a photo and reported a successful video download while saving a JPG.This change detects
/reel/and/reels/URLs and falls back to yt-dlp when embed extraction returns a single non-video item.Reproduction
Test URL:
https://www.instagram.com/reel/Dbi_MeVOphM/
Before this change, OmniGet saved:
The history database recorded:
Running OmniGet's bundled yt-dlp directly downloaded the actual 1080x1920 video successfully.
Result
After this change, OmniGet logs:
OmniGet then downloads the actual Reel as an MP4 instead of saving the cover image as a JPG.
For the tested Reel, yt-dlp selected Instagram's highest available video stream:
The resulting MP4 contains VP9 video and AAC audio. QuickTime may not support VP9 playback on every Mac, but codec compatibility is separate from this pull request. This change fixes the original issue where OmniGet downloaded only the JPG cover image.
Tests
cargo fmt --all -- --checkcargo clippy --workspace --all-targetscargo test --workspacepnpm checkScope
Regular
/p/Instagram posts are unaffected. The fallback applies only to/reel/and/reels/URLs when embed extraction returns a single non-video item.