Skip to content

GIFs from X

Khryz-Navarro edited this page Nov 9, 2026 · 1 revision

Status: Planned · Phase 1 of the Roadmap · Issue #27

What it does

Paste a link to a post on X (Twitter) that has a GIF, and get a real .gif file. Today you'd get the silent MP4 that X actually serves.

How it would work

  • Links from X:
    • yt-dlp already downloads X videos.
    • assert_url in src/ytdlp.rs accepts any http(s) link, so X links already reach yt-dlp.
    • What's new is recognizing a GIF and converting it.
  • Detecting a GIF:
    • X marks these as animated GIFs; check how yt-dlp exposes that in its metadata, for example a format note or the media type.
    • Failing that, the signs are a short video with no audio stream.
    • When detected, the quality list shows GIF first, and MP4 remains available.
  • Converting:
    • ffmpeg, in two passes for good colors:
      • palettegen makes a palette from the video;
      • paletteuse applies it.
    • Size and frame rate are capped (for example 480 px wide, 15 fps), because GIFs grow fast.
    • This is a new gif_args next to convert_args in src/ytdlp.rs, with tests.
  • Signing in: X often wants a signed-in session. The existing Cookies setting (Firefox or a cookies.txt) covers it.

Open questions

  • Should the GIF size and frame rate be a setting, or should the app just pick a sensible default?
  • Should a .webp (smaller, still animated) be offered next to .gif?

Risks

  • X keeps changing: its access rules and API change often. Downloads depend on yt-dlp keeping up, and on cookies when X demands a sign-in.
  • File size: a GIF is often five to ten times larger than the MP4 it came from. The quality list should say so.

Home

Roadmap

Phase 1: links you paste

Phase 2: tools for your files

Phase 3: new engines

Phase 4: beyond the desktop

Clone this wiki locally