A hashdeep/md5tree for media files

Related tags

Command-line dano
Overview

dano

dano is a wrapper for ffmpeg that checksums the internal file streams of ffmpeg compatible media files, and stores them in a format which can be used to verify such checksums later. This is handy, because, should you choose to change metadata tags, or change file names, the media checksums should remain the same.

Features

  • Non-media path filtering (which can be disabled)
  • Highly concurrent hashing (select # of threads)
  • Several useful modes: WRITE, TEST, COMPARE, PRINT
  • Select from multiple checksum algorithms (default: murmur3, MD5, adler32, CRC32, SHA160, SHA256, SHA512)
  • Decode option to decode the stream before executing
  • Write to xattrs or to hash file (and always read back and operate on both)

Why dano? Because FLAC is really clever

To me, first class checksums are one thing that sets the FLAC music format apart. FLAC supports the writing and checking of the streams held within its container. When I ask whether the FLAC audio stream has the same checksum as the stream I originally wrote to disk, the flac command tells me whether the checksum matches:

% flac -t 'Link Wray - Rumble! The Best of Link Wray - 01-01 - 02 - The Swag.flac'
Link Wray - Rumble! The Best of Link Wray - 01-01 - 02 - The Swag.flac: ok

Why can't I do that everywhere?

The question is -- why don't we have this functionality for video and other media streams? The answer is, of course, we do, (because ffmpeg is incredible!) we just never use it. dano aims to make what ffmpeg provides easier to use.

So -- when I ask whether a media stream has the same checksum as when I originally wrote it to disk, dano tells me whether the checksum matches:

% dano -w 'Sample.mkv'
murmur3=2f23cebfe8969a8e11cd3919ce9c9067 : "Sample.mkv"
% dano -c 'Sample.mkv'
"Sample": OK
# Now change our file's name and our checksum still verifies,
# because the checksum is stored in a xattr
% mv 'Sample.mkv' 'test1.mkv'
% dano -c 'test2.mkv'
"test1.mkv": OK
# Now change our file's metadata and *write a new file in a 
# new container* and our checksum is the *same*
% ffmpeg -i 'test1.mkv' -metadata author="Kimono" 'test2.mp4'
% dano -w 'test2.mp4'
murmur3=2f23cebfe8969a8e11cd3919ce9c9067 : "test2.mkv"

Shout outs! Yo, yo, yo!

Inspired by hashdeep, md5tree, flac, and, of course, ffmpeg.

Install via Native Packages

For Debian-based and Redhat-based Linux distributions (like, Ubuntu or Fedora, etc.), check the tagged releases for native packages for your distribution.

You may also create and install your own native package from the latest sources, like so:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install cargo-deb 
git clone https://github.com/kimono-koans/dano.git
cd ./dano/; cargo deb
# to install on a Debian/Ubuntu-based system
dpkg -i ./target/debian/dano_*.deb
# or convert to RPM 
alien -r ./target/debian/dano_*.deb
# and install on a Redhat-based system
rpm -i ./dano*.rpm

Installation from Source

For now, dano depends on ffmpeg.

Note: In addition to what your package manager or OS may provide, there are several alternative methods for installing the Rust compiler (rustc) and cargo besides the method described below.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 
cargo install --git https://github.com/kimono-koans/dano.git 
You might also like...
Crate to generate files in ROFF format (Rust)

roffman A crate to generate roff man pages. Usage Add the following to the Cargo.toml: [dependencies] roffman = "0.3" Example use roffman::{Roff, Roff

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.

Command line tool to extract various data from Blender .blend files

blendtool Command line tool to extract various data from Blender .blend files. Currently supports dumping Eevee irradiance volumes to .dds, new featur

fixred is a command line utility to fix outdated links in files with redirect URLs.
fixred is a command line utility to fix outdated links in files with redirect URLs.

fixred fixred is a command line utility to fix outdated links in files with redirect URLs. Installation fixred is installed via cargo package manager.

An ultra-fast CLI app that fixes JSON files in large codebase or folders

minosse An ultra fast CLI app that fixes json files in large codebase or folders USAGE: minosse [OPTIONS] input-dir FLAGS: -h, --help Prints

Print pacman package files

Paccat Print pacman package files Usage paccat [options] targets -- files a target can be specified as pkgname, repo/pkgname, url or file

`nm` and `addr2line` but for DI
`nm` and `addr2line` but for DI "debug-info" COFF files

Summary This is a very simple tool that prints out function, global, and source line information from a .dbg "DI" COFF debug file. This can handle bot

A simple CLI for combining json and yaml files

A simple CLI for combining json and yaml files

CLI and library for uploading files to Arweave.

arloader Command line application and library for effortlessly uploading files to Arweave. Arweave enables you to store documents and applications for

Comments
  • Mistake in documentation?

    Mistake in documentation?

    In --help it says regarding parameter -j: "Default is twice the number of logical cores." Shouldn't it be half, to match the number of physical cores (on most systems)? Using more threads than can be utilized by the system for threading doesn't sound useful.

    documentation invalid question wontfix 
    opened by damian101 1
  • [feature request]: add xxhash hash algorithm

    [feature request]: add xxhash hash algorithm

    According to the benchmarks of xxhash themselves (which can be found on the project github page https://github.com/Cyan4973/xxHash) it's a very fast hashing algorithm. If this speed would translate in dano performance I think it would be nice to have this as an option.

    enhancement 
    opened by sandersantema 4
  • [feature request] Windows version and media tags

    [feature request] Windows version and media tags

    Hi!

    Is there a chance for a Windows version?

    And it would be nice if the checksum was saved into a standard media tag (same as 'title', 'author', etc). If it worked with MKV it'd already be pretty good, no need to support every format. That would make it easier to see the data with other tools and be OS agnostic.

    enhancement good first issue 
    opened by dardoor 2
Releases(0.6.0)
Owner
null
Crates.io library that provides high-level APIs for obtaining information on various entertainment media such as books, movies, comic books, anime, manga, and so on.

Crates.io library that provides high-level APIs for obtaining information on various entertainment media such as books, movies, comic books, anime, manga, and so on.

consumet-rs 5 Aug 13, 2023
A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.

FileQL - File Query Language FileQL is a tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK. Sampl

Amr Hesham 39 Mar 12, 2024
CLI Tool for tagging and organizing files by tags.

wutag ?? ??️ CLI tool for tagging and organizing files by tags. Install If you use arch Linux and have AUR repositories set up you can use your favour

Wojciech Kępka 32 Dec 6, 2022
mdBook is a utility to create modern online books from Markdown files.

Create book from markdown files. Like Gitbook but implemented in Rust

The Rust Programming Language 11.6k Jan 4, 2023
CLI tool to bake your fresh and hot MD files

At least once in your Rust dev lifetime you wanted to make sure all code examples in your markdown files are up-to-date, correct and code is formated, but you couldn't make that done with already existing tools - fear not!

Patryk Budzyński 39 May 8, 2021
The dead easy way to use config files in your rust project

Configr The dead easy way to use config files in your project This will load a config.toml file if it exists, otherwise it will create the needed fold

Carsten Kragelund Jørgensen 4 Jul 1, 2022
miniserve - a CLI tool to serve files and dirs over HTTP

?? For when you really just want to serve some files over HTTP right now!

Sven-Hendrik Haase 4.1k Jan 6, 2023
A cli tool to download specific GitHub directories or files

cloneit A cli tool to download specific GitHub directories or files. Installation From git git clone https://github.com/alok8bb/cloneit cd cloneit car

Alok 54 Dec 20, 2022
Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.

Voila is a domain-specific language designed for doing complex operations to folders & files. It is based on a CLI tool, although you can write your V

Guillem Jara 86 Dec 12, 2022
Tools to encrypt/decrypt and pack/unpack RouterOS v6.13+ backup files

RouterOS-Backup-Tools Tools to encrypt/decrypt and pack/unpack RouterOS v6.13+ backup files Usage examples Info cargo run -- info -i MikroTik.backup D

Marco Grassi 24 Dec 5, 2022