castdrian / OSAC

The Open Source Audible Converter
GNU General Public License v2.0
74 stars 18 forks source link

[Feature request] Add support for splitting into separate MP3 chapters #6

Open IOI-655321 opened 6 years ago

IOI-655321 commented 6 years ago

Would be nice to have an option to split the converted audiobook into separate files based on chapters in the audible file. This makes uploading to services such as Google Play Music a nicer experience as its a number of smaller files and its easier to jump between chapters in a standard music player rather than specific audiobook software.

castdrian commented 6 years ago

I guess that would work if I'd be able to figure out a way to parse ffprobe -i filename -print_format json -show_chapters -loglevel error and then somehow get ffmpeg to split it by that. another possibility would be executing a python script, but I don't know any python so no idea how to modify it to work as needed,

IOI-655321 commented 6 years ago

I found these (dont have dev setup to test anything though)

https://github.com/harryjackson/ffmpeg_split

https://github.com/valekhz/m4b-converter

luckylittle commented 6 years ago

This would be awesome. I am currently using libmp3splt-0.9.2/mp3splt-2.6.2 with the following parameters:

mp3splt -s -P -p th=-40,min=6 <file.mp3> dry mode to see how many tracks and then adjust accordingly

For example 560min long audiobook will be split into 47 parts using this:

mp3splt -s -p th=-30,min=5 <file.mp3>

IOI-655321 commented 5 years ago

Found this recently.

https://github.com/PrometeoConseil/AudioBookSplitter