I have an mp3 and a cue file (with chapters) of a CD that I ripped. I want to turn this into an m4a or m4b that I can play as an audiobook and maintain the chapters, bitrate and stay stereo. I want to be able to play it in multiple players, including Apple Books.

I have combined the mp3 and cue files into an .mka file using MKVToolNix, and now I want to use ffmpeg to convert it to an m4a or m4b and preserve the chapters (and cover art, if possible, but that's not a deal-breaker).

I've tried a number of different ffmpeg commands, but I either end up with an .m4b file that plays in everything but Apple Books (when I use -c:a copy the file will import into Books, and it looks like it's playing and shows me output levels, but no sound comes out of my speakers), or I convert it to AAC (-vn -acodec aac -f mp4) and it's stereo, 44.1 kHz, but the resulting .m4b that plays in all players (including Books) with chapters is twice the size as the original mp3.

Also, everything I'm converting using ffmepg into m4b shows up as "Protected mpeg 4 audiobook". Did I originally rip this to mp3 incorrectly or is this something else that I'm doing wrong with ffmpeg?

I'm on a Mac

Here are the stages I'm going through:

File Type:             Mp3 Audio
Audio Channels:        Stereo
Sample Rate:           44.1 kHz
File Size:             373.4 MB

File Type:             matroska (audio) MKA
Codec ID:              A_MPEG/L3
Frequency:             44100
Channels:              2
File Size:             378.4 MB

File Type:             Protected mpeg4 audiobook
Channels:              Stereo
Sample Rate:           44.1 kHz
File Size:             750.5 MB

What I want to end up with:

File Type:             MPEG 4 Audio (.m4a or .m4b)
Channels:              Stereo
Sample Rate:           44.1 kHz
File Size:             ~380 MB

1 Answer 1


I noticed on my output while running ffmpeg that the bitrate for my input was 64k, but for the output it was 128k (which is apparently the default for AAC). I ran the following command and now I have an AAC encoded .m4b that is about the same size as the input file.

ffmpeg -i "input.mka" -vn -acodec aac -f mp4 -b:a 64000 "output.m4b"

The above command doesn't keep the cover art from the original mp3, and the file type still shows as "protected", but there's no DRM since I ripped this myself from my own CDs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .