[FFmpeg-devel] [PATCH 3/8] libavformat/flacdec: Export samples md5 as metadata
Tomas Härdin
git at haerdin.se
Wed Feb 12 15:32:56 EET 2025
ons 2025-02-12 klockan 13:27 +0100 skrev Andreas Rheinhardt:
> Tomas Härdin:
> > 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.
> >
>
> I mean e.g. -c copy -t <whatever>. And even without the -t, this mostly
> pointless metadata will be forwarded by default with your patch and may
> get embedded into other files (as the aiff FATE reference file changes
> show).
Oh yeah good point. But also the incorrect extradata will be carried
over as it is at the moment. That could be fixed of course, but would
involve decoding the copied samples. The nastiness of doing that feels
similar to closed captions in H.26*
> And given that the md5 is wrong for an incomplete file, it does not
> allow the user to check that the file decodes correctly.
Yeah we shouldn't write incorrect data. I think I'll drop this patch
for now and have a back-and-forth with Spotify about it.
/Tomas
More information about the ffmpeg-devel
mailing list