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: lossless without streaming? (Read 2741 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

lossless without streaming?

Hi,

I'm currently investigating what's out there as for lossless audio compression, for a specific need.

From what I see, most codecs seem to be done with one big restriction: streaming.
It's certainly quite important, but for my need it isn't - I will in any case fully decompress the audio before using it.

I can understand that it's hard to losslessly compress audio, and I don't think we will ever see better ratio's than with what's out there.
-however-, what if you were approaching this another way? Instead of compressing frames individually, what if you were trying to correlate frames with the WHOLE piece of audio (since you don't do streaming, you can know it ahead)?

In short, you'd do cross-correlation between your audio frame & the whole piece of audio, you would then identify near-repetitions, and surely it would mark a lot of similar places that would allow residuals to compress better.

I don't think this would work very well with real recordings. However, for electronic music, I think it may have potential.


Now I know nothing about lossless audio compression, what I'm saying may be a bad idea, may already have been investigated, or already exists - anyone knows of a compressor that would use a similar method?


Edit: I made a quick test. Took a drumloop, repeated it 4x in a wav file. So in theory, this audio file can be compressed down to at least 4x (& then obviously less).
I tried FLAC, Monkey's, WavPack, OptimFrog, none of them could benefit from that.

You may argue that a good encoder should compress any kind of music, but this would just be an extra, it would still be coupled with a classic encoder, so there's nothing to lose, except the ability to stream.
Those 4 loops in a row I tested with is something totally common in electronic music, and very common in some genres. Drums are usually samples repeated over & over so it would work well on them. Synths may use free-running oscillators so repeated riffs may not cross-correlate well, and they may have reverb tails over them. So I think it would vary a lot from a track to another.

 

lossless without streaming?

Reply #1
Ok, I see it has been suggested already:

http://www.hydrogenaudio.org/forums/index....rt=#entry379691


I don't agree with the answers, though. Zip didn't work well with the repeated loop I tested with (probably because of the limited dictionary).

I wonder why no one investigated this since 2006.
As for the speed, there are fast cross-correlation in libraries out there, and GPU's could even help here, they're made for this kind of parallel processing.