#media #statistics #generate-table #cli #ffprobe

app media-stats-rs

Generate a table with media statistics of video files in a folder. You'll receive information like the resolution or codec to quickly sort and filter your media files.

2 unstable releases

0.2.0 Dec 30, 2024
0.1.0 Dec 30, 2024

#426 in Video

Download history 174/week @ 2024-12-25 62/week @ 2025-01-01

236 downloads per month

MIT license

13KB
239 lines

media-stats-rs

Generate a table with media statistics of video files in a folder. You'll receive information like the resolution or codec to quickly sort and filter your media files. Optionally you can create a .csv file with the information.

Uses ffprobe to inspect the files.

Installation

You'll need to have the Rust development environment installed and up to date.

Once you have rust and dependencies installed, use cargo to install media-stats-rs:

cargo install --locked media-stats-rs

Usage

You need to pass a base and pattern.

Usage: media-stats-rs [OPTIONS] --base <BASE> --pattern <PATTERN>

Options:
  -b, --base <BASE>        The base folder to search in
  -p, --pattern <PATTERN>  The file pattern to search for inside the base folder
  -c, --csv                Write output to a .csv file in the current directory
  -h, --help               Print help
  -V, --version            Print version

Example:

media-stats-rs --base "/Users/movies" --pattern "**/*.{mkv,mp4}"

Output:

🔍 Searching for files...
+-------------------------------+-------+--------+----------------+-----------+-------+----------+-----------+
| Filename                      | Width | Height | Duration (min) | Size (GB) | Codec | Audio    | Subtitles |
+============================================================================================================+
| Millennium Actress (2001).mkv | 1920  | 1040   | 86             | 9.91      | hevc  | ger, jpn | ger       |
+-------------------------------+-------+--------+----------------+-----------+-------+----------+-----------+

🎬  Total files found: 1
  Done in 0 seconds

Dependencies

~10–19MB
~233K SLoC