Skip to main content

Topic: Wavpack hybrid rate playback and sweet spot? (Read 7940 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
Wavpack hybrid rate playback and sweet spot?
I have my music collection ripped to wavpack lossless.  I just got myself an Android (Galaxy Note for what it matters) and found the Neutron player which plays wavpack very nicely. Now, i want to move some wavpack files to my android and i have all these large lossless wavpack files.  I'd like to convert them to hybrid files with correction.  The wavpack site states the following about the -c option:

"When WvUnpack is used to restore the .wav file, it will attempt to find the .wvc file in the same directory as the .wv file. If it is found then the decompression will be lossless and will be reported as such, otherwise lossy decompression will be reported (assuming that any information was actually discarded during the original compression)"

1) That tells me that the correction file is used when wvunpack is done. I thought that i could keep the wv and wvc files on my pc for lossless playback and just move the wv files over to the android for lossy playback. Is this so?

2) I've seen some threads of people using -b5 for lossy. The manpage for -bn states a range of 2.0 - 23.9 so that seems really low.  Where is the sweet spot as far as the -bn switch that will not produce any artifacts and still remain portable? I know it's a "depends" question (and i'm avoiding talk of subjective sound quality here) but what are you folks using as command lines for this purpose?

3) I'll be writing a bash script to process all these files (about 10k or so). I assume it's not possible to convert wavpack lossless directly to lossy. I'll have to unpack them to wav and then repack them to wavpack hybrid and reapply all tags. Right?

Thanks all, and thank you Bryant for an awsome file type!
  • Last Edit: 31 May, 2012, 06:10:23 PM by BearcatSandor
Music lover and recovering high end audiophile

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
Wavpack hybrid rate playback and sweet spot?
Reply #1
1) That tells me that the correction file is used when wvunpack is done. I thought that i could keep the wv and wvc files on my pc for lossless playback and just move the wv files over to the android for lossy playback. Is this so?
Right on!

Quote
3) I'll be writing a bash script to process all these files (about 10k or so). I assume it's not possible to convert wavpack lossless directly to lossy. I'll have to unpack them to wav and then repack them to wavpack hybrid and reapply all tags. Right?
I think you’re correct that there is no way to ‘peel’ fully lossless files to lossy+correction, short of de/re-encoding. From there, if you have access to Windows, maybe this will help: http://www.hydrogenaudio.org/forums/index....showtopic=83294
  • Last Edit: 31 May, 2012, 06:16:34 PM by db1989

Wavpack hybrid rate playback and sweet spot?
Reply #2
Copytags, huh? I'll check that out. Thank you. I might be able to run it under Wine.  As to the first part i think i posed the question in a confusing manner.  What i meant was: Can i leave the wv files and wvc files on my pc and get lossless *playback* on it, and just move the wv files over to the android for lossy playback. The website *seems* to suggest that the wcv file is used when decoding back to wav and not for playback.
Music lover and recovering high end audiophile

  • shadowking
  • [*][*][*][*][*]
Wavpack hybrid rate playback and sweet spot?
Reply #3
I would start with -b4 and try to avoid high modes. I think thats the sweetspot.

Generally, -b4x is fast works well. If you have more time, for more security:  -b4x4.. If space isn't a big concern :  -b5x


wavpack -b4x4s1c

  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
Wavpack hybrid rate playback and sweet spot?
Reply #4
Regarding PC playback and correction files, see here.

I agree with shadowking on the use of -b that 4 bits per sample is the sweet spot and you'll probably never hear any artifact. The parameter goes up to [almost] 24 bits, but that's just for completeness...anything over 5.0 is kind of silly, especially with a correction file (the idea is that if you have the correction files somewhere, you might be a little more tolerant of an occasional benign artifact on the portable).

I actually use 384 kbps (which is the equivalent to -b4.35) for archiving stuff in pure lossy mode (no correction file) and have never been sorry.


Wavpack hybrid rate playback and sweet spot?
Reply #5
Thanks again Bryant, i'll take your advice and use around 4-5.

(to the forum i apologise for asking the same question twice in the same month. I've been exhausted lately and forgot i'd read that)
Music lover and recovering high end audiophile

  • skamp
  • [*][*][*][*][*]
  • Developer
Wavpack hybrid rate playback and sweet spot?
Reply #6
3) I'll be writing a bash script to process all these files (about 10k or so). I assume it's not possible to convert wavpack lossless directly to lossy. I'll have to unpack them to wav and then repack them to wavpack hybrid and reapply all tags. Right?


caudec can do that for you if you're running linux:
Code: [Select]
$ caudec -c wvh -q hx1 -b 384 /data/music/artist/album/*.wv


That command will transcode your WavPack files to WavPack Hybrid at 384 kbps with correction files, in parallel (if you have a multi-core CPU and enough RAM), while copying all the tags over. Currently there's a limitation
  • in that you can only specify a bitrate in kbps (24-9600) but that's an oversight that will be corrected in the next release.

    This list of usage examples might also be of interest to you. There's one example in particular that shows how to transcode an entire library while mirroring the directory structure in one fell swoop.

  • fixed in svn
  • Last Edit: 01 June, 2012, 05:29:42 AM by skamp
See my profile for measurements, tools and recommendations.

Wavpack hybrid rate playback and sweet spot?
Reply #7
Thanks. Caudec looks great and i'm working with your example script that you cited to create my own script. However, testing it on one directory i'm seeing:

2 ER 01-rain_on_the_scarecrow.wv
4 ER 03-small_town.wv
3 OK 02-grandma's_theme.wv
1 ER 04-minutes_to_memories.wv
2 ER 05-lonely_ol'_night.wv
4 ER 06-the_face_of_the_nation.wv
3 ER 07-justice_and_independence_'85.wv
1 ER 08-between_a_laugh_and_a_tear.wv
2 ER 09-rumbleseat.wv
3 ER 11-r.o.c.k._in_the_u.s.a._a_salute_to_60's_rock.wv
1 ER 12-the_kind_of_fella_i_am.wv
4 OK 10-you've_got_to_stand_for_somethin.wv

How do i determine what the errors were so i can fix them? Prowling around the wiki and help file i don't see the definition of those codes.

Here's the script:

Code: [Select]
find * -type f -name '*.wv' -exec dirname '{}' ';' | sort -u | while read d;
do
    echo "$d"
    mkdir -p "/mnt/backup/tmp/audio/${d}/artwork"
    cp -a "$d"/*.{jpg,png,gif} "/mnt/backup/tmp/audio/${d}"
    cp -a "$d"/artwork/*.{jpg,png,gif} "/mnt/backup/tmp/audio/${d}"/artwork/
    caudec -o "/mnt/backup/tmp/audio/${d}"  -c wvh -q hx1 -b 384 "$d"/*.wv
done


Thanks!

note: it's not creating the directories correctly, but i'm not asking for help with script debugging. I know this isn't the forum for that.
  • Last Edit: 07 June, 2012, 03:54:20 AM by BearcatSandor
Music lover and recovering high end audiophile

  • skamp
  • [*][*][*][*][*]
  • Developer
Wavpack hybrid rate playback and sweet spot?
Reply #8
Those aren't error codes: the number is just the number of the process, and "ER" simply means an error occured while encoding ("DC" would mean an error occured while decoding).

One limitation caudec has, is that it doesn't work on files that have tag entries that span multiple lines.
If that's not the case with the files that are causing errors, could you please upload one of them somewhere (Dropbox or whatever) and PM me the URL?

Edit: the multiline bug occurs when transcoding from FLAC to FLAC and WavPack to WavPack. A quick fix is available in svn, which prevents caudec from failing, but multiline tags are still not copied over properly.
  • Last Edit: 07 June, 2012, 04:57:49 AM by skamp
See my profile for measurements, tools and recommendations.

  • skamp
  • [*][*][*][*][*]
  • Developer
Wavpack hybrid rate playback and sweet spot?
Reply #9
note: it's not creating the directories correctly, but i'm not asking for help with script debugging. I know this isn't the forum for that.


Swing by #hydrogenaudio on Freenode (IRC), I can help you with that. I might not be immediately available during the next couple of days though.
  • Last Edit: 07 June, 2012, 05:12:56 AM by skamp
See my profile for measurements, tools and recommendations.

  • skamp
  • [*][*][*][*][*]
  • Developer
Wavpack hybrid rate playback and sweet spot?
Reply #10
I don't know if that was your problem, but the multi-line bug should be fixed in svn, though I need to do some more testing to make sure. You can get the latest svn revision with the following command:
Code: [Select]
svn checkout http://caudec.googlecode.com/svn/trunk/ caudec-read-only
See my profile for measurements, tools and recommendations.

Wavpack hybrid rate playback and sweet spot?
Reply #11
I removed the lyrics (multiline) tags from these files and still get the same error, even with your svn version. I'll PM you with more info.  Thanks for all the help!
Music lover and recovering high end audiophile

  • shadowking
  • [*][*][*][*][*]
Wavpack hybrid rate playback and sweet spot?
Reply #12
I did some more tests lately. I actually find bps in increments of 0.5 more convenient over MPEG bitrates. -b3..3.5..4..4.5  are very useful options when wanting to adjust quality . Bitrates are : 270..310..350..390

Using very high compression settings allow one to use much lower bitrate. I tried -hhx5 and had good results on critical samples using -b3.5 . -b3 was inferior but is expected to perform well when not caring for such samples.

Also the -l switch is pretty useful as it runs wavpack in low priority if you want a slow setting.
wavpack -b4x4s1c

  • shadowking
  • [*][*][*][*][*]
Wavpack hybrid rate playback and sweet spot?
Reply #13
This is something to consider if using hybrid LOSSLESS mode on the PC / notebook. The most dramatic increases are from 200k ~ 300k.  For portable playback you may face a dilemma. Going too high (384 + k) you will enter a gray area between lossy and lossless compression and the portability aspect can diminish somewhat. Going too 'low' <=250k may diminish quality for some listeners.  300k IMO presents a spot where filesize is still comparable to typical 256~320 encodings and quality is usually perfect on normal music like the other encoders.  Also quality / compression can be improved without affecting decoding speed using: -b300x4c
  • Last Edit: 05 December, 2015, 07:21:11 AM by shadowking
wavpack -b4x4s1c

  • DARcode
  • [*][*][*][*][*]
  • Members (Donating)
Wavpack hybrid rate playback and sweet spot?
Reply #14
When we have David and shadowking talking about WV lossy you know I have to chime in ;-] .

I don't have their champagne hearing, but following their advice both I've been super happy with -b384hx6c both at home on PC/media player and out and about on DAP/Android smartphone for years.
  • Last Edit: 25 December, 2015, 03:59:08 AM by DARcode
WavPack 4.80.0 -b384hx6cmv / qaac 2.59 -V 100