Skip to content

Zielzy/M-Stream-Bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M-Stream Bridge

A companion tool that expands Migaku Player support to many more non-DRM streaming websites via a local proxy. Includes Jimaku and Subdl API integration for multi-language subtitle fetching.

Features

  • Media Interception: Automatically detects and captures HLS (.m3u8) and Direct (MP4) video streams from your browser.
  • Migaku Video Player Integration: Seamlessly pipes unsupported video streams into Migaku Player via a local proxy, enabling advanced language learning tools.
  • Multi-Provider Subtitle Injection: Integrates with Jimaku (for Japanese) and Subdl (for 10+ global languages) to automatically fetch and inject subtitles directly into the player.
  • Local Dashboard: A bundled local server dashboard (running on port 7000) to monitor stream status, manually search for subtitles, configure API keys, and manage server settings.

How It Works

M-Stream Bridge coordinates three main layers to bridge browser media into Migaku:

  1. Interception: When you play a video in your browser, the Chrome Extension intercepts the stream requests (HLS playlists or Direct video links) along with their network authorization headers (Cookies, User-Agents, Referers) and sends them to the local server.
  2. Local Proxying: The local Server receives the stream. Since media servers usually protect streams against hotlinking and CORS, the server acts as a local proxy, forwarding the video chunks while preserving the original browser headers required by the media server.
  3. Injected Integration: Inside Migaku Player, the DevTools Snippet renders a floating control bar. It feeds Migaku a dummy video to pass initial drag-and-drop checks, then instantly swaps the video source with the local proxied stream URL, while injecting subtitle tracks fetched from the Jimaku or Subdl APIs.

Privacy

  • Runs 100% locally on your machine.
  • No browsing data is collected.
  • No media streams are uploaded to external servers.
  • No analytics or tracking.

Included Files

  • extension/ - Chrome extension folder to be loaded unpacked.
  • M-Stream Bridge.exe - local bridge server and default launcher.
  • migaku-player-snippet.js - Chrome DevTools Snippet for Migaku Player.

Setup

Step #1 - Extension

  1. Extract the release zip.
  2. Open chrome://extensions.
  3. Enable Developer mode.
  4. Click Load unpacked.
  5. Select the extension folder from this release.
  6. Pin the extension.
  7. Run M-Stream Bridge.exe.
  8. When the dashboard opens, save your Jimaku or Subdl API keys and configure your preferred subtitle languages for automatic subtitle lookup.

Step #2 - Snippets

This step is manual because Chrome extensions cannot safely install DevTools Snippets for you.

  1. Open Migaku Player.
  2. Press F12 to open Chrome DevTools.
  3. Navigate to the Sources tab.
  4. In the left-hand navigation pane, look for Snippets.
  5. If you don't see it, click the double angle brackets (>>) to expand the hidden menu, then select Snippets.
image
  1. Create a new snippet named migaku-player-snippet.
  2. Open migaku-player-snippet.js in a text editor.
  3. Copy the whole file Ctrl+A into the new Chrome snippet.
  4. Press Ctrl+S inside DevTools to save the snippet.

Step #3 - Get API Keys

To enable automatic subtitle fetching, you need to provide API keys for the supported providers in the M-Stream Bridge dashboard:

Jimaku API Key (Best for Japanese/Anime):

  1. Create an account at Jimaku.cc.
  2. Navigate to your Account.
  3. Generate a new key and copy it into the dashboard.

Subdl API Key (Best for General Media & Global Languages):

  1. Create an account at Subdl.com.
  2. Navigate to the API portal.
  3. Copy your API key into the dashboard and configure your preferred languages.

Normal Use

  1. Start the server with M-Stream Bridge.exe.
  2. Open a supported non-DRM video page.
  3. Let the video play for about 5–10 seconds.
  4. Open the extension popup and click Open Migaku Player.
  5. Run the migaku-player-snippet snippet in Migaku Player.
  6. Choose a playback mode:
    • Standard Mode: For everyday watching. Select Proxy to bypass server protections using the local bridge (recommended), or Direct if you don't need proxying.
    • Full Mode: For Target Subtitles Generator. Pre-extracts the full audio track so Migaku can process it, then automatically launches the video via the local proxy.
    • If playback fails or starts without audio, try clicking Proxy again or switch to Direct. If neither works, the stream is likely protected by strict DRM.
  7. Click Subtitle to automatically fetch and inject subtitles from your configured providers.
  8. If you switch to a different video source, click Exit Video in Migaku Player before playing again.

How to Run the migaku-player-snippet

Run this whenever Migaku Player needs the bridge UI again:

  1. Open Migaku Player.
  2. Press F12.
  3. Press Ctrl+P.
  4. Type !.
  5. Select migaku-player-snippet.
  6. Press Enter.

Support Me

ko-fi

If you find this project useful, you can support me on Ko-fi ☕

Tips

Use CTRL + ALT + B to toggle (show/hide) the migaku-player-snippet UI.

About

M-Stream Bridge is a local companion tool that expands Migaku Player support to many more non-DRM streaming websites. Also includes Jimaku API integration for quick subtitle fetching.

Topics

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Sponsor this project

Packages

 
 
 

Contributors