Debian – CLI tool to parse/read and show the metadata from a torrent file

bittorrentdebianlinux

I downloaded a torrent file http://cdimage.debian.org/cdimage/stretch_di_rc1/amd64/bt-cd/debian-stretch-DI-rc1-amd64-netinst.iso.torrent

Now I want to parse/read it so that I can find out things like –

a. Which software was used to create the torrent file ?

b. The size of the iso image, the size and number of pieces

c. Number of trackers which the iso image.

All of which is meta-data.

I guess I'm looking for what mediainfo is for a media file –

[$] mediainfo Big_Buck_Bunny_small.ogv                                                                                              
General
ID                                       : 30719 (0x77FF)
Complete name                            : Big_Buck_Bunny_small.ogv
Format                                   : Ogg
File size                                : 2.65 MiB
Duration                                 : 1 min 19 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 280 kb/s
Writing application                      : ffmpeg2theora-0.25
SOURCE_OSHASH                            : cc9e38e85baf7573

Video
ID                                       : 20319 (0x4F5F)
Format                                   : Theora
Duration                                 : 1 min 19 s
Bit rate                                 : 212 kb/s
Nominal bit rate                         : 238 kb/s
Width                                    : 240 pixels
Height                                   : 134 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 24.000 FPS
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.275
Stream size                              : 2.01 MiB (76%)
Writing library                          : Xiph.Org libtheora 1.1 20090822 (Thusnelda)

Audio
ID                                       : 13221 (0x33A5)
Format                                   : Vorbis
Format settings, Floor                   : 1
Duration                                 : 1 min 19 s
Bit rate mode                            : Variable
Bit rate                                 : 48.0 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Stream size                              : 465 KiB (17%)
Writing library                          : libVorbis 20090709 (UTC 2009-07-09)

Is there something similar ? I am looking for a CLI tool .

Best Answer

transmission has a tool for that

$ transmission-show debian-stretch-DI-rc1-amd64-netinst.iso.torrent 
Name: debian-stretch-DI-rc1-amd64-netinst.iso
File: debian-stretch-DI-rc1-amd64-netinst.iso.torrent

GENERAL

  Name: debian-stretch-DI-rc1-amd64-netinst.iso
  Hash: 13d51b233d37965a7137dd65858d73c5a2e7ded4
  Created by: 
  Created on: Fri Jan 13 12:29:09 2017
  Comment: "Debian CD from cdimage.debian.org"
  Piece Count: 1184
  Piece Size: 256.0 KiB
  Total Size: 310.4 MB
  Privacy: Public torrent

TRACKERS

  Tier #1
  http://bttracker.debian.org:6969/announce

FILES

  debian-stretch-DI-rc1-amd64-netinst.iso (310.4 MB)

Another one would be intermodal which besides showing metadata can also create and verify it: https://rodarmor.com/blog/intermodal

Related Question