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 AAC? (Read 86903 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Lossless AAC?

Reply #75
Quote
There may be no way to play the Apple Lossless file without a gap (iTunes and iPod), but it is gapless if converted back to WAV and it matches an md5 of the original WAV.

Indeed, the latter pretty much sums up what lossless audio is all about, but Speek's already found out that WAV->Apple Lossless->WAV conversion is not lossless.

Lossless AAC?

Reply #76
Quote
Out of curiosity, what would be the advantage of wrapping any lossless codec in FairPlay? Once decoded to WAV, or burned to a CD (both of which should be quite simple) the WAV could be re-compressed to any other lossless format, sans DRM.

You're absolutely right - Nothing, in that sense.

Now lets all hope that the entertainment industry does not allow that to hinder the availability of lossless files online, I think most people would be willing to pay for the extra bandwidth used (or whatever, just a slightly higher fee)

No point rolling iTunes out around the world until that happens though, cuz i won't use iTunes as it is.

Lossless AAC?

Reply #77
Isn't it about time this topic were moved to the Lossless Codecs forum? Administrators, I'm looking in your direction 

Lossless AAC?

Reply #78
Quote
Thanks kl33per. QuickTime Pro does the decoding job. But it seems to me there's a bug. Decoded files are some frames shorter than the original WAVE file. I've tested this with EAC's 'WAV compare' tool. Can someone confirm this?

There seems to be a bug in iTunes for Windows. Even if I compare a file "converted" from WAV to WAV using iTunes, EAC reports a difference with the original. I think the Apple Lossless step is redundant, that happens with any codec.

Lossless AAC?

Reply #79
Quote
Quote
Did you try the "Handy Concept for Concept Rock" described here :
http://www.apple.com/itunes/import.html

I don't really know if it helps, or how it works (I can't test for the moment). Does it work on import only? Does it also work with lossy encodings (with gaps/silent frames)?

Yes, it only works on import, and it's quite stupid. Basically it merges several tracks into a single file, and you can see the limitations that would imply.

Thank you for this precision. Highly innovative system from Apple 


Lossless AAC?

Reply #81
True. But the players must then support the chapter system. Otherwise, fastseeking on 1h30 just to hear the final Arien of a Wagner Opera need stoic virtues.

 

Lossless AAC?

Reply #82
WAV->Apple Lossless->WAV conversion IS lossless, open a WAV in iTunes, select the ALAC importer, import into ALAC. Then select the WAV importer, import the ALAC file into WAV. Do a comparison on the files (unix 'cmp' or whatever) and they will be identical. Maybe this is an issue with decoding through QuickTime Player?

[Edit]
Ran through a lot more test samples... apparently even decoding by iTunes sometimes generates some differences. However this is not the case in ALL files... probably a bug then...
[/Edit]

Lossless AAC?

Reply #83
Quote
WAV->Apple Lossless->WAV conversion IS lossless, open a WAV in iTunes, select the ALAC importer, import into ALAC. Then select the WAV importer, import the ALAC file into WAV. Do a comparison on the files (unix 'cmp' or whatever) and they will be identical.

Sounds nice, glad to see a supporter of this new lossless format for a change. But I notice your writing they will be identical. Does that mean you haven't tested it yourself?

Quote
Maybe this is an issue with decoding through QuickTime Player?

Dunno. Haven't been able to try it out myself. I'm just basing my judgment on others' findings. I'm eagerly awaiting more test results.

Lossless AAC?

Reply #84
Quote
Ran through a lot more test samples... apparently even decoding by iTunes sometimes generates some differences. However this is not the case in ALL files... probably a bug then...

OK then. Lossless it is... for now

Lossless AAC?

Reply #85
I've just tried a WAV -> ALE -> WAV encoding process. According to foobar2000 bit-to-bit comparison tool, there are no difference between the original file and the final one.

Quote
INFO (foo_bitcompare) : no differences in decoded data found
INFO (foo_bitcompare) : finished successfully


But it doesn't mean than iTunes is able to produce gapless playback with lossless files (I didn't tried).

Lossless AAC?

Reply #86
Quote
I've just tried a WAV -> ALE -> WAV encoding process. According to foobar2000 bit-to-bit comparison tool, there are no difference between the original file and the final one.

Right. Although Speek did end up with some different results. Probably due to a bug in iTunes, as jido and c15zyx already pointed out.

Lossless AAC?

Reply #87
Quote
Right. Although Speek did end up with some different results. Probably due to a bug in iTunes, as jido and c15zyx already pointed out.

A similar question came up on the FLAC forum a while ago and Josh pointed out that FLAC losslessly encodes the *audio*, not entire WAV files. If the audio is the same then there is no issue or bug. What exactly are these tools (cmp etc.) comparing?

Lossless AAC?

Reply #88
Quote
A similar question came up on the FLAC forum a while ago and Josh pointed out that FLAC losslessly encodes the *audio*, not entire WAV files. If the audio is the same then there is no issue or bug. What exactly are these tools (cmp etc.) comparing?

cmp compares two files for any difference. You are correct in saying that preservation of audio is what is important and not differences in headers or whatnot. For example decoding to AIFF and WAV will make this comparison invalid.

However if you use a encode a WAV and decode back to WAV you should get identical files. I already checked this is iTunes by importing the WAV to another WAV before encoding and comparing the decode to both, in case QuickTime or iTunes was doing something strange with the files. I'll have to do a comparison of the raw data sometime later. FB2k probably does this, but I'm not on windows.

Lossless AAC?

Reply #89
Quote
I am a bit confused.
I tried the "Apple Lossless" codec with a CD from my collection: "Arabian Waltz", from Rabih Abou-Khalil. The album was compressed to less than half the size of the original.

Are lossless codecs particularly fond of jazzy strings? I would expect a little more than half the size of the original...


I don't know about Jazz, but lossless tends to be quite good at most classical music, too. It sometimes compresses up to 30% of the uncompressed size and quite often at 50% or less.

EDIT: Argh, crap! Didn't realize the post I was replying to was in the first page of four. I guess this doesn't make much sense now. Added the quote in order not to appear so stupid. Heh.

Lossless AAC?

Reply #90
making sure an implementation of a lossless codec is really lossless is harder than it sounds.  unless you formally prove the correctness of an algorithm (which is practically impossible) you have to rely on tests.  that's how the FLAC test suite early on grew to be so large.  it is full of many kinds of samples designed to find bugs in a codec.

is there a command-line ALAC program?  it would be interesting to run it through the FLAC test suite.  when I have tried it on other coders it sometimes produces interesting results.  managed to crash a version of MAC.exe with one (I think mac 3.96, haven't tried it on later versions).

Josh

Lossless AAC?

Reply #91
I encoded a wave file with itunes to apple lossless, and decoded it again to wav.  The original and the decoded were identical (or diff said they were anyhow).  Here's some times I posted in the arstechnica forums (the song was the Overture of Carmen, all the flacs had verification enabled):
ALAC 18350KB 12secs
FLAC level 8 18396KB 36secs
FLAC level 4 18492KB 10secs
FLAC level 0 19534KB 4.5secs

EDIT: Corrected the ALAC size

Lossless AAC?

Reply #92
Quote
ALAC 18350KB 12secs
FLAC level 8 18396KB 36secs
FLAC level 4 18492KB 10secs
FLAC level 0 19534KB 4.5secs

Was that on a PC or a Mac?

Lossless AAC?

Reply #93
Quote
Quote
ALAC 18350KB 12secs
FLAC level 8 18396KB 36secs
FLAC level 4 18492KB 10secs
FLAC level 0 19534KB 4.5secs

Was that on a PC or a Mac?

Oops, forgot to metnion that. PC.  I have an Athlon XP 1600+ paly.

Lossless AAC?

Reply #94
Did some more testing...

Sometimes 2 wav files will differ within the first few bytes (header?).
In this case if I import the wav to another wav using iTunes and use this new file to compare to the decoded ALAC, the wav files differ as pcm does below.

Exporting the decoded and original files to pcm (using sndfile-convert to export to .raw) I have found that in all the samples I've tested, the difference occurs at the very end... the differing byte as reported by cmp is at the end of the file.

Hope that was informative in some way.

Lossless AAC?

Reply #95
Quote
Did some more testing...

Sometimes 2 wav files will differ within the first few bytes (header?).
In this case if I import the wav to another wav using iTunes and use this new file to compare to the decoded ALAC, the wav files differ as pcm does below.

Exporting the decoded and original files to pcm (using sndfile-convert to export to .raw) I have found that in all the samples I've tested, the difference occurs at the very end... the differing byte as reported by cmp is at the end of the file.

Hope that was informative in some way.

made about 10 tests on a mac from different shn or flac files to wav to apple lossless m4a back to wav. both wav files were exactly the same in size and comparing them with shninfo and shncmp, number of frames also identical...

encoding speed from HD is about 32x, decoding speed slightly faster at 34x (867MHz G4)

Lossless AAC?

Reply #96
Quote
Quote
The part I'm interested is Lossless AAC encoding. I hadn't even heard of this until now. Does anyone have any info on it and how it compares to other lossless encoders?

There is no such thing, unfortunately.

What exists is MPEG4 ALS (Audio Lossless Coding), which was mostly developed by the same author of LPAC
http://www.nue.tu-berlin.de/forschung/proj...s/mpeg4als.html

But, as far as I know, standardization is still going on for this project. I don't think Apple would use it before being ready.

The other alternatives would be a proprietary codec developed by Apple that they call "Lossless AAC", or they are going to sell high bitrate standard AAC files and claim they are lossless (highly unlikely too).

I can't imagine what else could be going on.

Of course, another alternative would be that this "leakage" is partially fake or erroneous.

Edit: Didn't you see, by any chance, any hint about when iTunes 4.5 will be released?

There is another standardization activity in MPEG which is called MPEG-4 scalable lossless (SLS).  It offers more functionalities than a usual lossless coder like FLAC.  For example, a AAC bit-stream can be extracted from a Lossless SLS bit-stream (not transcode, but simply drop some portion of the bit-stream so it is prety fast).  And it also allow you to extract a bit-steam at any bit-rate between AAC and lossless from the SLS bit-stream.  In this sense you may call it lossless AAC 

Unfortunately it is not the one used in iTune though.

Lossless AAC?

Reply #97
Quote
There is another standardization activity in MPEG which is called MPEG-4 scalable lossless (SLS).  It offers more functionalities than a usual lossless coder like FLAC.  For example, a AAC bit-stream can be extracted from a Lossless SLS bit-stream (not transcode, but simply drop some portion of the bit-stream so it is prety fast).  And it also allow you to extract a bit-steam at any bit-rate between AAC and lossless from the SLS bit-stream.  In this sense you may call it lossless AAC  

Unfortunately it is not the one used in iTune though.

is there already someone working on this?
the last thing i read was "while further investigating hierarchical methods"

is this method somehow comparable to bitrate peeling?
I know, that I know nothing (Socrates)

Lossless AAC?

Reply #98
Quote
is there already someone working on this?

Yes. Although it will take longer to standardize this profile, compared to "normal" lossless.

Quote
is this method somehow comparable to bitrate peeling?


No, because bitrate peeling isn't layered.This method is similar to AAC SSR profile: a stream starting at CELP and with successive AAC layers, each one increasing quality a little, all the way up to hundreds of kbps. Then, when a client at, say, 56kbps requests a stream, the server dinamically shaves all the layers up to 48kbps to deliver that stream.

Lossless AAC?

Reply #99
Quote
Did some more testing...

Sometimes 2 wav files will differ within the first few bytes (header?).
In this case if I import the wav to another wav using iTunes and use this new file to compare to the decoded ALAC, the wav files differ as pcm does below.

Exporting the decoded and original files to pcm (using sndfile-convert to export to .raw) I have found that in all the samples I've tested, the difference occurs at the very end... the differing byte as reported by cmp is at the end of the file.

Hope that was informative in some way.

If they differ for exactly one byte at the end of the file it might be that one of them is padded incorrectly (or at least differently), either the WAV file itself or the sections within (can't remember which) has/have to be padded to an even length (insane restriction). So it could be that if you have a mono 8bit source (or a 24bit source) that the padding differs or even simply isn't present.