←back to thread

700 points yen223 | 2 comments | | HN request time: 1.033s | 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 #
hk1337 ◴[] No.42066466[source]
How does that compare with ffmpeg? The arguments seem about the same.
replies(2): >>42067194 #>>42067397 #
daneel_w ◴[] No.42067397[source]
ffmpeg offers a few different encoders for many of its supported audio/video formats, and the result depends on what encoder you tell ffmpeg to use. It does not have support for using Core Audio on macOS but it does offer FDK AAC, which is one of the better AAC encoders available today - though not nearly as good as the one available in Core Audio.
replies(2): >>42068737 #>>42071269 #
seec ◴[] No.42068737[source]
Do you have any sources/informations on an objective comparison of encoders quality ?

Way back then (iPod era), I made an exposé for a science exam (small paper), proving that AAC was indeed better than MP3 both subjectively and objectively at most bitrates. This is how I got introduced to Fourier transforms and the likes; it was very interesting to see that you can literally "see" the difference in quality on the encoded waveform output.

But I just used the default encoders on the Mac and I didn't think about going in deep into encoder comparisons at the time. Does it matter that much? From what I know, it just about properly programming a math spec, with some tricks but I wonder if that makes that much of a difference.

In any case, above 256kbps it takes a very skilled listener to correctly identify encoded music. Apple has some useful tools for that, particularly AU Lab that allows you A/B testing of tracks with on-the-fly encoding. https://www.apple.com/apple-music/apple-digital-masters/

replies(3): >>42068962 #>>42069362 #>>42071109 #
1. meindnoch ◴[] No.42071109[source]
>From what I know, it just about properly programming a math spec

Incorrect. The specification only concerns the bitstream and the decoding. Encoders are free to do whatever they want, as long as they produce a valid bitstream.

replies(1): >>42072675 #
2. seec ◴[] No.42072675[source]
That makes sense.

Of course, the implementations are going to have varying performance depending on code quality/optimisations but that's a given.

Edit: some other poster gave some cues to my question. I guess you can do some trickery by decomposing the waveform before encoding and recomposing it.

I'll read more on the specs.