Introduction
A .torrent file is the metainfo file of the BitTorrent file-sharing
protocol. A client such as qBittorrent or
Transmission reads it to learn which files are
shared, how they are cut into pieces, what each piece’s hash is and where to find the
tracker.
Structure
The whole file is one dictionary written in bencoding, which has four types:
byte strings (4:spam), integers (i3e), lists
(l…e) and dictionaries (d…e) with sorted string keys.
The info dictionary is required. It gives a name, the piece length, the
SHA-1 hashes of the pieces joined together, and either one length or a list of files.
Keys beside it include announce (the tracker address),
announce-list, creation date, comment and
created by.
Not described
This page is a first outline. The details of the layout are not yet described here.
Known, not yet covered
- Reference: every key, the BitTorrent version 2 form and the many client extension keys, which the BitTorrent Enhancement Proposals and community specification cover.
- Viewer: the site has no viewer for this format.
Links
Software
- qBittorrent – open-source BitTorrent client
- Transmission – open-source BitTorrent client
Reference
- BitTorrent Protocol Specification – community write-up, with the metainfo file structure