TheMetalCenter / m4b-mp3-chapters-from-cuesheets

merge audiobooks or podcasts without re-encoding (remuxing only) to single m4b with quicktime/nero chapters or mp3 with id3v2 chapters using cuesheets; also allows for renaming/editing chapters
23 stars 0 forks source link

Chapter end time X before start Y #11

Open TheMetalCenter opened 2 years ago

TheMetalCenter commented 2 years ago

Occasionally this error is obtained when concating files:

[ffmetadata @ 000001c2fa0422c0] Chapter end time 99394000 before start 105338000 metadata.txt: Cannot allocate memory

This occurs when a chapter END time is less than the START time. So far it is always the last chapter, perhaps due to ffprobe getting the wrong total duration.

Quick solution is to edit the metadata.txt (close out of the cmd window so it isn't auto-deleted) and replace the end time with the start time so they match. Then run ext_mergemetadata.bat

Note, this will cause some media players to calculate the duration of the last chapter as 0 seconds, however it should still play fine.

TheMetalCenter commented 2 years ago

This can also be a sign that your input audio file is not the correct input

TheMetalCenter commented 2 years ago

This seems to occur most frequently when using cuesheets that contain a chapter at the end of the file (with no audio content at all after). Deleting this chapter before merging is a second solution.

TheMetalCenter commented 2 years ago

These cues (probably originate from inaudible or similar audible converter) also often lack an overall TITLE field - which can cause issues. It's easier to just not use this cuesheet and extract a new cuesheet with m4b_export-cue.bat from the embedded chapters.