Video Quality Controller for X (Twitter) (Chromium browsers only)

Force highest quality playback for X (Twitter). Fixed UI layout shifts.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
ZerSKYi
Daily installs
2
Total installs
87
Ratings
1 0 0
Version
1.0.0
Created
2026-04-24
Updated
2026-05-29
Size
11.2 KB
License
N/A
Applies to

Video Quality Controller for X (Twitter)

🎬 Tired of blurry videos? Video Quality Controller for X (Twitter) forces your preferred playback quality on X/Twitter!

Ever noticed X/Twitter playing videos in lower quality even when HD is available? This script puts you in control – lock your favorite resolution, skip the buffering, and enjoy crisp playback without the hassle.

Just install it, and a sleek quality panel appears – pick your setting once, and it remembers forever.


✨ Why You'll Love It:

  • 🔒 Lock Your Quality: Choose exactly what you want:

    • Best → Always pick the highest available
    • 1080P / 720P → Target specific resolutions
    • Auto → Let X decide (default)
    • Worst → Data-saver mode for slow connections
  • 🎯 Smart Matching: Uses nearest-neighbor logic to find the closest available stream to your preference – no more "option not available" frustrations.

  • 🧭 Clean, Unobtrusive UI:

    • Floating panel in top-right corner
    • Hover to expand, click header to collapse to a tiny indicator dot
    • Blue dot appears when a quality is locked

    Example UI flow:

    • Expanded: Shows all quality options with checkmark on active selection
    • Mini mode: Just a subtle dot – click to expand when needed
  • ⌨️ Keyboard Power Users: Press Alt + Q anytime to cycle: Best → 1080P → 720P → Auto → Best...

  • 💾 Set & Forget: Your preference saves to localStorage – works across sessions, no reconfiguration needed.


How It Works (Behind the Scenes):

  1. The script injects at document-start to intercept video requests early.
  2. It hooks both XMLHttpRequest and fetch to catch HLS playlist (.m3u8) downloads from video.twimg.com.
  3. Parses the playlist for RESOLUTION and BANDWIDTH tags.
  4. Filters or selects the stream matching your preference using smart nearest-neighbor logic.
  5. Returns the modified playlist – playback continues seamlessly, no page reload needed.
Note: This script only selects from streams X/Twitter already provides. If 4K isn't offered for a video, it can't magic it into existence – but it will pick the best available match.


Quick Start Guide:

  1. Install via GreasyFork
  2. Visit any X/Twitter page with a video (x.com, twitter.com, mobile/pro subdomains)
  3. Click the Quality panel that appears top-right
  4. Select your preferred option
  5. ✅ Done! A toast confirms your choice, and the blue dot shows it's locked

Pro tip: Toggle mini-mode by clicking the panel header – keeps your screen clean while still showing status.


💡 Good to Know:

  • Works on desktop browsers; mobile web support may vary due to X's responsive player.
  • Only modifies HLS (.m3u8) streams – DASH-based videos aren't affected (X primarily uses HLS for web).
  • Zero permissions required (@grant none) – pure client-side logic, no external calls.
  • UI uses CSS variables for theme awareness – looks great in light or dark mode.


🔄 Version Info

v1.0.0 • Initial Release
  • ✅ HLS playlist interception via XHR/fetch hooks
  • ✅ Smart resolution matching (nearest-neighbor)
  • ✅ Collapsible floating UI with mini-mode
  • ✅ Alt+Q keyboard cycling
  • ✅ Persistent localStorage settings
  • ✅ Layout-shift prevention via early injection

Made with ❤️ for smoother X/Twitter video watching •