Reputation: 93
If I use Vorbis to encode the same audio source file with the same parameters should expect the two output files to be binary identical? Right now it is not for me, but only in a very small percentage of cases.
Are there any special parameters that are required when setting up the encoder to force it to run in a deterministic-mode?
Thanks
Upvotes: 1
Views: 323
Reputation: 306
For bit-identical reproducible builds, I found via
https://wiki.debian.org/ReproducibleBuilds/OggSerialNumbers
that you have to call oggenc -s $number $input
to override the random serial number in the bitstream.
Upvotes: 0
Reputation: 1232
Yes, but not really. The encoder will usually (always?) be deterministic with the audio data, but may not be deterministic with the metadata and framing. Since Vorbis puts the metadata in the 2nd packet, any changes there will show a binary difference within the first few KB of the file, and could potentially mess with the file's Ogg framing (though that is unlikely).
Your best bet for determining whether the encoder is deterministic is to decode both files and binary-compare the raw audio data for both. If the encoder is deterministic (the decoder pretty much has to be per the spec), they should match exactly.
Upvotes: 0