Recently downloaded a movie can not find subtitles, but finally with the Thunder to see the match on. Then try again, found that the title Library of Thunder is also very full. Because I usually rarely use thunder to see this video software, although Thunder to see can save subtitles, but it is still very inconvenient to use, and then want to find an independent tool can download the Thunder Subtitle Library subtitles.
In the process of looking for, found not only this tool Thunder-subtitle, even the algorithm has, the basic process is as follows:
First of all, take a portion of the video to find the SHA hash, the specific algorithm to take the content is:
- If the file is less than 60k (0x000), its file is all content
- If the file is larger than 60k, take the following three parts
- Start 20k (0x5000) content
- Intermediate 20k (0x5000) content
- File end 20k (0x5000) content
Then, use the Get method to access Http://sub.xmp.sandai.net:8000/subxl/{cid}.json. Where CID is the CID value of the video file.
This will be able to get all the subtitle information, is a JSON format of data, the resolution of the data can be downloaded after the subtitles.
In other words, Thunder's subtitle library is associated with the video content, it can not be used to search the video file name, this and the previous shooter net Subtitle API is very similar (its hash algorithm is very similar).
Because the original project is Python, there is no GUI interface, the use of some inconvenience, while the national day a little time with C # rewrite a bit, with WPF wrote a simple interface, click to download. Project source code is also released on GitHub THUNDERSRT, the algorithm is described above as shown above, relatively simple, the need for a friend can be directly obtained.
Release a gadget to download subtitles from Thunderbolt