Welcome Guest, please login or register.

AudioBook Bay Forum » Help » How-to Guides » Make an M4B from chapterised MP3 or M4A

Pages: [1]   Go Down
  Print  
Author Topic: Make an M4B from chapterised MP3 or M4A  (Read 4070 times)
Gweilo
Global Moderator
Legendary Member
******
Offline Offline

Posts: 6997



View Profile
« on: October 04, 2018, 01:50:44 AM »

M4B is Apple's iTunes Audiobook format; it's an MP4 file, AAC encoded audio + tags (Title, artist, cover image, etc.) + a list of chapter breaks and bookmarks.

Audible's .aa and .aax are essentially encrypted m4b, and InAudible decrypts them to make an unprotected M4B.

If you have an audiobook split into chapters, one file (mp3 or m4a) each, you might want to make them into a single m4b (though be aware that some players, like older iPods, can't cope with files over about 5 hours, so if you have a problem with that, put the book in several M4Bs).

So, if you have an audiobook set of MP3 or M4A and want to make an M4B:

On a Mac use Audiobook Binder.

On Windows, if you have a set of M4A chapter files you can combine them, with no reencoding, using  Chapter and Verse. See this post.

On PC or Mac: use Fre:ac:
This reencodes the audio from the source files.

Install fre:ac, them I make a new config, I named it M4B.
Encoder: Core Audio AAC (You need iTunes installed for this, otherwise use the FAAC encode built in.)
   codec: 32 kbps (or whatever you want, but not higher then the source)
   format: MP4  and extension .m4b
Option: Encode to a single file - X
Output filename: <album>

With that config selected (Options: Active configuration), drag MP3 chapter files into the job list and ensure they are in correct order (click on "track no" column, assuming the tracks are set correctly).
You can check and change the tags (it will copy from the MP3s)
-- note: you need to have titles set in each MP3's tags.
And they must be different titles, or at least not all the same.
Just 1,2,3 will work. Otherwise, it does not store any chapter info in the M4B.

Set "Genre" as "Audiobook"-- that should make it import as such to iTunes.
Enable "create cue sheet" -- (a small text file) useful to confirm chapters all there and correct order, and upload with the m4b so it can be sliced back into separate chapters if downloader prefers.

You can confirm the chapters set in the M4B using MediaInfo. Also VLC will show them.

You can tweak the tags in the M4B with MP3tag after creation.
« Last Edit: August 05, 2024, 11:59:53 PM by Gweilo » Logged
Dallis24F
Global Moderator
Legendary Member
******
Offline Offline

Posts: 6699



View Profile
« Reply #1 on: October 04, 2018, 11:16:13 PM »

I tried this successfully. Fre:ac 1.1 (20180306) converted 9 hours of audiobook in about 60 seconds from mp3 to m4b. Amazing!

Fre:ac is currently rewriting code to use all cores (and other things) to make it faster. I change settings listed below but didn't use experimental "SuperFast" option. This is unreliable Alpha release so I suggest you leave that alone.

Here are the files I started with:



These are the changes per Gwelio:

Click on NEW and type a name (mp3 to m4b)

Do the blue arrow last and scroll down to next images




Set encode Quality



Set Format



Finish first window by clicking OK.



Time to add files:

When dragging files, Fre:ac makes two entries. One is crazy high bit rate (originals are 64k)...I think this is creating temporary .wav file. The other is 0 bites. Don't Panic. Add the rest, check order, click go (if you've never used this app...It's the Play button on the menu bar).

* I noticed my first chapter split with part as the first file, and part as the last. I couldn't change it and it didn't affect the rip.




You may notice your final bit rate is off. That's because there's not a Constant Bit Rate option so default is Variable Bit Rate.

There's not an installer atm so run exe from the folder. Download Page:
https://www.freac.org/downloads-mainmenu-33
« Last Edit: October 07, 2018, 02:44:14 PM by Dallis24 » Logged

Please read these rules before posting book requests. http://audiobookbay.nl/forum/general-requests/rules-guidelines-for-posting-12893/
Gweilo
Global Moderator
Legendary Member
******
Offline Offline

Posts: 6997



View Profile
« Reply #2 on: October 05, 2018, 09:30:31 AM »

A few notes:
Most of what I and Dallis outline above for Fre:ac is creating  a "configuration profile": when you have done that, you just set it as the active configuration and all the settings you chose for that are in effect.
(I have a few other config profiles: for MP3 narrations lower quality/bitrate, for drama with higher quality; for m4b you might do that too. Like most audio programs it was designed for music so defaults may not be optimal for audiobooks.)

Subsequently you just have to select the input files and click the start button (triangle) in the top tool bar (not the smaller black one above the file list, which plays the audio).

Set encode Quality

I notice that Dallis used a different encoder than I did; in fact there are couple of different encoders you can use in Fre:ac to to make AAC, which is what we need for M4B.

Quote from: Robert Kausch (fre:ac  coder)
The FAAC encoder, however, does not provide very good quality. That's why the bitreate of files created with default options is quite high. To remedy, the fre:ac snapshot versions add support for the Apple Core Audio AAC encoder which provides very good quality (meaning the bitrate can be much lower than with FAAC while retaining the same or even higher perceived quality).

So Core AAC is the better choice. It isn't included with fre:ac, but it will use it if you have iTunes installed.

You may notice your final bit rate is off. That's because there's not a Constant Bit Rate option so default is
Variable Bit Rate.

AAC is a newer codec than MP3, in this the default is VBR.
All the M4Bs we have decoded from Audible are VBR if you examine them.

MP3 has had VBR for about 20 years, but lots of people superstitiously avoid it because of bugs in early versions, or think that CBR is better because it has a higher bitrate, when actually is just less efficient (larger bitrate for same quality).
Higher bitrate = Higher quality ONLY if everything else is the same. Different codec/sampling rate CBR/VBR also affect the quality.
Apple did their usual thing of deciding what was best and made VBR the default for iTunes music and audiobooks (which is where m4b comes from), which in this case is good. The bitrate choices are actually quality settings that will result in about the bitrate stated as the average.
« Last Edit: April 26, 2019, 03:51:01 AM by Gweilo » Logged
Gweilo
Global Moderator
Legendary Member
******
Offline Offline

Posts: 6997



View Profile
« Reply #3 on: April 26, 2019, 12:25:06 AM »

I tried a few things and to make an M4B, and found you need to have titles set in each MP3's tags.
And they must be different titles, or at least not all the same.
Just 1,2,3 will work.
Otherwise, it does not store any chapter info. (I added this info to my first post.)

You can use MP3tag to do that for a folder of files: first use Tools/Autonumbering.
Then use Convert/Tag-Tag and, to create chapter names,  
Field: TITLE
Format string: Chapter %Track%
You can also use fre:ac's tag editor, on each MP3 separately, but this is quicker.

Also, there is a new version of fre:ac out: fre:ac v1.1 Alpha 20190423 (April 24)
Note: you must get the 1.1 Alpha, not the 1.0 stable version, for the M4B features.

 
« Last Edit: April 26, 2019, 12:31:05 AM by Gweilo » Logged
Pages: [1]   Go Up
  Print  
 
Jump to: