1

I would like to write a tool for audiobooks, that is doing mainly the following:

  • convert aax to mp3 including metadata
  • put the mp3 in a database (probably mongo DB)
  • compare the information with a database (do you know any?)
  • split the mp3 into parts (provided by database mentioned before)

The main reason is that I'm sick of different providers of audiobooks and I want to have them in my own library. Therefore I need a database for audiobooks, preferably in many languages. I guess the hardest part is splitting the mp3 into parts provided by the database (I still need to find). Because the parts might be different and you know there is sometimes stuff like "Welcome to audible" and whatsoever. So do you have any idea where I can find this database?

RoKa
  • 105
  • 6

1 Answers1

0

To get chapters in an audiobook you can use:

ffprobe -i file.aac -print_format json -show_chapters -loglevel error

This gives you the metadata including start and end times. e.g.

{'id': 126,
  'time_base': '1/22050',
  'start': 1330963456,
  'start_time': '60361.154467',
  'end': 1336697460,
  'end_time': '60621.200000',
  'tags': {'title': 'Chapter 127'}
},

You can then extract these individually and convert them into mp3 files with ffmpeg using the -ss (start) and -to (end) commands.

Note: I am currently in the process of tidying up an app which splits audiable books into chapters, such that I can listen to them on my Garmin watch when running.

user2589273
  • 2,379
  • 20
  • 29
  • even if audible has names for the chapters, this method only shows numbers but it is already a very nice method. I will check how I can put this in python. – RoKa Mar 12 '22 at 20:23
  • I'm my example the chapter name is literally "chapter 127". You need to use the tags category and not the ID – user2589273 Mar 15 '22 at 06:14
  • Were you able to find a solution for this in python? And what language/tool is the above answer in? I'm not a programmer. – Meet Jul 11 '23 at 04:48