Skip to main content
Topic: How to properly pack DSF files into WavPack? (Read 2344 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to properly pack DSF files into WavPack?

Hello!

I recently started to rip some of my SACDs. The process alone was a pain in the butt... At least my age old PS3 had some use again...
After this I used iso2dsd to rip my iso into dsf tracks.

Anyway. I am at the point where I would like to pack them into WavPacks. I could also just use the DSF files but I doubt that most of my audio devices could playback this. Ok, not sure if WavPack is much better.

The thing is that WavPack seems to be the only thing that can do it without any transcoding or quality loss. I wanted to go with Flacs at the beginning but after learning about the differences with PCM and DSF, blabla, I guess this is a bad idea since I want no quality loss.

I converted one of my dsf tracks to WavPack in Foobar 2000 1.4.2 but I am not sure if I did everything correct. My source dsf file is a 6 channel, DSD64, 16934kbps, 2822400hz file. But when foobar2000 is done with converting, its telling me it has a sample rate of only 44100hz and bitrate of 3929kbps...

I am really confused now. Is this supposed to be like that? Or is Foobar2000 doing something wrong?

Would be nice to get some wisdom here. ^^

Re: How to properly pack DSF files into WavPack?

Reply #1
It's not really wrong, but what Foobar2000 is doing is not what you want. It can only handle PCM internally, so your DSF file is being decoded into PCM before being encoded as a PCM WavPack file...definitely not what you want if you don't want to lose quality (even in theory).
 
I also have a collection of SACDs that I am in the process of ripping to digital. I don't use a PS3, but instead use an Oppo SACD player that can achieve the same thing.

Unfortunately, the only way I know of to convert from DSF (or DFF) to WavPack is to use the wavpack command-line program. You can use the --import-id3 option to bring in the metadata as well, which is handy.

What I have been doing instead is similar, but I use sacd_extract to convert the ISO image into what the program calls a DSDIFF edit-master, which is basically a DSD image file with cuesheet, and these can be either the stereo version or the multichannel version (if the disc has one). Once you have that you can create a whole-disc WavPack DSD file that includes the cue-sheet with a single command, and Foobar 2000 works great with these. For example, I can convert to individual FLAC 16/44 6-channel files for each track, which lots of devices can play (including the Oppo) while keeping the WavPack file as the master.

Here's an example command to do the conversion from the DFF file to the WavPack file, including the cuesheet and cover art:

$ wavpack -hm -w "Cuesheet=@example.cue" -w "Artist=Example" -w "Album=Self" -w "Year=1975" -w "Genre=Rock" --write-binary-tag "Cover Art (Front)=@example.jpg" example.dff
 

Good luck!

Re: How to properly pack DSF files into WavPack?

Reply #2
Or is Foobar2000 doing something wrong?

Yes.

Lossless conversion is only possible if the target format actually can contain the source stream.
If it can not, then fb2k will do a lossy conversion, and - here is the wrong thing - it does not warn you.

High Voltage socket-nose-avatar

Re: How to properly pack DSF files into WavPack?

Reply #3
Damn. I really suck at the command line. I was trying it for a hour now but its not really working and CMD either complains about some unknown argument or just opens the file in some player. I must do something wrong with the command. I dont need tags transferred at all. I just want the dsf file packed as unchanged wv file. Should be simple, no? Also tried to do it with this WavPack User Documentation but still doesn't work. What does the -hm option do? Not explained in the documentation. -w is just for writing, no?

I used C:\Audio\wavpack-5.1.0-x64>wavpack 1.dsf - 1.wv

I tried several other concelations too but it just doesn't work. The source dsf files are just named 1,2,3,etc. And they should just be put into unchanged wavpack files in the same directory with the same name but wv as ending. I also dont have any cuesheets or tags. All tracks are in own files. Should be really simple I guess... I do want maximum compression though. For that I need a option. But first I wanna get a wv output at all...

I feel really dumb.

Re: How to properly pack DSF files into WavPack?

Reply #4
Yes, the command-line can be confusing if you don't use it often. But yes, simply converting a DSF file to a WV file should be easy.

The -hm option is actually two options (-h and -m) because they can be combined like that as a shortcut (I probably should not have done that here). The -h is for the "high" compression mode (which you want) and -m puts an MD5 checksum on the file (which certainly does not hurt). The -w has to do with tagging (i.e., the next parameter specifies a metadata pair) so you don't need that.

It's not exactly clear from what you show in your post which is the part you typed and which part is the prompt displayed by the system, but assuming you were in the folder "C:\Audio\wavpack-5.1.0-x64" and you typed "wavpack 1.dsf - 1.wv" then I can see that that would not work.

The correct command there for what you want would simply be:

wavpack -h 1.dsf

You don't need to put in the output name because wavpack will do that for you (it will make 1.wv). But this assumes that the wavpack.exe file and the DSF files are all in that folder. If the DSF files are somewhere else then wavpack can not find them. An alternative way is to be in the folder with the DSF files you want to convert and type:

C:\Audio\wavpack-5.1.0-x64\wavpack.exe -h 1.dsf

This way you don't have to be moving files all the time, but that might be easier for you.

Finally, not to confuse you more, but you can use wildcards in the command to do all the files at once:

wavpack -h *.dsf

Hope this helps...  :)

Re: How to properly pack DSF files into WavPack?

Reply #5
Does -x6 help with dsf files?  I would definitely use -m, non-checksummed formats are retarded.

So,
wavpack -hx6 -m *.dsf
High Voltage socket-nose-avatar

Re: How to properly pack DSF files into WavPack?

Reply #6
Actually, for DSD files there are only two compression modes ("normal" and "high"), so the extra modes don't do anything. The lossy modes or setting joint stereo are also out.

I always use -m to put an MD5 sum on the file, although it's really not necessary to verify the integrity of the files because WavPack has block checksums by default (and starting with version 5.0 there are checksums on both the uncompressed and compressed data). What's really nice about the MD5 sum is that you can compare versions of files that you think are the same (i.e., it's kind of a fingerprint).

Re: How to properly pack DSF files into WavPack?

Reply #7
Oh wow, that did the trick! Thanks for the fast help. I assumed you have to specify a output file name but oh well. Worked flawlessly now.

Thanks for the friendly and extensive help! :)

Re: How to properly pack DSF files into WavPack?

Reply #8
Actually, for DSD files there are only two compression modes ("normal" and "high"), so the extra modes don't do anything. The lossy modes or setting joint stereo are also out.

I always use -m to put an MD5 sum on the file, although it's really not necessary to verify the integrity of the files because WavPack has block checksums by default (and starting with version 5.0 there are checksums on both the uncompressed and compressed data). What's really nice about the MD5 sum is that you can compare versions of files that you think are the same (i.e., it's kind of a fingerprint).

I use this command with Ubuntu after I open the terminal in the folder where I keep the files dsd "wavpack -h --import-id3 * .dsf", I'm missing something? In this way I get the wv without loss, right? What would the option for the MD5 be and what should I use the -m option in my command?
Thank you

Re: How to properly pack DSF files into WavPack?

Reply #9
In this way I get the wv without loss, right?

Yeah. The "-m" - and "-v" - will "fingerprint" as bryant calls it, and check that everything went as should. It will not make it any more lossless, but it can scream at you if a file gets corrupted.

-m will write an MD5 checksum field. -v will, when the file is completed, decode it and check that it actually matches the MD5. (As bryant points out, Wavpack internally uses more checksums than that.)
Both take a little bit more time, so it is more for storing permanent copies than for "fiddling back and forth" - but if you only want to check syntax etc., you will not want to wait for -h either, unless that is precisely what you want to test.
To get it all: Replace "-h" by "-hmv".
High Voltage socket-nose-avatar

Re: How to properly pack DSF files into WavPack?

Reply #10
All my DSDs I have always encoded them with the command I wrote above with -h, sorry but I can not figure out what are the advantages of using -hmv instead of -h, I tried doing one using -hmv and encoding it's slower .....
Thank you

Re: How to properly pack DSF files into WavPack?

Reply #11
sorry but I can not figure out what are the advantages of using -hmv instead of -h, I tried doing one using -hmv and encoding it's slower .....

Yes. What it does in addition, is
calculate a checksum and write it to the file
decode your just-encoded file
verify that it matches the checksum.

It is just for verification - and of course it takes time. It does not change the file, other than storing the checksum.
High Voltage socket-nose-avatar

Re: How to properly pack DSF files into WavPack?

Reply #12
Forgive my ignorance but the checksum what is it for? What exactly does it do, a file without checksum is not good?
Thank you

Re: How to properly pack DSF files into WavPack?

Reply #13
A file without a checksum is fine. Otherwise I would not have made it optional.

A checksum is kind of a fingerprint for the file so that you could verify that the file is still perfectly decoded. Or you could use it to compare to another file that might (or might not) be identical.

But for just playing the files you don't need a checksum. And WavPack will detect if your file has been corrupted somehow even without a checksum (it uses checksums for each block).

If you really wanted to you could use the wavpack command-line program to re-encode your files and add a checksum, but there is really no good reason to do that.

Re: How to properly pack DSF files into WavPack?

Reply #14
I do not think I'll do it but just to know, what command should I give to add the checksum to my already transformed files in wv?

Re: How to properly pack DSF files into WavPack?

Reply #15
Assuming your WavPack files are using the "high" mode, the command would be:

wavpack -hym filename.wv

Keep in mind that there's no way to actually "add" the checksum; this command decodes and re-encodes the entire file. So the result is the same as just adding the checksum, but it's slow.

You could also verify at the same time by adding a "v" to the options, but then it would be even slower:)

Re: How to properly pack DSF files into WavPack?

Reply #16
However, I'm a little worried because I turned so many of my dsd from dsf to wv but I can only read them with Foobar (which is the program that I've always used) thanks to the Super Audio CD Decoder plugin https://sourceforge.net/projects/sacddecoder / because I see that the project is in a state of abandonment, I hope that does not happen that the support ends and I will have to report all the wv to dsf .....

Re: How to properly pack DSF files into WavPack?

Reply #17
I turned so many of my dsd from dsf to wv but I can only read them with Foobar (which is the program that I've always used) thanks to the Super Audio CD Decoder plugin https://sourceforge.net/projects/sacddecoder / because I see that the project is in a state of abandonment, I hope that does not happen that the support ends and I will have to report all the wv to dsf
Since version 1.3.13 foobar2000 has native support for playback of  WavPack-DSD (with decoding to pcm) without any additional components.

Re: How to properly pack DSF files into WavPack?

Reply #18
Yeah, that is another reason why you should use WavPack for these files: a reasonably well supported format that does a good job AND supports the essential features: tagging, error detection, ... is it fair to say that WavPack is virtually unrivalled for the purpose?
[I edited "usual features" to "essential features" because ALAC-in-MP4 is too retarded to be checksum-aware ...]

Also, fb2k can - by way of some component - resample on-the-fly in case you use digital output to a device that does not support that sample rate.
High Voltage socket-nose-avatar

Re: How to properly pack DSF files into WavPack?

Reply #19
In fact I'm using Wavpack for my DSD and I feel great, too bad it is not supported by all players such as VLC .....
To resample in PCM Foobar does not need the component sacd decoder?

Re: How to properly pack DSF files into WavPack?

Reply #20
Right. The purpose of the sacd component is to allow playback of DSD files directly to your DAC without any conversion to PCM (assuming you have a DAC that does that). Without the sacd component Foobar does a fine job of playing DSD files through a PCM conversion.

One of the projects I want to get to soon is add support for DSD decoding in FFmpeg. That will hopefully result in more applications supporting WavPack DSD.

 

Re: How to properly pack DSF files into WavPack?

Reply #21
In fact I have a dac compatible with the dsd and I reproduce them in a native way, so if I did not use the component sacd decoder Foobar reproduces them automatically in pcm? That's where you go to set, right?


 
SimplePortal 1.0.0 RC1 © 2008-2019