MCPcopy Index your code
hub / github.com/Matrix86/flowdownloader

github.com/Matrix86/flowdownloader @v1.1.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.6 ↗ · + Follow
139 symbols 367 edges 10 files 4 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Flowdownloader GitHub GitHub go.mod Go version

Flowdownloader allows you to download video from a server that uses the HLS (Http Live Streaming) protocol to get and play the streaming. For example it can download the video showed by FlowPlayer or JW Player.

Flowdownloader

Flowdownloader

How it works

You need to find the URL of the main index file with extension m3u8 and pass it to the tool with the flag -u. You can easily find it using the web inspector of your browser. Sometimes the server need authentication or has some check like the referer. In this case you can specify the cookies or the referer that flowdownloader should use in the requests.

Note: you can export the cookies using a tool like EditThisCookie

If the video segments are encrypted, you have to find the decription key. The key can be embedded in the player tag, or downloaded from a URL. You can pass it to the flowdownloader through the parameter -k, specifying a URL or a string encoded with base64.

These info can be found with the network tab of the web inspector, searching for m3u8 url, and key files.

Installation

To compile and install the tool you need a configured Go installation and launch:

go get -u github.com/Matrix86/flowdownloader/…

A Dockerfile is also present. You can use it to create your build or download it with:

docker pull matrix86/flowdownloader

Usage

Usage of ./flowdownloader:
  -c string
        File with authentication cookies.
  -debug
        Enable debug logs.
  -k string
        AES key (base64 encoded or http url)
  -o string
        Output File (default "video.mp4")
  -r string
        Set the http referer.
  -s    If true the url used on -u parameter will be considered as the secondary index url.
  -u string
        Url master m3u8
  -w int
        Number of workers to download the segments (default 4)

Chrome extension

Using the Chrome extension is it possible to extract key and URL directly from the browser.

Once installed you'll find a new tab in the webinspector called "Flowdownloader". Open the page with the video, open the WebInspector and go to the Flowdownloader tab. Press play on the video and enjoy :)

Link to the Chrome Store here

Buy me a coffee! :coffee:

Extension points exported contracts — how you extend this code

Callback (FuncType)
(no doc)
downloader/downloader.go
DecryptCallback (FuncType)
(no doc)
hlss/hlss.go

Core symbols most depended-on inside this repo

renderCommand
called by 4
extension/devtools/panel.js
GetBaseUrl
called by 3
utils/utils.go
HttpRequest
called by 3
utils/utils.go
constructor
called by 3
extension/devtools/panel.js
GetMD5Hash
called by 2
utils/utils.go
retrieveKeyFromURL
called by 2
hlss/hlss.go
parseSecondaryIndex
called by 2
hlss/hlss.go
GetTotSegments
called by 2
hlss/hlss.go

Shape

Function 108
Method 23
Struct 3
Class 2
FuncType 2
TypeAlias 1

Languages

TypeScript74%
Go26%

Modules by API surface

extension/js/jquery-3.5.1.min.js83 symbols
hlss/hlss.go15 symbols
extension/js/bootstrap.min.js11 symbols
extension/devtools/panel.js9 symbols
downloader/downloader.go9 symbols
utils/utils.go7 symbols
main.go3 symbols
utils/cookie.go2 symbols

For agents

$ claude mcp add flowdownloader \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page