This project is ONLY for educational/archival/personal purposes. I do not condone piracy in any form.
I AM NOT taking credit for the entirety of this project. This project is based on a version of an old fork of [devine](https://github.com/devine-dl/devine) that was found floating around online. I AM taking credit for about 20% of the additional stuff that I personally worked on.
2. Ensure Python is installed in your system (cannot be from the the Microsoft Store). Refer to [link](https://www.python.org/downloads/) or on Ubuntu -> `sudo apt install python3`. I recommend python 3.10.11 (or higher).
3. Make sure git is installed in your system by running `git --version`. If not refer to [link](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
| --list | Skip downloading and list available tracks and what tracks would have been downloaded. | False |
| --selected | List selected tracks and what tracks are downloaded. | False |
| --cdm | Override the CDM that will be used for decryption. | None |
| --keys | Skip downloading, retrieve the decryption keys (via CDM or Key Vaults) and print them. | False |
| --cache | Disable the use of the CDM and only retrieve decryption keys from Key Vaults. If a needed key is unable to be retrieved from any Key Vaults, the title is skipped.| False |
| --no-cache | Disable the use of Key Vaults and only retrieve decryption keys from the CDM. | False |
| --no-proxy | Force disable all proxy use. | False |
| -nm, --no-mux | Do not mux the downloaded and decrypted tracks. | False |
| --mux | Force muxing when using --audio-only/--subs-only/--chapters-only. | False |
| -?, -h, --help | Show this message and exit. | |
Login and get to the code pair page. Extract cookies from that page using [Open Cookies.txt](https://chromewebstore.google.com/detail/open-cookiestxt/gdocmgbfkjnnpapoeobnolbbkoibbcif).
Save it to the path `vinetrimmer/Cookies/Amazon/default.txt`. Pay attention to path if you are on Linux. Path is case sensitive and needs the capital `C` for `Cookies` and capital `A` for `Amazon`.
- To use, login to Hotstar and navigate to https://www.hotstar.com/{region}/home. Extract cookies from that page and save to path `vinetrimmer\Cookies\Hotstar\default.txt` (Case sensitive).
I recommend [Windscribe](https://windscribe.com/). You can sign up, getting 10 GB of traffic credit every month for free. We use the VPN for everything except downloading video/audio.
1. For each service, within get_tracks() function we do this below. Below is only when you are integrating a new service yourself. Set needs_proxy to True if your service needs proxy to get manifest (Ex - Netflix, Hotstar).
If you are using other VPNs, extract the proxy (use the browser extension to do this). It will look something like `http(s)://username:pass@host/IP:PORT`. Ex -> `https://user:pass@domain.com:443`. Pass it like below:
- There is another way of running this instead of using `poetry`. In root folder of VT-PR there is a `vt.py` (which is essentially the same as `vinetrimmer/vinetrimmer.py`). Activate venv, then:
```bash
python vt.py dl ......(rest of the command as before).......
```
This is useful for debugging/stepping through in IDE's without having to deal with poetry.
-`--standalone` will give a folder of compiled pythonic objects. Zip it to distribute. This is recommended.
- If you don't want to carry around/deal with a zip, instead use `--onefile`. This has the drawback of setting the default folders to the temp folder in whatever OS you are using. This could be fixed with some extra code but that is currently not implemented.
- [ ] Make a script to download latest binaries for vt automatically at startup.
- [ ] Detect if running as Nuikta compiled binary, then in vt.py set directories relative to binary path
- [ ] Find a way to estimate final file size for a track. Check if enough space is left on disc for double the amount of selected tracks - since mp4decrypt and Nm3u8 both make copies of the files
- [ ] Merge DB script
- [ ] Latest mkvtoolnix for linux
- [ ] Modify aria2c to include a progress bar ?
- [ ] Github Actions Python script that builds and publishes release for every commit to not readme.md
- [ ] MAX - Fix HDR10/DV --list
- [ ] ATVP service is currently broken in dev branch
- [ ] Fix original language (Was removed as workaround for a bug)
- [ ] Fix `-sl all` and `-al all`
- [ ] Make a windscribe.py for proxies modelled after nordvpn.py. Refer to the chrome extension for the code.
- [ ] Move to requests, curl or otherwise to download subtitles (?)
- [ ] Netflix service is currently broken (will probably be fixed Soon™)
- [ ] Implement a scan/hammer/cache keys for each service - pass string of zeros as title id. Then copy and rework dl.py to iterate over returned list of titles from scan function
- [ ] Pyinstaller support ?
### Amazon Specific
- [ ] Pythonic implementation of init.mp4 builder for ism manifest for avc, hvcc, dv, ac3, eac3, eac3-joc codecs
- [ ] Make a pure python requests based downloader for ISM/MSS manifest. Write init.mp4 then download each segment to memory, decrypt in memory and write it to a binary merged file. Download segments in batches. Batch size based on thread count passed to program. Download has to be sequentially written.
- [ ]`--bitrate CVBR+CBR` is currently broken
- [ ] Get highest quality CBR and CVBR MPD+ISM by default to AMZN
- [ ] Specify devices in config for MPD or ISM then load one based on command
- [ ] For videos, download init.mp4 using N_m3u8, mediainfo it to get FPS, HDR info
- [ ] Manifest url caching system for every key/Track object.
- [ ] Atmos audio with ISM manifest (Amazon) is currently broken (Needs a working initialization segment - init.mp4. If the title has the atmos audio in MPD then it should work.) ISM EAC3 - ddp / atmos needs dec3 box.
If anyone has any idea how to fix above issues, feel free to open a pull request.
## Donating
I am an independent developer right now. I work on this project in my free time. If you could support me that would be immensely helpful. All supporters will get a special mention in the README. Thank you in advance.
My [Buymeacoffee](https://buymeacoffee.com/chu23465).