hash
Hash testing format.
This muxer computes and prints a cryptographic hash of all the input audio and video frames. This can be used for equality checks without having to do a complete binary comparison.
By default audio frames are converted to signed 16-bit raw audio and video frames to raw video before computing the hash, but the output of explicit conversions to other codecs can also be used. Timestamps are ignored. It uses the SHA-256 cryptographic hash function by default, but supports several other algorithms.
The output of the muxer consists of a single line of the form: algo=hash, where algo is a short string representing the hash function used, and hash is a hexadecimal number representing the computed hash.
- 'hash algorithm'
-
Use the cryptographic hash function specified by the string algorithm. Supported values include
MD5
,murmur3
,RIPEMD128
,RIPEMD160
,RIPEMD256
,RIPEMD320
,SHA160
,SHA224
,SHA256
(default),SHA512/224
,SHA512/256
,SHA384
,SHA512
,CRC32
andadler32
.
Command line examples
To compute the SHA-256 hash of the input converted to raw audio and video, and store it in the file 'out.sha256':
ffmpeg -i INPUT -f hash out.sha256
To print an MD5 hash to stdout use the command:
ffmpeg -i INPUT -f hash -hash md5 -
See also the framehash muxer.