Skip to main content

Notice

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: Reencode WavPack files (Read 14197 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Reencode WavPack files

Hi,

two short questions:
- Is there an easy way to reencode existing WavPack-files using another (newer) version without losing tags etc. ?
- Would there be any benefits, if I would reencode my WavPack-4.1-files with WavPack 4.2 ?

Thx for any answers.

Reencode WavPack files

Reply #1
Quote
- Is there an easy way to reencode existing WavPack-files using another (newer) version without losing tags etc. ?[a href="index.php?act=findpost&pid=295104"][{POST_SNAPBACK}][/a]


foobar2000 is the easiest one that comes to mind. You can also come up with some sophisticated batch sctipt, since both wvunpack and wavpack.exe support pipes.

Quote
Would there be any benefits, if I would reencode my WavPack-4.1-files with WavPack 4.2 ?


Hardly. Most differences between 4.1 and 4.2 were new features (like tagging from command line) and some encoding/decoding speed improvements. Compression improvements were marginal, if any, and probably wouldn't justify the time wasted recompressing everything.

Reencode WavPack files

Reply #2
[...]You can also come up with some sophisticated batch sctipt, since both wvunpack and wavpack.exe support pipes.[...]
Anyone can point me in the right direction for that please?
I mean: can wvunpack pipe also tags (includign RG values) to wavepack?

EDIT: RG part.
WavPack 5.6.0 -b384hx6cmv / qaac64 2.80 -V 100

Reencode WavPack files

Reply #3
[...]You can also come up with some sophisticated batch sctipt, since both wvunpack and wavpack.exe support pipes.[...]
Anyone can point me in the right direction for that please?
I mean: can wvunpack pipe also tags (includign RG values) to wavepack?

EDIT: RG part.

The WavPack command-line programs do not support automatic copying of tags.

When I want to convert a folder of WavPack files to a different encoding parameter set I do something like this:

Code: [Select]
album_folder\> mkdir temp
album_folder\> wvunpack * temp
album_folder\> wavpack temp\* -d -hx (or whatever)
album_folder\> copytags *.wv temp\*.wv
album_folder\> move/y temp\*.wv .
album_folder\> rmdir temp


This takes advantage of WavPack's ability to use wildcards and the program "copytags" that I wrote to copy all the tags at once. This is usable for a few albums, but if you wanted to do tons I would suggest another route. Someone who knew more about batch files than me could certainly combine it into one command.

Reencode WavPack files

Reply #4
why not just use the convert with the new version of wavpack in foobar??

wouldn't that be 400 times easier?

Reencode WavPack files

Reply #5
why not just use the convert with the new version of wavpack in foobar??

wouldn't that be 400 times easier?

Yeah, foobar would be a lot easier if you wanted to do a bunch of albums. I think this method is just about as easy for one folder, and I do it this way for testing new versions of WavPack (doing a bunch of files in one invocation is a more robust test).

I assumed there was some reason the poster wanted to do it without a GUI.

Reencode WavPack files

Reply #6
When I want to convert a folder of WavPack files to a different encoding parameter set I do something like this:

Code: [Select]
album_folder\> mkdir temp
album_folder\> wvunpack * temp
album_folder\> wavpack temp\* -d -hx (or whatever)
album_folder\> copytags *.wv temp\*.wv
album_folder\> move/y temp\*.wv .
album_folder\> rmdir temp


This takes advantage of WavPack's ability to use wildcards and the program "copytags" that I wrote to copy all the tags at once.
I have previously suggested variations of the following:

FOR /R %%F IN (*.wv) DO (WVUNPACK.EXE "%%F" - | WAVPACK.EXE -hx - "%%~dpnF_new.wv" && TAG.EXE --fromfile "%%F" "%%~dpnF_new.wv")

If you save that as wv-wv.bat and then drag the root folder onto the batch file it will reencode all WV files in the folder or its subfolders.

Note: To use as is you will need WVUNPACK, WAVPACK and TAG in a folder in the PATH, e.g.: system32.

You could improve this by checking that WAVPACK was successful, and then delting the source and renaming the new file to it's parent.  Currently new files will have the same path but have the name "<name>_new.wv".  Dunno, it's proof that it can be done without David's COPYTAGS.EXE app and for subfolders at least.
I'm on a horse.

Reencode WavPack files

Reply #7
Same reasons as Mr. Bryant (for not using a GUI), plus I'm not a foobar user yet.

David, thank you, is the copytags program available anywhere?

Synthetic Soul, thanks, that could do it for me, but will TAG.EXE (or even foobar) do things any differently than WavPack's internal tagging function (like using different [custom] tags maybe?)?
Also, is it safe to copy RG values that way or do different encoding options call for a new analysys?

EDIT: Tags.
WavPack 5.6.0 -b384hx6cmv / qaac64 2.80 -V 100

Reencode WavPack files

Reply #8
Synthetic Soul, thanks, that could do it for me, but will TAG.EXE (or even foobar) do things any differently than WavPack's internal tagging function (like using different [custom] tags maybe?)?
AFAIK TAG will not change the tag names, it should be like for like.  I assume the RG tags are just APEv2 tags and therefore will be copied as per the other tags.

Also, is it safe to copy RG values that way or do different encoding options call for a new analysys?
I would assume that this would only be an issue for lossy files.

NB: I would be interested in a copy of COPYTAGS.EXE as well.
I'm on a horse.

 

Reencode WavPack files

Reply #10
I have posted my humble copytags here:

http://www.wavpack.com/copytags.zip

I originally wrote it to copy ID3v1 tags from mp3's to WavPack files because that was the only way to get them on there. Then I expanded it to APEv2 and it still comes in handy once in a while. The notes mention that source and destination files can have different extensions; they can also have the same extensions but be in different folders (which is for transcoding to the same format). It copies the entire tag (no checking or filtering), won't handle having both types of tags on the same file, and might choke on Unicode characters in the paths/filenames. If anyone can use it, great...

I don't think there is a problem copying RG info between WavPack files, even lossy ones. There is this problem with hybrid files where there are two versions of playback values (lossy and lossless) and yet there is only one set of RG values, but it's never been a problem because the values would normally be very close. I could imagine a case where the "peak" value would be slightly wrong and so a gain might be chosen that would cause a sample to be clipped where it wouldn't be otherwise. This wouldn't be a problem unless the playback engine was also not even checking for clipped samples after gain, and even then the problem would really be in the player and not the WavPack file. I have stopped worrying about this... 

Reencode WavPack files

Reply #11
Thank you so much once more, David!
Just like Matt Ashland says on the links page of the Monkey's audio website:"WavPack.com: an awesome compressor written by an awesome guy"  !

Synthetic Soul, thanks a lot also to you, I'm gonna experiment with your batch file too, using WavPack in debug mode to get a nice log too (no other way to get one, right?).
WavPack 5.6.0 -b384hx6cmv / qaac64 2.80 -V 100