Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Wavpack -m (MD5SUM), how to view without full verify? (Read 1100 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Wavpack -m (MD5SUM), how to view without full verify?

Does anyone know how to view the MD5SUM that is used to verify Wavpack files?

I know when encoding or decode (full verify) you can specify the '-m' option and it shows you the MD5 at the end, however there doesn't appear to be a way to just view the MD5 as it is saved on creation. For example with FLAC you can view the MD5SUM with mediainfo, I want to be able to do something like that. I probably have a weird use case for it, but I like to copy the MD5 source values into the tags of lossy transcodes so I can compare files I have to know if they are from the same source, but it would be super slow if I had to full verify each file to get the MD5.

Are there any programs that have this functionality with Wavpack? A bonus if it does FLAC as well.

My other option was to save the MD5 in the tag after encode using a bash script to copy the MD5 out of the stdout, but the non verbose option on the encoder hides the MD5 output so it hard to extract from a script, or is there any Linux tools that can help me with that?

Thanks in advance to anyone who has a solution.

Re: Wavpack -m (MD5SUM), how to view without full verify?

Reply #1
Code: [Select]
wvunpack -s file.wv
will show info about WavPack file including md5 (if it is presented in file, i. e. file was encoded with -m option)

Re: Wavpack -m (MD5SUM), how to view without full verify?

Reply #2
wvunpack also has a -f that is intended for "machine-readable" output. wvunpack -f filename will give you a long list, but to get MD5 only, it is
wvunpack -f7 filename.wv

For FLAC, use metaflac. metaflac --show-md5sum filename.flac or with wildcard like metaflac --show-md5sum *.flac 

But, rather than working at this low level, you can consider to use a player that can read the MD5 and populate a tag with it.
Say, foobar2000, create a tag called "MD5SOURCE" and populate it with %__md5% . The double underscore because it is an info field.
You can even do that without actually writing to the source file. Use the foo_external_tags component, create external tags, do the operation, convert with tags transfer, and then delete the external tags associated with the source files, and fb2k will revert to the file tags.

Re: Wavpack -m (MD5SUM), how to view without full verify?

Reply #3
Awesome, thank you guys, totally missed the -f option in the unpack. Super useful.

Re: Wavpack -m (MD5SUM), how to view without full verify?

Reply #4
Indeed, it works as expected. Not quite intuitive (-i for information, for example), but you can get used to it.

Code: [Select]
$ wvunpack -s sacrifice.original.wv

WVUNPACK  Hybrid Lossless Audio Decompressor  Win64 Version 5.7.0
Copyright (c) 1998 - 2024 David Bryant.  All Rights Reserved.

file name:         sacrifice.original.wv
file size:         2320264 bytes
source:            16-bit ints at 44100 Hz
channels:          2 (stereo)
duration:          0:00:17.00
modalities:        lossless, extra-3
compression:       22.63%
ave bitrate:       1092 kbps
encoder version:   5
original md5:      d0501b5a5ce494d1629e02efcc53c277

$ wvunpack -f7 sacrifice.original.wv
• Join our efforts to make Helix MP3 encoder great again
• Opus complexity & qAAC dependence on Apple is an aberration from Vorbis & Musepack breakthroughs
• Let's pray that D. Bryant improve WavPack hybrid, C. Helmrich update FSLAC, M. van Beurden teach FLAC to handle non-audio data