AV Content Integrity

Peter Bubestinger-Steindl
(p.bubestinger@av-rd.com)

AV Content Integrity

What is that? Where's the difference to file MD5s?

Different level

  • Content = The actual information stored as payload.
  • Hashcode is taken from a normalized form of uncompressed.
  • Matching "pix_fmt".

Scope

  • Video: Each frame = 1 object
  • Audio: Group of samples = 1 object

Use cases

  • Format normalization
  • Rewrap container
  • Transcode
  • Add/edit embedded metadata?

Which target formats support this?

The Tool

  • ffmpeg

Algorithms

  • frameCRC
  • frameMD5

Hashing video

$ ffmpeg -i VIDEOFILE
 -an 
 -f framemd5 
 VIDEOFILE.framemd5

Hashing audio

$ ffmpeg -i VIDEOFILE 
 -vn 
 -filter_complex "asetnsamples=n=96000"
 -f framemd5
 VIDEOFILE.audio.framemd5

Which samplerate to choose here?

Modify the content

Rewrap container

...and add/edit metadata!

$ ffmpeg -i VIDEO_IN
 -c copy 
 -map 0 
 VIDEO_OUT.mkv

-map 0: "re-encode just the video streams, but copy all the other streams (like audio, subtitles, attachments, etc)"

Transcode to FFV1

$ ffmpeg -i VIDEO_IN
 -c:a copy
 -c:v ffv1
 -g 1
 -pix_fmt +
 VIDEO_OUT.mkv

-pix_fmt +: Preserve or die.

Validating framemd5

Framemd5 is actually just a plain textfile...

Content payload
Content payload

Using a diff tool

"Meld is a visual diff and merge tool targeted at developers."

Diff is just one (nice) option: Website: meldmerge.org

Comparing framemd5s

Hashes match, but other (irrelevant) text doesn't:

False-positive mismatch
False-positive mismatch

Adjusting diff filters

Comparing framemd5s

Now they match.
Now they match.

Exercise

Let's go back and actually do all that! :D

RAWcooked

"It's like 'zip-for-filmâ„¢', and super-easy to use!"

Quote Source

Features

  • DPX to FFV1
  • WAV to FLAC
  • Multi reels = multiple tracks
  • Other files: embed as-is
  • 100% reversible.

Website: mediaarea.net/RAWcooked

Exercise

  • Create bag for DPX/WAV sequence
  • Convert bag to RAWcooked FFV1/FLAC/MKV
  • Uncompress back to DPX.
  • Validate bag.

Questions?

Back to index