←back to thread

700 points yen223 | 5 comments | | HN request time: 0.503s | source
Show context
daneel_w ◴[] No.42064988[source]
A couple more:

    afconvert(1) - an audio file format converter, which includes Apple's superior AAC codec from the Core Audio framework

    diskutil(8) - tons of tools for fixed and removable storage
Examples:

    afconvert in.wav -o out.m4a -q 127 -s 2 -b 160000 -f m4af -d 'aac '

    mb=300; diskutil eraseVolume APFS myramdisk `hdiutil attach -nomount ram://$((mb*2048))`
replies(4): >>42065488 #>>42066466 #>>42068656 #>>42068717 #
1. zelphirkalt ◴[] No.42068656[source]
"superior" ... It looks silly to include such a judging adjective in the description of a comman line utility. I don't need "subtle" Apple ads on the command line. And aac is about the last format I would choose, encoding my audio in.
replies(3): >>42068744 #>>42069095 #>>42069775 #
2. derefr ◴[] No.42068744[source]
To be very clear, the man page is claiming that Apple's implementation of the AAC codec [the encoder specifically] is superior to other implementations of AAC encoding; not that AAC is superior to other audio codecs.

If you're wondering how one implementation of an audio codec could be superior to others — mostly, it's because any lossy audio codec has an encoding phase called "psychoacoustic compression", where each implementation of the codec is free to do whatever it likes to "simplify" the waveform in some way (most easily pictured: by taking a Discrete Cosine Transform of the waveform, and then quantizing / convoluting some parts of the frequency space. Like what JPEG does to discard information from the chroma channels.)

IIRC, rather than blunt-force quantization, Apple's AAC encoding does clever things (akin to the instrument separation done to audio in Melodyne) to split the waveform into "features", and then discards information in such a way that the features' separability is maintained (i.e. it doesn't become harder to "pick out" any given "sound" from the audio.)

replies(1): >>42070896 #
3. daneel_w ◴[] No.42069095[source]
Its quality is technically superior as evident from the product's PSNR and other factors. There are no "ads" here, I'm not a brand warrior, and nobody cares what formats are the last ones you'd encode your audio in.
4. kps ◴[] No.42069775[source]
I think those are the commenter's descriptions, not Apple's man page synopses. My system has

     afconvert -- Audio File Convert
     diskutil -- Modify, verify and repair local disks.
5. daneel_w ◴[] No.42070896[source]
Correct. Though AAC (when produced with a proper encoder) surpasses all other lossy formats with the exception of Opus.