
With open(chapterFileName, "w") as chaptersFile: Title = numberSeperator.join(title.split(numberSeperator))ĬurrentTimestamp = int(currentTimestamp + audioLength) Title = os.path.splitext(file).split('/') Time = str(datetime.timedelta(seconds=currentTimestamp)) + '.000' Print(' using: "' + (numberSeperator or '(blank)') + '"')įor file in glob.glob(directory + '/*.' + fileType): NumberSeperator=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.
#M4a tag editor mac install
#M4a tag editor mac plus

Combine the separate mp3s into a single mp3.I still use the python script to generate chapters.txt to be used with m4b-tool's merge script.Īfter a lot of research, I found a CLI solution and wanted to share my findings here (if you're looking for an app to handle this for you, I've had really good luck with Audiobook Binder, which can merge mp3s, m4as, and m4bs into a single m4b with very high efficiency).

I'm going to be switching over to use their solution instead of my custom ffmpeg/afconvert. EDIT: Whelp, looks like m4b-tool is a great CLI tool for just this.
