From c88008a68f2bf95b591acd20fa37070ca21741ba Mon Sep 17 00:00:00 2001 From: Peter Bubestinger-Steindl Date: Mon, 4 Nov 2019 22:55:07 +0100 Subject: [PATCH 1/2] Added "streamhash" recipe. --- index.html | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/index.html b/index.html index 8bae9ae..4116073 100644 --- a/index.html +++ b/index.html @@ -1997,6 +1997,47 @@ + + + +
+
Get individual checksums for all video/audio streams ("Streamhash")
+

ffmpeg -i input_file -map 0 -f streamhash -hash md5 - -v quiet

+

+ The outcome is very similar to that of "-f hash", except you get one hash + per-stream, instead of one (summary) hash. Another benefit is that you + don't have to know which streams, or how many to expect in the source + file. This is very handy for hashing mixed born-digital material. +

+

+ This script will perform a fixity check on all audio and video streams in + the file and return one hashcode for each one. This is useful for e.g. + be able to change to container/codec format later on and validate it + matches the original source. +

+

+ The output is formatted for easily processing it further in any kind of + programming/scripting language. +

+
+
ffmpeg
starts the command
+
-i input_file
path, name and extension of the input file
+
-map 0
map ALL streams from input file to output. If you omit this, ffmpeg chooses only the first "best" (*) stream: 1 for audio, 1 for video (not all streams).
+
-f streamhash -hash md5
produce a checksum hash per-stream, and set the hash algorithm to md5. See the official documentation on streamhash for other algorithms and more details.
+
-
FFmpeg syntax requires a specified output, and - is just a place holder. No file is actually created. Choose an output filename to write the hashcode lines into a textfile.
+
-v quiet
(Optional) Disables FFmpeg's processing output. With this option it's easier to see the text output of the hashes.
+
+

+ The output looks like this, for example (1 video, 2 audio streams): + + 0,v,MD5=89bed8031048d985b48550b6b4cb171c + 0,a,MD5=36daadb543b63610f63f9dcff11680fb + 1,a,MD5=f21269116a847f887710cfc67ecc3e6e + +

+
+ + From db330a3a0c167920bdcd11b9aecc0bff772147cb Mon Sep 17 00:00:00 2001 From: Peter Bubestinger-Steindl Date: Tue, 5 Nov 2019 08:41:19 +0100 Subject: [PATCH 2/2] Indent

inwards and add missing

. --- index.html | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/index.html b/index.html index 4116073..50b11bb 100644 --- a/index.html +++ b/index.html @@ -2003,22 +2003,16 @@
Get individual checksums for all video/audio streams ("Streamhash")

ffmpeg -i input_file -map 0 -f streamhash -hash md5 - -v quiet

-

- The outcome is very similar to that of "-f hash", except you get one hash +

The outcome is very similar to that of "-f hash", except you get one hash per-stream, instead of one (summary) hash. Another benefit is that you don't have to know which streams, or how many to expect in the source - file. This is very handy for hashing mixed born-digital material. -

-

- This script will perform a fixity check on all audio and video streams in + file. This is very handy for hashing mixed born-digital material.

+

This script will perform a fixity check on all audio and video streams in the file and return one hashcode for each one. This is useful for e.g. be able to change to container/codec format later on and validate it - matches the original source. -

-

- The output is formatted for easily processing it further in any kind of - programming/scripting language. -

+ matches the original source.

+

The output is formatted for easily processing it further in any kind of + programming/scripting language.

ffmpeg
starts the command
-i input_file
path, name and extension of the input file
@@ -2027,13 +2021,12 @@
-
FFmpeg syntax requires a specified output, and - is just a place holder. No file is actually created. Choose an output filename to write the hashcode lines into a textfile.
-v quiet
(Optional) Disables FFmpeg's processing output. With this option it's easier to see the text output of the hashes.
-

- The output looks like this, for example (1 video, 2 audio streams): +

The output looks like this, for example (1 video, 2 audio streams): 0,v,MD5=89bed8031048d985b48550b6b4cb171c 0,a,MD5=36daadb543b63610f63f9dcff11680fb 1,a,MD5=f21269116a847f887710cfc67ecc3e6e - +