A userscript that automatically converts Stremio Web stream links to open directly in MPV using mpv-handler.
- Default Stream Behavior: Left-click on stream links opens them normally in Stremio
- Right-Click Context Menu: Right-click any stream to see "Play on MPV" option
- MPV Integration: Uses mpv-handler protocol for direct MPV player launch
- In-page Launch Toast: Shows a website toast when a stream is being opened in MPV
- Multi-language Support: Available in English, Portuguese (Brazil), and Portuguese (Portugal)
- Native Settings Integration (v4.8+): Configure directly in Stremio's settings panel for seamless user experience
- Quality Control: Configure preferred video quality settings
- Profile Support: Use custom MPV profiles
- Console Options: Choose whether to show MPV console
- Easy Configuration: Settings persist across sessions
- Real-time Processing: Automatically processes new links as they appear on the page
Download and install MPV player:
- Windows/macOS/Linux: https://mpv.io/installation/
Install the mpv-handler browser extension (v0.3.15 or later):
- Chrome/Edge: Chrome Web Store
- Firefox: Firefox Add-ons
Install a userscript manager extension:
- Install Prerequisites: Ensure MPV player, mpv-handler, and a userscript manager are installed
- Install Script: Click here to install the userscript
- Confirm Installation: Your userscript manager will prompt you to install the script
The script enhances the right-click context menu:
- Navigate to Stremio Web: Go to web.stremio.com or stremio.zarg.me
- Enable M3U Playlist: In Stremio settings, enable the "M3U Playlist" option
- Right-Click a Stream: Right-click on any stream to bring up the context menu
- Select "Play on MPV": Click the "Play on MPV" option from the menu
- See Confirmation: A small in-page toast appears: "Opening in MPV: ..."
- Enjoy: The stream opens directly in MPV player
Note: Left-clicking stream links opens them normally in Stremio as expected.
Settings are now integrated directly into Stremio's native settings panel for a seamless experience:
- Open Stremio Settings: Navigate to web.stremio.com or stremio.zarg.me
- Scroll to "MPV Player" Section: Find the new "MPV Player" section at the bottom of the settings
- Configure Your Preferences:
- MPV Profile: Choose MPV profile (
defaultor custom profile name) - Prefer Video Quality: Select preferred quality (
default,2160p,1440p,1080p,720p,480p,360p) - Run With Console: Show MPV console (
yesorno)
- MPV Profile: Choose MPV profile (
- Settings Auto-Save: Changes are applied immediately
You can still access settings through your userscript manager menu if needed:
Tampermonkey/Greasemonkey Menu Options:
- MPV Settings: Opens the legacy configuration dialog (for backwards compatibility)
- Process Links Manually: Force manual processing if needed
Available Settings:
- MPV Profile: Choose MPV profile (
defaultor custom profile name) - Prefer Video Quality: Select preferred quality (
default,2160p,1440p,1080p,720p,480p,360p) - Run With Console: Show MPV console (
yesorno)
- Stremio Web: web.stremio.com
- Stremio Zarg: stremio.zarg.me
- Link Detection: Monitors the page for stream links (
data:and#/player/routes) - Stream Extraction: Decodes payloads and extracts playable URLs (including magnet fallback when needed)
- Protocol Conversion: Converts stream URLs to
mpv-handler://ormpv-handler-debug:// - Click Binding: Ensures MPV links keep a persistent click handler
- User Feedback: Shows an in-page toast right before launching MPV
- Ensure all prerequisites are installed and up-to-date
- Check that "M3U Playlist" option is enabled in Stremio settings
- Try manually processing links via userscript menu
- Verify mpv-handler extension is installed and enabled
- Check MPV player installation
- Try with "Run With Console" enabled to see error messages
- Refresh the page once after updating the script
- Make sure you are clicking a converted stream entry (not a normal external link)
- Check if another extension is blocking page-injected UI elements
- Open browser console (F12) to check for error messages
- Ensure you're on a supported Stremio site
- Try refreshing the page
Open browser developer console (F12) to see script debug information and processing status.
- Version: 4.8
- mpv-handler Version: v0.3.15
- Supported Browsers: Chrome, Firefox, Edge, Safari (with appropriate userscript managers)
- Dependencies: GM_config library for settings management
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
MIT License - see the script header for full license text.
Ângelo Azevedo
- Integrated settings directly into Stremio's native settings panel
- Settings now appear in "MPV Player" section at the bottom of Stremio settings
- Seamless UI experience matching Stremio's design language
- Settings automatically save when changed in the settings panel
- Backwards compatible with legacy Tampermonkey menu option
- Enhanced notification system for better user feedback
- Improved script initialization and error handling
- Better support for Stremio's modern interface
- Optimized context menu injection for instant display
- Positioned "Play on MPV" option at the top of the context menu
- Reduced loading time for menu option appearance
- Added "Play on MPV" option to right-click context menu for quick stream launching
- Restored default left-click behavior (links open normally in Stremio)
- Improved user control over MPV launching vs default streaming
- Added in-page "Opening in MPV" toast notification
- Improved toast visibility timing and styling reliability
- Replaced system opening notification with website toast
- Added feedback when launching streams in MPV
- Fixed repeat-click behavior that could open an unwanted tab
- Improved persistent MPV click handling for already converted links
- Removed all debug console logs for cleaner operation
- Silent background processing without console pollution
- Fixed multiple MPV instances opening on single click
- Added throttling to prevent excessive processing
- Improved event listener management with cloning technique
- Enhanced link processing reliability
- Added English menu commands
- Improved user experience
- Added Tampermonkey/Greasemonkey menu integration
- Easy access to settings and manual processing
- Removed manual control buttons for fully automatic operation
- Streamlined user interface
- Removed visual styling of processed links
- Cleaner integration with Stremio interface
- Enhanced link processing with better URL conversion
- Improved click handling for MPV protocol
- Added visual feedback for processed links
- Enhanced CSS styling and user experience
- Improved notification system
- Better debugging capabilities
- Complete rewrite with advanced features
- Multi-language support
- MPV icon integration
- Professional configuration interface
- Based on the excellent Play with MPV script
- Uses mpv-handler for protocol handling
- Built with GM_config for configuration management