Skip to content

Split chapter MP3 audio chapter file into verse files

Oliver Tseng edited this page May 27, 2022 · 6 revisions

If you have a MP3 audio chapter file of the Bible and want to split it into verse files, follow the below instructions.

  1. Install ffmpeg
  1. Create a data directory in the UBA folder

  2. Put the mp3 file and verse info files in the data folder

  • If your mp3 chapter file already exists under audio/bibles folder, you do not need to put it into the data folder.

  • The verse info file must be in the data folder.

    The verse info file should contain lines with the following format:

    { label: "1", start: 6, end: 10.99 },

    The label is the verse number and start where the verse starts

    The file can contain other lines (such as html or javascript code), so you can just include an entire html file that has the above info in a javascript block.

  1. In the UBA folder, run:

If your mp3 file is under the audio/bibles folder:

  • python -m tools.SplitMp3File audio/bibles/[Bible]/[Book number]/your_mp3_file data/your_data_file [Bible] [Book number] [Chapter number]

If your mp3 file is in the data folder:

  • python -m tools.SplitMp3File data/your_mp3_file data/your_data_file [Bible] [Book number] [Chapter number]

Examples:

  • python -m tools.SplitMp3File audio/bibles/MOV/default/41/41_Mark001.mp3 data/mal-41-MRK-001.html MOV 41 1
  • python -m tools.SplitMp3File data/40_Matthew001.mp3 data/40_1.data KJV 40 1

The verse files will then be created under the /audio/bible/[Bible]/default directory

Links

Jump directly to part of mp3 when playing a chapter file

Clone this wiki locally