8

I'm interested of converting a .torrent binary file into a magnet file.

What are the possibilities to achieve that in Linux/Unix/OSX?

Sample format:

magnet:?xt=urn:btih:adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
2
  • 1
    Some online options: 1, 2 – Karan Apr 23 '15 at 17:38
  • transmission-show might get you the infohash (haven't tried it myself), from that you can trivially construct the magnet – the8472 Apr 30 '15 at 16:13
10

Rather late, but as suggested in the comments, the following produces a magnet link, with no further fiddling necessary:

transmission-show -m yourfiles.torrent

This program is shipped as part of the transmission-cli package on Debian derivatives, and part of the larger Transmission client.

Of course the .torrent file must be created beforehand, but that can also be done with a Transmission command, and it doesn't require a tracker (anymore):

transmission-create yourfiles
2
  • is there a way to convert magent url to .torrent file? – chovy Apr 15 '20 at 5:16
  • Converting a magnet link to a .torrent file would require internet access and would not be guaranteed to work. Converting a .torrent file into a magnet link is a many-to-one mapping (there are infinity many potential .torrent files that would map to the same magnet link — though fortunately "real-world" collisions are extremely rare), so the reverse operation would only work when you have access to somebody who has the original .torrent file (e.g. a torrent tracker or a "peer"). In any case, this should be a separate question. – aplaice Apr 16 '20 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.