I have single large M4B container with audio book split into multiple chapters.
Is there quick way to extract chapters as separate files that will not require re-encoding to another format?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
-
Not sure if it works (never seen a M4B container, guess it's standard AAC audio with some kind of dedicated metadata), but I would try to import it in MKVToolNix, then in the "Output" tab, select "Split mode: Before chapters". If MKVToolNix does recognize the format, should produce one MKV (or MKA) file for each chapter. If not, you'd have to re-create a chapter template.
-
m4b is a mp4 audio container, it should be possible to extract the chapters to .m4a / .aac files without reencoding.
-
m4b is a mp4 audio container, it should be possible to extract the chapters to .m4a / .aac files without reencoding.
-
split audio into 20 min equal time interval segments split00.mp3, split01.mp3, split02.mp3, split03.mp3
ffmpeg -i input.m4b -c copy -f segment -segment_time 20:00 -reset_timestamps 1 split%02d.mp3
-reset_timestamps 1 is critical as for each segment it recalculates the time
%02d outputs 00, 01, 02, 03, etc. change to %03d for 000, 001, 002, 003, etc.
split an m4b audiobook into multiple mka or mkv audio files for each chapter (if it already has chapters) with MKVToolnix. Drag m4b file into MKVToolnix into Multiplexer then choose Output
[Attachment 60825 - Click to enlarge]
Note: same can be done with Freac by importing m4b and outputting an mp3 for each chapter
also probably best just done with m4b-tool
m4b-tool split --audio-format mp3 --audio-bitrate 96k --audio-channels 1 --audio-samplerate 22050 "data/my-audio-book.m4b" -
m4b seems to be m4a + chapters. If this holds the following is possible via script:
- extract a section losslessly with ffmpeg using timestamps
- or extract chapters to mka with mkvtoolnix/mkvmerge then remux to .aac/m4a losslessly with ffmpeg.
note:
- audiobooks don't typically have same length chapters.
- any conversion to mp3 implies recompression. -
I was also looking for a way to do this and came across this thread. butterw alluded to how to do it and with a little of my own research came up with the following solution.
It turns out you can easily do this from the command line using MKVToolNix (specifically mkvmerge) and FFMPEG. This is in Windows; other OSes would just need to change the syntax of the "for" loop accordingly.
This first step will split the m4b file into individual mka (Matroska audio) files at each chapter marker in the m4b. This is lossless as you are only changing from an MP4 container to a Mastroska container; the actual audio stream is not transcoded.
Code:C:\> C:\path\to\mkvmerge -o output.mka --split chapters:all input.m4b
Code:C:\> for %f in (*.mka) do C:\path\to\ffmpeg -i "%f" -c:a copy -vn -f mp4 "%~nf.m4b"
I know it's not sexy, but it's got teeth.
Last I checked, MP4Box of the GPAC Framework will split at specific times and not chapter metadata just like FFMPEG. But this feature has been requested to be added to MP4Box, so maybe it will appear some time soon. -
I tried what you suggested, but it only plays the .mb4 file in my music player without opening mkvmerge. I have the command written as follows:
C:\Users\hallelujah\Music\bible\bible.m4b> C:\Program Files\MKVToolNix\mkvmerge.exe -o output.mka --split chapters:all input.m4b
I have to run CMD as administrator for access not to be denied. -
I got the M4B files to convert to mka files doing a simple step of going into output mode in multiplexer "before chapters" in split mode and "all" chapter numbers. Now I need to figure out how to convert back to mp4 using freempeg since command prompt isn't working for me.
Similar Threads
-
Audiobook maker for Windows?
By Anakin in forum AudioReplies: 0Last Post: 13th Mar 2021, 10:44 -
Video Split Does not split at exact point
By Nothingissimple in forum EditingReplies: 2Last Post: 2nd Oct 2020, 20:58 -
AAX Audio Converter: Convert your Audible audiobooks to MP3 or M4A/M4B
By audiamus in forum AudioReplies: 1Last Post: 3rd May 2020, 06:14 -
Freeware conversion from .m4b to .mp3 ?
By vmars316 in forum AudioReplies: 4Last Post: 26th Jun 2017, 17:22 -
Converting mp3 to m4b
By geowharton in forum AudioReplies: 3Last Post: 4th Sep 2006, 07:48