Help - Search - Members - Calendar
Full Version: Dualstream support for MPC
Hydrogenaudio Forums > Lossy Audio Compression > MPC
Lokutus01
Hi people,

I am first of all a big fan of MPC, even if I go lossless for some months, now, because it feels better in sense of archiving the music and listening on high-quality music-systems.

Yesterday, I was checking OptimFrog DualStream and I was realizing, that something like this would fit MPC really nice. Is it possible to extend MPC by Dualstream-capabilities? Imagine, you can download a complete (free) album in MPC format and if you really like it, you can just get the correction file and you have it lossless :-)

I know that the MPC-development is somehow difficult and that the first steps are made at the moment again, so I donīt wanna push someone. I only want to know: Is this possible, or will this never come?

cheers
jimhaddon
QUOTE(Lokutus01 @ Mar 16 2004, 01:50 AM)
Imagine, you can download a complete (free) album in MPC format and if you really like it, you can just get the correction file and you have it lossless :-)

By this I hope you mean something like itunes, listen to it first, and then pay for the correction file? Even so, sort of digging into the realms of illegalness tongue.gif
shadowking
Those correction files are pretty big. Better to download an album lossless in the 1st place as it would be only slightly larger than all of the correction files.

Technicaly I am not sure its possible with MPC since dualstream doesn't really use psychoacoustics ???
seanyseansean
QUOTE(jimhaddon @ Mar 16 2004, 10:29 AM)
QUOTE(Lokutus01 @ Mar 16 2004, 01:50 AM)
Imagine, you can download a complete (free) album in MPC format and if you really like it, you can just get the correction file and you have it lossless :-)

By this I hope you mean something like itunes, listen to it first, and then pay for the correction file? Even so, sort of digging into the realms of illegalness tongue.gif

It's still a good idea. Is there something special about the optimfrog format which lends itself to having a lossless stream added?
Lokutus01
QUOTE
Those correction files are pretty big. Better to download an album lossless in the 1st place as it would be only slightly larger than all of the correction files.


I was making some test-encodings and realized, that OF-DualStream including Correction-Files somehow make the same filesize like FLAC-q8 (even a bit better).

QUOTE
Technicaly I am not sure its possible with MPC since dualstream doesn't really use psychoacoustics ???


This is indeed why I asked: This could be a problem, but is it really? I am sure that one of the decoder-/encoder-developers can tell more about this idea :-)

QUOTE
By this I hope you mean something like itunes, listen to it first, and then pay for the correction file?


for example! ;-)
xmixahlx
QUOTE
I was making some test-encodings and realized, that OF-DualStream including Correction-Files somehow make the same filesize like FLAC-q8 (even a bit better).


probably because optimfrog @ fast seems to be more efficient than flac -8 anyways
Lokutus01
QUOTE(xmixahlx @ Mar 16 2004, 04:52 AM)
QUOTE
I was making some test-encodings and realized, that OF-DualStream including Correction-Files somehow make the same filesize like FLAC-q8 (even a bit better).


probably because optimfrog @ fast seems to be more efficient than flac -8 anyways

definetly (very good shown on http://flac.sourceforge.net). I used the comparision with FLAC only to show, that Dualstream does not has to be bad (OT: FLAC has btw. other advantages).

The question here is: Will this kind of DualStream-Encoding also be possible with MPC (possibly in SV7.5 or 8) once or is it theoretically possible?
Sebastian Mares
I don't think so. AFAIK, hybrid encoders only use energy compression (MDCT) and store the residuals which the transform did not capture - no psychoacoustics.
tigre
QUOTE(Lokutus01 @ Mar 16 2004, 03:34 PM)
The question here is: Will this kind of DualStream-Encoding also be possible with MPC (possibly in SV7.5 or 8) once or is it theoretically possible?

Of course it's possible. Do it manually like this:
Encoding:
Encode to mpc -> decode mpc to .wav -> do a wave substraction original vs. decoded mpc -> encode the result losslessly (lossless audio codec or zip/rar/7z/etc.)
Decoding:
Decode the mpc and the lossless file -> mixpaste both.
I think it's quite easy to code something like this, but probably the lossless compression results won't be as good as wavpack lossy + correction file / optimfrog dual stream. IIRC someone else has tried this before and posted on Hydrogenaudio (maybe with lame mp3 instead of mpc, I can't remember) - anyway, you could try this yourself.
Using sox (free commandline wave editor), mppenc + mppdec + some lossy commandline encoder/decoder, you could even do this automatically using a .bat file / script. Try yourself ... smile.gif
paranoos
I was often curious about this too, so I decided to finally try it out, using tigre's suggestions.

I ripped a track from a CD I own that has a very high bitrate (205kbps using mpc standard) for the purposes of this test.. it's instrumental flamenco music -- guitars, bass, and very mild percussion (just a tambourine maybe).

Here's a synopsis of what i did:

cdparanoia "7" (ripped track 7 from the cd... renamed the file moorea.wav -- the title of the song)
mppenc moorea.wav (encode the wav to mpc)
mppdec moorea.mpc moorea-mpc.wav (decode the mpc back to wav with a new name)
sox -v -1 moorea-mpc.wav moorea-mpc-invert.wav (-v -1 means scale the volume to -1, ie invert the waves)
soxmix moorea-mpc-invert.wav moorea.wav moorea-diff.wav (mix the inverted mpc decode with the original, thus providing the difference between the two sounds into a new file)
flac moorea-diff.wav (encode the difference with flac)
flac moorea.wav (encode the original with flac)

I listened to the diff file, and all i could hear were the higher frequencies of the tambourines. Sounds like the MPC is very close to the original. Even so, compressing the diff file with flac does not yield impressive results. In fact, if you add the size of the mpc and the compressed diff, it's only about 1mb smaller than the compressed original.

Just for fun, I decided to try encoding with mpc --quality 3 (the Thumb profile). While the resulting mpc is about half the size, the compressed diff is even larger than before, although you still save a bit more space. I also tried compressing this diff file with flac -8, with a savings of another couple of megabytes.

Still, not very impressive at all. If I previewed an MPC of a song and ended up liking it, I would rather then buy the original flac rather than spend time joining diff files and such just to save a couple of megabytes of downloading.

A while back, I also tried decoding an mpc and re-encoding it with flac, thinking that perhaps the resulting flac would be fairly close in size to the original mpc. I was wrong (heh this may be very obvious to some of you). The impression I got is that the musepack encoder knows more about what it's throwing away, while the flac encoder is going in blind. Perhaps it is possible to write an mpc encoder that would be able to compress the diff file losslessly much more efficiently because of this. However, this is all speculation. smile.gif
rjamorim
QUOTE(tigre @ Mar 16 2004, 11:10 AM)
IIRC someone else has tried this before and posted on Hydrogenaudio (maybe with lame mp3 instead of mpc, I can't remember) - anyway, you could try this yourself.

It was tried with Vorbis + Flac. And, while it is possible, 1) The inverse-pasting process in audio editors (CoolEdit, SOX) leads to rounding errors, so you won't get the exact same stream after decoding, and 2) using psychoacoustic codecs as base leads to correction files quite larger than the lossless files alone. IIRC David Bryant mentioned that on low bitrates, due to the intense processing done on the signal by the encoder to maintain quality with few bits, the correction file + encoded file would be bigger than the uncompressed WAV file.

Fixing 1) would be easy - just patch the encoder to output the discarded information, that can be piped into a lossless encoder. But 2) wouldn't be so easy, if possible at all.

Also, there's a third issue that when wvunpack finds the correction file in the same folder as the lossy stream, it plays both together as lossless. Currently that's impossible with MPC or Vorbis + correction file.
2Bdecided
That's the basic problem though, isn't it.

Typically...
psychoacoustic lossy file + lossless correction file
...is bigger than...
lossless file

It's easier, and less hassle, and not much bigger (sometimes smaller) to have psychoacoustic lossy file + lossless original file (if you want the lossy/lossless choice).

In essence: the information in a psychoacoustic lossy file isn't a useful basis for building a lossless version (by adding a correction file). It's much better to start with a lossy process which doesn't use psychoacoustics and/or is a sub-set of a lossless process. That's how the lossy+correction codecs work.

Cheers,
David.
Lokutus01
QUOTE(2Bdecided @ Mar 16 2004, 08:39 AM)
In essence: the information in a psychoacoustic lossy file isn't a useful basis for building a lossless version (by adding a correction file). It's much better to start with a lossy process which doesn't use psychoacoustics and/or is a sub-set of a lossless process. That's how the lossy+correction codecs work.

thanks David, this was the answer I was looking for :-)

I see it this way now: Only if in the encoding-process of mpc the correction-file is created, it would make sense, because then the psychoacoustics could be splitted out of the file too for example rolleyes.gif

cheers
Andreas
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.