Skip to content

ArtByteFilip/StahujSerialy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

m3u8-capture

This tool is written in Rust and designed to capture and download HLS video streams. It automates a Chrome browser session, intercepts network traffic to detect .m3u8 playlist URLs, and downloads the stream to a local file using FFmpeg.

Features

  • Automatic Capture: Launches Chrome and listens to all network requests across tabs and iframes to detect .m3u8 URLs.
  • Multi-Target Support: Monitors all attached browser targets including pages, popups, and embedded frames simultaneously.
  • FFmpeg Integration: Once a stream URL is captured, it is automatically passed to FFmpeg for download and re-encoding.
  • Referer Handling: Automatically extracts and forwards the correct Referer header to FFmpeg to handle protected streams.

Use Case

This tool is designed for capturing HLS video streams from websites that load .m3u8 playlists dynamically. It is ideal for users who want a simple way to download video content that is otherwise difficult to capture manually.

How It Works

  1. Startup: The tool launches a Chrome instance with remote debugging enabled on port 9222.
  2. Waiting: Chrome opens the target URL. The user clicks on the episode or video they want to capture.
  3. Detection: The tool intercepts all outgoing network requests and identifies the first .m3u8 URL.
  4. Download: FFmpeg is invoked automatically with the captured URL and referer to download and encode the stream to video.mp4.

Requirements

Commands

Run with the default target URL:

cargo run --release

Run with a custom URL:

cargo run --release -- https://example.com/episode-page

Disclaimer

This project is intended for educational and experimental purposes only.

License

MIT

About

This tool is written in Rust and designed to capture and download HLS video streams. It automates a Chrome browser session, intercepts network traffic to detect .m3u8 playlist URLs, and downloads the stream to a local file using FFmpeg.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages