Help - Search - Members - Calendar
Full Version: Lossless or transparent multichannel audio
Hydrogenaudio Forums > Digital Audio/Video > Movie/Multichannel audio
zgx
Im playing around with some of the new lossless multichannel formats that Blu-ray and HD DVD uses. LPCM 5.1, Dolby TrueHD and DTS-HD Master Audio.

These formats are hard to play on my PC and I would prefer something more open and flexible with better playback options. I tried to make a backup using FLAC but it seams it only supports 2GB wav/raw files and these files will pass 4GB.

Any idea how I could use FLAC with files this large or do you have a better idea how I should get preferably lossless multichannel audio or at least very transparent audio?

I will probably store the audio in a MKV container.
skamp
WavPack is much better at encoding multichannel and HD audio (96+ kHz - 24 bits), and can be muxed with matroska. Make sure to use the -x switches for large gains in compression.
zgx
QUOTE(skamp @ Mar 4 2007, 14:55) *

WavPack is much better at encoding multichannel and HD audio (96+ kHz - 24 bits), and can be muxed with matroska. Make sure to use the -x switches for large gains in compression.
Thank you Skamp I will give it a try!
zgx
It didn't really work out for me sad.gif.

wavpack -x -h z:\test.wav c:\test.wv

WAVPACK Hybrid Lossless Audio Compressor Win32 Version 4.40.0
Copyright © 1998 - 2006 Conifer Software. All Rights Reserved.

created c:\test.wv in 2014.38 secs (lossless, 71.27%)



- Problem 1: compression ratio

The thing is that the original .wav was 4.351.430.444 bytes and the wavpack file I got was 4.312.098.510 bytes. So hardly any compression at all.

If I make the wave-file smaller I can encode it with FLAC. But I do know that it does not have "WAVE_FORMAT_EXTENSIBLE". I got the .wav by converting a .raw file with sox (sox -r48000 -t .raw -c 6 -w -s test.raw z:\test.wav).


- Problem 2: Playback

The file does play in zoomplayer with a DS filter. But zoomplayer tells me the file is only one and a half minute long but it should be close to two hours.

When I encoded the file it quickly went to 99% after just a few seconds and like a hundred MB then it continued to encode for quite some time until I got a 4GB file and then it went from 99% to 100%.

Something is very wrong here.
shadowking
Give the lossy mode of wavpack a go. Transparency is 5:1 ~ 4:1 PCM rate.

wavpack -x -hb.... z:\test.wav c:\test.wv
zgx
Got it to work with FLAC and WavPack when I encoded in MediaCoder instead of using the command line directly.

FLAC produced the smallest files when using -8 but I'm not sure I got MediaCoder to pass -hhx6 correctly.

Will give the lossy mode of wavpack a try. But are there not better codecs for lossy audio or is wavpack better just for multichannel?
shadowking
Wavpack lossy mode is the only thing that can even cope with some multichannel configs as far as I can tell. Others like aac , vorbis are more efficient with 2 channel when you want good sound at lowest bitrate. Also note that wavpack lossy only adds white noise - no compression 'artifacts'.
bryant
QUOTE(zgx @ Mar 5 2007, 02:31) *

- Problem 1: compression ratio

The thing is that the original .wav was 4.351.430.444 bytes and the wavpack file I got was 4.312.098.510 bytes. So hardly any compression at all.

If I make the wave-file smaller I can encode it with FLAC. But I do know that it does not have "WAVE_FORMAT_EXTENSIBLE". I got the .wav by converting a .raw file with sox (sox -r48000 -t .raw -c 6 -w -s test.raw z:\test.wav).


- Problem 2: Playback

The file does play in zoomplayer with a DS filter. But zoomplayer tells me the file is only one and a half minute long but it should be close to two hours.

When I encoded the file it quickly went to 99% after just a few seconds and like a hundred MB then it continued to encode for quite some time until I got a 4GB file and then it went from 99% to 100%.

Something is very wrong here.
The WAV format can only handle up to 4 gig and your file is slightly over that. What I think is happening is that sox is creating a WAV header with size fields that overflow (because they're 32-bit). This makes it look like a very short WAV with a bunch of stuff afterward. WavPack encodes the audio, then stores the rest uncompressed because it doesn't know it's audio. That would explain all your symptoms.

I think it might work if you added the -i option to your command line. This will cause WavPack to ignore the sizes in the WAV header and encode anyway (the WavPack format itself has a much higher length limit). You might get an error at the end when it tries to generate a WAV header, but I doubt that error would be fatal.

The resulting file will not be unpackable into a valid WAV (because a WAV file can't be that long) but should be playable (assuming the players don't have similar overflows).

I am planning an extension to WavPack to be able to read and write at least one of the new 64-bit WAV variants or raw files, both of which would fix this problem.

BTW, you might want to take off the -x while you're still trying to get it to work. You can always experiment with that once everything is actually working. smile.gif

Hope this helps...

David

zgx
MediaCoder passes the "-i" option to wavpack that's probably why it worked. Thanks everyone!

My test file is 227.334 bytes and Im getting this compression now:

flac 1.1.3 with -8
79.234 bytes

flac 1.1.4 with -8
77.329 bytes

wavpack with -h -x
75.499 bytes

wavpack with -h -x4
74.769 bytes


Wavpack produces smaller files but encoding with -x6 or even -x4 is quite a pain for 4GB+ files.
skamp
It's amazing that we're still coping with filesize limits in 2007…
zgx
Got my channels out of order I noticed. Incorrect L,R,C,BL,BR,LFE order as opposed to L,R,C,LFE,BL,BR.

Hoping that sox can fix it for me.
maxleung
zgx, have you figured out how to decode TrueHD and DTS-HD MA into PCM for later conversion to WavPack/FLAC yet?

As far as I can tell, Sonic Audio Decoder 4.2 doesn't support TrueHD (and probably can't do DTS-HD MA).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.