[FFmpeg-user] Verifying lossless rewrapping/transcoding in one step?

Peter B. pb at das-werkstatt.com
Tue Aug 6 00:12:23 EEST 2019

Hi Paul!

On 05/08/2019 16:25, Paul B Mahol wrote:
> On Mon, Aug 5, 2019 at 4:16 PM Peter B. <pb at das-werkstatt.com> wrote:
>> [...]
>> For example, instead of "CRC32=...." let's say:
>> "v:0:CRC32=...
>> v:1:CRC32=...
>> a:0:CRC32...
>> a:1:CRC32...
>> a:2...
>> "
> Hash muxer does not work like that.

Oh :(

> Why would you need hash muxer for multiple streams?

Because I want to verify that every stream was transferred losslessly
from source to target.
For both: audio and video.
(and actually also non-AV tracks, any time-based metadata, etc)

> You can use several maps to produce hash of more stream at once, each output directed to separate file.
> ffmpeg.exe -i fate-suite/mxf/C0023S01.mxf -vn -map 0:1 -f framecrc
> first_audio_stream.framecrc -map 0:2 -f framecrc
> second_audio_stream.framecrc


However, that's what I'm already doing (-f hash), but I'm writing for
fully-automated transcoding scenarios, so I need to parse the source
file to know how many streams (of which type), and then have another
part that puts together the right commandline recipe, and then write
code that generates names for each stream-hash output file, and then,
and then I need to keep track of all these files, and then ...

And I believe I'm neither the first nor the last person to write code
for automating this.
So I thought: wouldn't it be great to find a nicer way of validating
"output-fidelity"? :)

Any ideas?

What I don't understand:
If the hash muxer output can generate a single hash for the sums of all
streams, I presume it has access to all streams. Since it can also
output individual hashes to individual files, why isn't it possible to
do the same, but store the hashcodes in variables (associated with their
source stream), and then write that information in one single file?

I like puzzles :)
Thank you very much in advance!

Peter B.

More information about the ffmpeg-user mailing list