Noodle
Noodle10mo ago

Why .m4a?

What's the reason for Migaku converting audio files to .m4a extension? I've just checked an audio file that I recorded manually with Audacity and exported to .opus. The converted audio is 2x the size of the original. I use Migaku with Anki.
No description
No description
9 Replies
generous-apricot
generous-apricot10mo ago
I need to try with opus… but anki mobile is quite sensitive about the codecs I can play mp3 and m4a but not ogg In the past, iOS only supported opus wrapped in Apple caf… I don’t know if it’s still the case or not The plot thickens… the audio can be opus codec in m4a container and that works on iOS… opus codec in ogg/opus container doesn’t work on iOS… opus in caf plays on iOS and safari but not anki droid
Noodle
NoodleOP10mo ago
huh, that's more of an issue with the app itself then, rather than the OS? oh nvm I misread that
generous-apricot
generous-apricot10mo ago
No, it’s an os limitation Opus in m4a also only works from around iOS 17.2 onwards I’d need to test with my phone that’s on an older release
Noodle
NoodleOP10mo ago
I guess that's because it's a relatively new codec
generous-apricot
generous-apricot10mo ago
It’s only 12 years old
Noodle
NoodleOP10mo ago
I see. I guess if it's incompatible with most iOS devices then AAC in M4A (what's currently used) is a good choice. Ideally it would be nice if the user could pick one of a audio options (format, bitrate) in advanced settings to suit their needs, like in subs2srs, but I guess that's too much to ask for
generous-apricot
generous-apricot10mo ago
also, aac gets offloaded to hw decoder on ios... so both fast and low energy
fair-rose
fair-rose10mo ago
@Saxon care to weigh in?
ambitious-aqua
ambitious-aqua10mo ago
The extension has its own instance of ffmpeg built in and all media (audio/images) that pass through the Card Creator are both converted to a consistent format and compressed - Audio is converted to aac within m4a, and a bitrate of 128k - Images are converted to webp and a max width of 800px The bitrate and max-width arguments are that the furthest we deem we can compress those respective media without compromising them Which is both a space/cost-saving measure, but also speeds up upload to our servers considerably which is better UX As for why aac in m4a, it was chosen a few years ago for its compatibility in all the places we needed it to work

Did you find this page helpful?