[vorbis] Obtaining tag-independent track uniqueness?
greg at wooledge.org
Mon Mar 11 18:07:47 PST 2002
Tom Wadzinski (twadzins at yahoo.com) wrote:
> Can anyone guide me on whether or not there any way to accomplish the
> same goal with Vorbis using the existing APIs, that is, getting at the
> first x bytes of non-tagging/metadata content of a stream
> One might say, "Why not just put a unique identifier in a tag in each
> file, and not worry about this hash business?"
Because you can't write to the files. You covered that in the part I
> Another might say, "How about decoding the first x seconds, and taking a
> hash of that, to get uniqueness?".
Because MP3 decoding, at least, is nondeterministic. I'm not sure about
Why don't you just hash the first 300 kbytes like giFT does? Then you
can be content-neutral, and your implementation is greatly simplified.
Third-party implementations might even get it right! ;-)
Besides that, imagine I download an Ogg from a P2P network and find that
it's not tagged. I might decide to add at least ARTIST and TITLE tags.
If you hash my tagged version against the original, but ignore the tags,
then you get the same hash for both files. That's no good -- you can't
swarm the file if it's not the same file on both sources.
So, if you skip over some part of the file arbitrarily, you ruin the
whole purpose of making a hash in the first place.
Greg Wooledge | "Truth belongs to everybody."
greg at wooledge.org | - The Red Hot Chili Peppers
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 241 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20020311/822a50a6/part.pgp
More information about the Vorbis