

# import chapters and create ffmetadatafile Review to make sure it looks right\n (" "), then hit Enter to continue. Input('File created at "' + chapterFileName + '". With open(chapterFileName, "w") as chaptersFile: Title = numberSeparator.join(title.split(numberSeparator))ĬurrentTimestamp = int(currentTimestamp + audioLength) Title = os.path.splitext(file).split('/') Time = str(datetime.timedelta(seconds=currentTimestamp)) + '.000' Print(' using: "' + (numberSeparator or '(blank)') + '"')įor file in glob.glob(directory + '/*.' + fileType): NumberSeparator=input('Enumeration separator (symbol/phrase between enumeration and title): ') or ''

Skip = input('Skip chapter.txt creation? (default n): ') or 'n'įileType=input('Input audio file type (default mp3): ') or 'mp3' MetadataFileName = directory + "/FFMETADATAFILE" m4b file")ĭirectory=input('Directory (default pwd): ') or os.getcwd()ĬhapterFileName = directory + "/chapters.txt" Print("This script will help generate an FFMETADATA file to facilitate\nconverting an. If you followed the ordering example above, the "enumeration separator" would be " - " (enter into the command without quotes)

Supply the audiobook directory that your mp3s are in.
AAC AUDIOBOOK CREATOR MP3 INSTALL
FFMPEG ( brew install ffmpeg if you don't have it).Python3 ( brew install python if you dont have it).Order your mp3 files in a directory for just that audiobook (ex.Combine the m4a and FFMETADATA file into an m4b.Generate an FFMETADATA file ( more info) using a python script ( inspired by this) to facilitate the conversion of an m4a to m4b and preserve chapters.Note that there is still some file size bloat because the command I used to turn the caf > m4a drops the -u pgcm 2 parameter because it resulted in errors ( Couldn't set audio converter property ('prop')).
AAC AUDIOBOOK CREATOR MP3 PLUS
Convert the combined mp3 into an m4a using afconvert (AFAIK mac-only) to reduce the amount of filesize increase from converting the mp3's to an m4a by utilizing the itunes plus commands ( stackexchange topic apple docs) (my attempts at using ffmpeg for this part resulted in huge file size bloat or long processing times).

