0

I've been following this answer to use ffmpeg to convert and play some of my Audible audio-books in LinuxMint. Each book is a single source-file, but I've noticed that ffmpeg lists all the chapters at the start of conversion.

Is there a way to get ffmpeg to split the the book into chapters - convert each chapter into separate files (split by chapters)? Preferably by ffmpeg alone, but using other programs/scripts (together with ffmpeg) is also an option...

(I've seen a few other answers about splitting DVDs into chunks of even lengths or into chapters (using ffmpeg and a python-script), but that's not quite what I'm after, so I'm hoping it was a simpler way of doing it...)

0

You can use ffprobe to get the chapter start and end times with the command...

ffprobe -i fileName -print_format json -show_chapters

You can then use ffmpeg to split at the start and end times...

ffmpeg -i fileName -ss start -to end outFile

Be sure not to use "-t"; that needs a duration to convert. "-ss" and "-to" are time positions in the file.

You'll have to script it to have it done automagically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.