Until now, when the conversion of a audiobook gets interrrupted during the splitting phase, one has to delete all the output files and restart from beginning.
This can be very uncomfy, especially if it's a long audiobook and the computer did work on it for several hours.
I added some changes, so that one only has to delete the last (incompletely generated) chapter and add "--continue " to the command where CHAPTERNUMBER is the chapter, that has been interrupted while splitting of.
For this to work I mainly just skipped the steps which were already done before interruption with if-conditions.
Forcibly add the track and title metadata to the audio stream. Fixes missing meta-data with Plex and possibly other programs.
Use the .opus file extension and ogg container for opus files to match recommended practice, and correct detection of opus files in Plex and other programs
- Changes "container" for m4a and m4b to "mp4" as that is
the official container type.
- Changes "extension" checks for m4b to "container" checks
which check for "mp4". This makes it possible to produce
chaptered m4a files as well.
- Needs awk, but I think portable awk code is used. This
should probably be tested on other platforms, like macOS.
- Adds a check for mp4chaps, but that should be included
in the same package as mp4art.
- Only adds chapter data to mp4 files if using single-file
output mode.
The HOME environment variable is not set on Windows by default. Instead Windows uses USERPROFILE. It is possible for HOME to be set on Windows but for users who have not done this they will get: `HOME: unbound variable`. I have added a line that sets HOME to USERPROFILE if HOME is missing and USERPROFILE is found. This solves the unbound variable error.