[FFmpeg-devel] [PATCH 3/8] libavformat/flacdec: Export samples md5 as metadata

Tomas Härdin git at haerdin.se
Wed Feb 12 13:27:06 EET 2025


ons 2025-02-12 klockan 12:14 +0100 skrev Andreas Rheinhardt:
> Tomas Härdin:
> > 
> > 
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > 
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 
> This will forward wrong/outdated metadata if only part of a file is
> copied.

No? lavc/flacenc computes md5 from the actual samples and puts it in
the extradata. If you mean incomplete file copy (cp) rather then ffmpeg
-acodec copy then this will output what the user is likely interested
in: the MD5 of the original data. This allows them to check that the
file decodes correctly. This also applies to incomplete remuxing, which
also won't recompute the MD5 as it is, AFAICT. But, this patch concerns
the demuxer side, not transcoding or remuxing.

> Apart from that, is it really necessary to export the md5 as
> metadata given that it is very easily obtainable from the extradata?

I'm not sure if our users know that. But yes metadata can be dumped and
then cut can be used to extract the MD5. But as Michael points out,
flac isn't the only codec with MD5 hashes.

/Tomas


More information about the ffmpeg-devel mailing list