mandolin-rip will download .ts
video files from the Mandolin streaming platform as a stream is playing.
It uses the same source videos that their web app does, giving you the highest quality possible.
- Add your token to
src/config.json
and update the streams to download Note: API tokens seem to expire every 60 minutes, make sure you have a new one saved in the config before the token expires yarn
yarn build
yarn start
Files will be downloaded into the downloads
directory, grouped by stream UUID.
After everything has been downloaded you can stitch the clips together using FFmpeg:
yarn stitch
This will output an mp4
file for each stream in the stitched
directory.
Mandolin uses Firebase Auth for user authentication and minting API tokens. Reverse engineering their compiled JavaScript is very tedious so instead of that you can use the following instructions to get an API key after it's generated:
- Go to the stream page
- Open the developer console and go to the network tab
- Reload the page
- Copy your stream UUID
Example: The URL
https://firefly.mandolin.com/watch/d8cd5355-7bf4-480c-abc2-64d95f18296a
has a UUID ofd8cd5355-7bf4-480c-abc2-64d95f18296a
- In the network tab paste the UUID into the search box and find the 2nd request with the UUID in the title
- Click the request and look at the tab to the right
- Find the "Request Headers" item and copy the value of the "Authorization" header
- This is your API key! You can now save it to
src/config.json
You can repeat these steps whenever you like to get a fresh API key. Note: API tokens seem to expire every 60 minutes, make sure you have a new one saved in the config before the token expires.