m4b-tool icon indicating copy to clipboard operation
m4b-tool copied to clipboard

Merge missing Cover.jpg and Chapters

Open Dekker500 opened this issue 3 years ago • 9 comments

Ubuntu 22.04

Using the latest docker image, MERGE seems to be giving unexpected behaviour, namely not respecting the cover.jpg and not adding chapter markers.

I am being verbose here to hopefully assist with debugging, but I am walking through the docker instructions as provided in an attempt to track down the "problem".

TEST 1

To test, I did the following: Remove ALL docker images: docker image prune --all --force

Get the latest m4b-tool:

$ docker pull sandreas/m4b-tool:latest
latest: Pulling from sandreas/m4b-tool
8663204ce13b: Pull complete 
30447756a1f0: Pull complete 
7348a25295c7: Pull complete 
58a2e7384e44: Pull complete 
3c4c960049ea: Pull complete 
e2ee9912ca2e: Pull complete 
9b11875aa72a: Pull complete 
549959051fd5: Pull complete 
4f4fb700ef54: Pull complete 
Digest: sha256:1b41a699821787357ef2c68f059d6a824ecfc69dd652bbde8e7037cfef91ce7e
Status: Downloaded newer image for sandreas/m4b-tool:latest
docker.io/sandreas/m4b-tool:latest

That leaves me with:

$ docker image ls
REPOSITORY          TAG       IMAGE ID       CREATED         SIZE
<none>              <none>    7260680dcdd9   5 days ago      154MB
sandreas/m4b-tool   latest    0c9c6f5af60b   2 weeks ago     158MB
hello-world         latest    feb5d9fea6a5   10 months ago   13.3kB
$ m4b-tool --version
m4b-tool latest-168-gb154c85

Then I try to convert a folder with numerous MP3s and one cover.jpg into a M4B file:

m4b-tool merge --audio-codec="libfdk_aac" --audio-bitrate="256k" --jobs="2" --fix-mime-type --output-file="./Converted/outfile.m4b" "./Queue2/infolder" -vvv

The result I am getting is outfile.m4b contains the correct audio, seemingly in the correct order, however there are NO chapters, and there is NO cover.

I have tested with 21 different folders (using batch pattern), and each produced the same result. I then tested with a single file, and same result.

TEST 2

If I start fresh again, docker image prune --all --force but this time follow your alternate/manual docker instructions (https://github.com/sandreas/m4b-tool/#docker) :

git clone https://github.com/sandreas/m4b-tool.git
cd m4b-tool
docker build . -t m4b-tool
alias m4b-tool='docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)":/mnt m4b-tool'
m4b-tool --version

at this point, the version is m4b-tool v.0.4.2. When I perform my test again, this time I get a properly formed M4B file, with chapters, with cover image. Everything seems perfect. Problem is, I am not using the "latest", and it is not clear from the documentation whether it is using the high quality audio (fdk_aac).

TEST 3

If I continue with the "manual" instructions:

docker build . --build-arg M4B_TOOL_DOWNLOAD_LINK=https://github.com/sandreas/m4b-tool/files/9125095/m4b-tool.tar.gz -t m4b-tool
m4b-tool --version

And now the version is m4b-tool latest-168-gb154c85

You will note the "version" appears to be the same as the one above. Repeating the exact same merge command on the single and batch files produce a proper M4B but again with NO chapters and NO cover image.

I am not experienced enough with docker to troubleshoot further myself, but something appears to be wrong with the image that is built, or the documentation to get/build the docker image.

Dekker500 avatar Aug 02 '22 15:08 Dekker500

Thank you for reporting this... I'm having some issues with the release cycle atm, this is why I started to do auto releases with github actions... that will take a while. I think there is a problem with the latest tone integration.

If tone is installed on your system, it uses it to tag files, which may result in problems, because this is a pretty new approach. I'll take a look as soon as possible.

sandreas avatar Aug 02 '22 16:08 sandreas

Confirmed. I'm on it

sandreas avatar Aug 04 '22 07:08 sandreas

Ok, I think, I've found the problem. It's a combination of m4b-tool doing the wrong thing and tone being not robust...

In my case, m4b-tool writes a tone.json file, that is invalid, containing a field "trackNumber": "001\/218",, but tone only handles this as an integer. Therefore it throws an exception and does not tag anything.

Could you please confirm, that this is your problem by running with --debug:

m4b-tool merge --audio-codec="libfdk_aac" --audio-bitrate="256k" --jobs="2" --fix-mime-type --output-file="./Converted/outfile.m4b" "./Queue2/infolder" -vvv --debug

and looking in the m4b-tool.log for === tone.json === and pasting the part until 'tone' 'tag' ...? Example

DEBUG      324779ms === tone.json ===
1663 DEBUG      324782ms {
1664     "meta": {
1665         "album": 
...
2771     }
2772 }
2773 DEBUG      324782ms 'tone' 'tag' '--meta-cover-file' './.../cover.jpg' '--      meta-tone-json-file' '/tmp/toneJgMokl' '/tmp/m4b-tool/tmp_outfile.m4b'

I would like to prevent fixing MY problem but not yours.

sandreas avatar Aug 04 '22 08:08 sandreas

I made a new test, and here is the log file. I have obfuscated the metadata, but am including everything.

INFO            2ms m4b-tool development, OS: Linux (Welcome to Alpine Linux 3.14
Kernel \r on an \m (\l))
DEBUG           2ms 'ffmpeg' '-hide_banner' '-version'
DEBUG         121ms == load input files ==
NOTICE        125ms found 19 files to convert
DEBUG         127ms 1-01 Ident.mp3
1-02 TRD Part 1 Track 01.mp3
1-03 TRD Part 1 Track 02.mp3
1-04 TRD Part 1 Track 03.mp3
1-05 TRD Part 1 Track 04.mp3
1-06 TRD Part 1 Track 05.mp3
1-07 TRD Part 1 Track 06.mp3
1-08 TRD Part 1 Track 07.mp3
1-09 TRD Part 1 Track 08.mp3
1-10 TRD Part 2 Track 01.mp3
1-11 TRD Part 2 Track 02.mp3
1-12 TRD Part 2 Track 03.mp3
1-13 TRD Part 2 Track 04.mp3
1-14 TRD Part 2 Track 05.mp3
1-15 TRD Part 2 Track 06.mp3
1-16 TRD Part 2 Track 07.mp3
1-17 TRD Credits.mp3
1-18 TRD Interviews 1.mp3
1-19 TRD Interviews 2.mp3
NOTICE        129ms searching for cover in ./Queue/101
NOTICE        132ms cover not found or not specified
DEBUG         132ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-01 Ident.mp3' '-an' '-vcodec' 'copy' './Queue/101/cover.jpg'
NOTICE        316ms extracted cover to ./Queue/101/cover.jpg
NOTICE        328ms preparing conversion with 2 simultaneous jobs, please wait...
DEBUG         329ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-01 Ident.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/01-converting.m4b'
DEBUG         331ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-02 TRD Part 1 Track 01.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/02-converting.m4b'
DEBUG        1676ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-03 TRD Part 1 Track 02.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/03-converting.m4b'
DEBUG        2900ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-04 TRD Part 1 Track 03.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/04-converting.m4b'
DEBUG       19651ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-05 TRD Part 1 Track 04.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/05-converting.m4b'
DEBUG       29710ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-06 TRD Part 1 Track 05.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/06-converting.m4b'
DEBUG       63959ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-07 TRD Part 1 Track 06.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/07-converting.m4b'
DEBUG       69247ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-08 TRD Part 1 Track 07.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/08-converting.m4b'
DEBUG       85378ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-09 TRD Part 1 Track 08.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/09-converting.m4b'
DEBUG       86553ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-10 TRD Part 2 Track 01.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/10-converting.m4b'
DEBUG       86770ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-11 TRD Part 2 Track 02.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/11-converting.m4b'
DEBUG       88270ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-12 TRD Part 2 Track 03.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/12-converting.m4b'
DEBUG      110667ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-13 TRD Part 2 Track 04.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/13-converting.m4b'
DEBUG      115582ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-14 TRD Part 2 Track 05.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/14-converting.m4b'
DEBUG      140074ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-15 TRD Part 2 Track 06.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/15-converting.m4b'
DEBUG      156760ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-16 TRD Part 2 Track 07.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/16-converting.m4b'
DEBUG      161079ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-17 TRD Credits.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/17-converting.m4b'
DEBUG      164333ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-18 TRD Interviews 1.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/18-converting.m4b'
DEBUG      167058ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' './Queue/101/1-19 TRD Interviews 2.mp3' '-map_metadata' '0' '-max_muxing_queue_size' '9999' '-movflags' '+faststart' '-vn' '-b:a' '256k' '-ar' '44100' '-ac' '0' '-acodec' 'libfdk_aac' '-f' 'mp4' '/tmp/m4b-tool/19-converting.m4b'
NOTICE     204190ms searching for cover in ./Queue/101
NOTICE     204190ms using cover ./Queue/101/cover.jpg
DEBUG      204191ms ffmpeg concat file /tmp/m4b-tool/tmp_101.m4b.listing.txt content:
DEBUG      204192ms ------ start ------
file '/tmp/m4b-tool/01-finished.m4b'
file '/tmp/m4b-tool/02-finished.m4b'
file '/tmp/m4b-tool/03-finished.m4b'
file '/tmp/m4b-tool/04-finished.m4b'
file '/tmp/m4b-tool/05-finished.m4b'
file '/tmp/m4b-tool/06-finished.m4b'
file '/tmp/m4b-tool/07-finished.m4b'
file '/tmp/m4b-tool/08-finished.m4b'
file '/tmp/m4b-tool/09-finished.m4b'
file '/tmp/m4b-tool/10-finished.m4b'
file '/tmp/m4b-tool/11-finished.m4b'
file '/tmp/m4b-tool/12-finished.m4b'
file '/tmp/m4b-tool/13-finished.m4b'
file '/tmp/m4b-tool/14-finished.m4b'
file '/tmp/m4b-tool/15-finished.m4b'
file '/tmp/m4b-tool/16-finished.m4b'
file '/tmp/m4b-tool/17-finished.m4b'
file '/tmp/m4b-tool/18-finished.m4b'
file '/tmp/m4b-tool/19-finished.m4b'

------ end ------
NOTICE     204192ms merging 19 files into /tmp/m4b-tool/tmp_101.m4b, this can take a while
DEBUG      204192ms 'ffmpeg' '-hide_banner' '-f' 'concat' '-safe' '0' '-vn' '-i' '/tmp/m4b-tool/tmp_101.m4b.listing.txt' '-max_muxing_queue_size' '9999' '-c' 'copy' '-f' 'mp4' '/tmp/m4b-tool/tmp_101.m4b'
INFO       211382ms improving tags...
INFO       211382ms ==> trying improver Ffmetadata
INFO       211382ms ffmetadata.txt not found - tags not improved
DEBUG      211384ms ==== current tag ====
INFO       211384ms type             : 2
INFO       211385ms 
INFO       211385ms Empty tag fields : album, albumartist, artist, chapters, comment, copyright, cover, description, disk, disks, encoded-by, encoder, genre, grouping, language, longdesc, lyrics, name, performer, publisher, purchaseDate, sortAlbumArtist, sortWriter, sortalbum, sortartist, sortname, track, tracks, writer, year
INFO       211387ms 

INFO       211388ms ==> trying improver ChaptersTxt
INFO       211388ms chapters.txt not found - tags not improved
DEBUG      211388ms ==== current tag ====
DEBUG      211389ms - tag has not changed since the last improver
INFO       211389ms 

INFO       211390ms ==> trying improver ChaptersFromOverdrive
DEBUG      211390ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-01 Ident.mp3' '-f' 'ffmetadata' '-'
DEBUG      211491ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-02 TRD Part 1 Track 01.mp3' '-f' 'ffmetadata' '-'
DEBUG      211580ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-03 TRD Part 1 Track 02.mp3' '-f' 'ffmetadata' '-'
DEBUG      211669ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-04 TRD Part 1 Track 03.mp3' '-f' 'ffmetadata' '-'
DEBUG      211761ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-05 TRD Part 1 Track 04.mp3' '-f' 'ffmetadata' '-'
DEBUG      211851ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-06 TRD Part 1 Track 05.mp3' '-f' 'ffmetadata' '-'
DEBUG      211939ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-07 TRD Part 1 Track 06.mp3' '-f' 'ffmetadata' '-'
DEBUG      212026ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-08 TRD Part 1 Track 07.mp3' '-f' 'ffmetadata' '-'
DEBUG      212116ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-09 TRD Part 1 Track 08.mp3' '-f' 'ffmetadata' '-'
DEBUG      212177ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-10 TRD Part 2 Track 01.mp3' '-f' 'ffmetadata' '-'
DEBUG      212243ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-11 TRD Part 2 Track 02.mp3' '-f' 'ffmetadata' '-'
DEBUG      212305ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-12 TRD Part 2 Track 03.mp3' '-f' 'ffmetadata' '-'
DEBUG      212363ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-13 TRD Part 2 Track 04.mp3' '-f' 'ffmetadata' '-'
DEBUG      212431ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-14 TRD Part 2 Track 05.mp3' '-f' 'ffmetadata' '-'
DEBUG      212499ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-15 TRD Part 2 Track 06.mp3' '-f' 'ffmetadata' '-'
DEBUG      212575ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-16 TRD Part 2 Track 07.mp3' '-f' 'ffmetadata' '-'
DEBUG      212647ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-17 TRD Credits.mp3' '-f' 'ffmetadata' '-'
DEBUG      212713ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-18 TRD Interviews 1.mp3' '-f' 'ffmetadata' '-'
DEBUG      212778ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-19 TRD Interviews 2.mp3' '-f' 'ffmetadata' '-'
INFO       212840ms no overdrive chapters found - tags not improved
DEBUG      212841ms ==== current tag ====
DEBUG      212842ms - tag has not changed since the last improver
INFO       212842ms 

INFO       212843ms ==> trying improver ChaptersFromFileTracks
DEBUG      212843ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/01-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      212890ms 'mp4info' '/tmp/m4b-tool/01-finished.m4b'
DEBUG      212978ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/02-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213026ms 'mp4info' '/tmp/m4b-tool/02-finished.m4b'
DEBUG      213060ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/03-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213109ms 'mp4info' '/tmp/m4b-tool/03-finished.m4b'
DEBUG      213153ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/04-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213200ms 'mp4info' '/tmp/m4b-tool/04-finished.m4b'
DEBUG      213249ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/05-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213304ms 'mp4info' '/tmp/m4b-tool/05-finished.m4b'
DEBUG      213357ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/06-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213409ms 'mp4info' '/tmp/m4b-tool/06-finished.m4b'
DEBUG      213449ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/07-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213495ms 'mp4info' '/tmp/m4b-tool/07-finished.m4b'
DEBUG      213535ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/08-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213583ms 'mp4info' '/tmp/m4b-tool/08-finished.m4b'
DEBUG      213622ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/09-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213667ms 'mp4info' '/tmp/m4b-tool/09-finished.m4b'
DEBUG      213706ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/10-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213763ms 'mp4info' '/tmp/m4b-tool/10-finished.m4b'
DEBUG      213801ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/11-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213847ms 'mp4info' '/tmp/m4b-tool/11-finished.m4b'
DEBUG      213887ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/12-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      213934ms 'mp4info' '/tmp/m4b-tool/12-finished.m4b'
DEBUG      213983ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/13-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      214030ms 'mp4info' '/tmp/m4b-tool/13-finished.m4b'
DEBUG      214073ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/14-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      214129ms 'mp4info' '/tmp/m4b-tool/14-finished.m4b'
DEBUG      214175ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/15-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      214226ms 'mp4info' '/tmp/m4b-tool/15-finished.m4b'
DEBUG      214269ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/16-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      214318ms 'mp4info' '/tmp/m4b-tool/16-finished.m4b'
DEBUG      214354ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/17-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      214423ms 'mp4info' '/tmp/m4b-tool/17-finished.m4b'
DEBUG      214461ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/18-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      214527ms 'mp4info' '/tmp/m4b-tool/18-finished.m4b'
DEBUG      214581ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/19-finished.m4b' '-f' 'ffmetadata' '-'
DEBUG      214635ms 'mp4info' '/tmp/m4b-tool/19-finished.m4b'
DEBUG      214691ms ==== current tag ====
INFO       214692ms chapters         
INFO       214692ms ## total-duration:: 01:17:55.250
00:00:00.000 1
00:00:14.857 1.1
00:00:42.776 2.1
00:04:58.169 3.1
00:10:16.543 4.1
00:17:51.485 5.1
00:22:57.764 6.1
00:27:42.127 7.1
00:31:34.819 8
00:31:54.222 1.2
00:32:22.062 2.2
00:38:04.077 3.2
00:44:45.076 4.2
00:51:11.969 5.2
00:58:47.930 6.2
01:04:14.298 7.2
01:05:13.616 9
01:06:00.238 1.3
01:11:24.255 2.3
INFO       214692ms Empty tag fields : album, albumartist, artist, comment, copyright, cover, description, disk, disks, encoded-by, encoder, genre, grouping, language, longdesc, lyrics, name, performer, publisher, purchaseDate, sortAlbumArtist, sortWriter, sortalbum, sortartist, sortname, track, tracks, writer, year
INFO       214693ms chapter count changed from 0 to 19
INFO       214693ms 

INFO       214693ms ==> trying improver MetadataJson
INFO       214693ms no metadata.json found - tags not improved
DEBUG      214694ms ==== current tag ====
DEBUG      214694ms - tag has not changed since the last improver
INFO       214694ms 

INFO       214695ms ==> trying improver BuchhandelJson
INFO       214695ms no buchhandel.json found - tags not improved
DEBUG      214696ms ==== current tag ====
DEBUG      214696ms - tag has not changed since the last improver
INFO       214696ms 

INFO       214697ms ==> trying improver BookBeatJson
INFO       214697ms no bookbeat.json found - tags not improved
DEBUG      214698ms ==== current tag ====
DEBUG      214698ms - tag has not changed since the last improver
INFO       214698ms 

INFO       214699ms ==> trying improver OpenPackagingFormat
INFO       214699ms metadata.opf not found - tags not improved
DEBUG      214700ms ==== current tag ====
DEBUG      214700ms - tag has not changed since the last improver
INFO       214700ms 

INFO       214701ms ==> trying improver AudibleTxt
INFO       214701ms no audible.txt found - tags not improved
DEBUG      214702ms ==== current tag ====
DEBUG      214702ms - tag has not changed since the last improver
INFO       214702ms 

INFO       214702ms ==> trying improver AudibleJson
INFO       214703ms no audible.json found - tags not improved
DEBUG      214704ms ==== current tag ====
DEBUG      214704ms - tag has not changed since the last improver
INFO       214704ms 

INFO       214704ms ==> trying improver M4bToolJson
INFO       214704ms m4b-tool.json not found - tags not improved
DEBUG      214706ms ==== current tag ====
DEBUG      214706ms - tag has not changed since the last improver
INFO       214706ms 

INFO       214706ms ==> trying improver Description
INFO       214706ms description.txt not found - tags not improved
DEBUG      214707ms ==== current tag ====
DEBUG      214707ms - tag has not changed since the last improver
INFO       214708ms 

INFO       214708ms ==> trying improver ContentMetadataJson
INFO       214708ms content_metadata_*.json not found - tags not improved
DEBUG      214709ms ==== current tag ====
DEBUG      214710ms - tag has not changed since the last improver
INFO       214710ms 

INFO       214710ms ==> trying improver AudibleChaptersJson
INFO       214712ms content_metadata_*.json not found - tags not improved
DEBUG      214714ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' '/tmp/m4b-tool/tmp_101.m4b' '-vn' '-c:a' 'copy' '-f' 'crc' '-'
DEBUG      218111ms 'ffmpeg' '-hide_banner' '-i' '/tmp/m4b-tool/tmp_101.m4b' '-af' 'silencedetect=noise=-30dB:d=1.75' '-f' 'null' '-'
NOTICE     218111ms running silence detection for file /tmp/m4b-tool/tmp_101.m4b with min length 00:00:01.750
NOTICE     247252ms silence detection finished
DEBUG      247262ms ==== current tag ====
DEBUG      247264ms - tag has not changed since the last improver
INFO       247265ms 

INFO       247268ms ==> trying improver AdjustTooLongChapters
INFO       247269ms no chapter length adjustment required (max chapter length not provided or empty chapter list)
DEBUG      247270ms ==== current tag ====
DEBUG      247272ms - tag has not changed since the last improver
INFO       247273ms 

INFO       247275ms ==> trying improver InputOptions
INFO       247279ms input options improved the following 2 properties:
INFO       247286ms           cover: <empty> => ./Queue/101/cover.jpg
INFO       247286ms         encoder: <empty> => m4b-tool
DEBUG      247305ms ==== current tag ====
INFO       247305ms cover            : ./Queue/101/cover.jpg, 1417x1417
INFO       247305ms encoder          : m4b-tool
INFO       247305ms Empty tag fields : album, albumartist, artist, comment, copyright, description, disk, disks, encoded-by, genre, grouping, language, longdesc, lyrics, name, performer, publisher, purchaseDate, sortAlbumArtist, sortWriter, sortalbum, sortartist, sortname, track, tracks, writer, year
INFO       247305ms 

DEBUG      247306ms 'ffmpeg' '-hide_banner' '-i' './Queue/101/1-01 Ident.mp3' '-f' 'ffmetadata' '-'
DEBUG      247424ms tagFile - filename: /tmp/m4b-tool/tmp_101.m4b
DEBUG      247424ms full tag: {"album":"My Album Name","albumArtist":"First Artist\/Second Artist\/Third Artist","artist":"Main Artist","comment":"Location","cover":".\/Queue\/101\/cover.jpg","encodedBy":"My Encoder","encoder":"m4b-tool","genre":"Audiobooks","title":"Main title","track":"1\/19","type":2,"year":"2022"}
DEBUG      247425ms fixing mimetype of file /tmp/m4b-tool/tmp_101.m4b to audio/mp4
DEBUG      247425ms 'ffmpeg' '-nostats' '-loglevel' 'panic' '-hide_banner' '-i' '/tmp/m4b-tool/tmp_101.m4b' '-vn' '-acodec' 'copy' '-map_metadata' '0' '/tmp/m4b-tool/tmp_101.m4b-62ebc4830e71b3.30570782.m4b'
DEBUG      253111ms === tone.json ===
DEBUG      253116ms {
    "meta": {
        "album": "My Album Name",
        "albumArtist": "First Artist\/Second Artist\/Third Artist",
        "artist": "Main Artist",
        "comment": "Location",
        "encodedBy": "My Encoder",
        "encodingTool": "m4b-tool",
        "genre": "Audiobooks",
        "title": "Main title",
        "trackNumber": "1\/19",
        "itunesMediaType": 2,
        "recordingDate": "2022-01-01T00:00:00+00:00",
        "chapters": [
            {
                "start": 0,
                "length": 14857,
                "title": "1"
            },
            {
                "start": 14857,
                "length": 27919,
                "title": "1.1"
            },
            {
                "start": 42776,
                "length": 255393,
                "title": "2.1"
            },
            {
                "start": 298169,
                "length": 318374,
                "title": "3.1"
            },
            {
                "start": 616543,
                "length": 454942,
                "title": "4.1"
            },
            {
                "start": 1071485,
                "length": 306279,
                "title": "5.1"
            },
            {
                "start": 1377764,
                "length": 284363,
                "title": "6.1"
            },
            {
                "start": 1662127,
                "length": 232692,
                "title": "7.1"
            },
            {
                "start": 1894819,
                "length": 19403,
                "title": "8"
            },
            {
                "start": 1914222,
                "length": 27840,
                "title": "1.2"
            },
            {
                "start": 1942062,
                "length": 342015,
                "title": "2.2"
            },
            {
                "start": 2284077,
                "length": 400999,
                "title": "3.2"
            },
            {
                "start": 2685076,
                "length": 386893,
                "title": "4.2"
            },
            {
                "start": 3071969,
                "length": 455961,
                "title": "5.2"
            },
            {
                "start": 3527930,
                "length": 326368,
                "title": "6.2"
            },
            {
                "start": 3854298,
                "length": 59318,
                "title": "7.2"
            },
            {
                "start": 3913616,
                "length": 46622,
                "title": "9"
            },
            {
                "start": 3960238,
                "length": 324017,
                "title": "1.3"
            },
            {
                "start": 4284255,
                "length": 390995,
                "title": "2.3"
            }
        ]
    }
}
DEBUG      253118ms 'tone' 'tag' '--meta-cover-file' './Queue/101/cover.jpg' '--meta-tone-json-file' '/tmp/toneCJOemd' '/tmp/m4b-tool/tmp_101.m4b'
NOTICE     258397ms tagged file tmp_101.m4b (artist: Main Artists, name: Main title, chapters: 19)
NOTICE     266611ms moved temporary tmp_101.m4b to ./Converted/101.m4b
NOTICE     266616ms successfully merged 19 files to ./Converted/101.m4b
DEBUG      266617ms 'ffmpeg' '-hide_banner' '-i' './Converted/101.m4b' '-f' 'ffmetadata' '-'
DEBUG      267023ms 'mp4info' './Converted/101.m4b'
DEBUG      267233ms Final metadata:
encoder          : Lavf59.16.100
type             : 2

Empty tag fields : album, albumartist, artist, chapters, comment, copyright, cover, description, disk, disks, encoded-by, genre, grouping, language, longdesc, lyrics, name, performer, publisher, purchaseDate, sortAlbumArtist, sortWriter, sortalbum, sortartist, sortname, track, tracks, writer, year
total estimated duration: 4674432

Dekker500 avatar Aug 04 '22 13:08 Dekker500

I made a new test, and here is the log file. I have obfuscated the metadata, but am including everything.

Yeah seams to be the same Problem:

"trackNumber": "001\/218"

That is not a valid track number :-) Thanks.

So I have to fix m4b-tool first and then make tone more robust in the next release.

sandreas avatar Aug 04 '22 16:08 sandreas

Fix attempt: https://github.com/sandreas/m4b-tool/commit/dd41e05c49f3fe9d1735997f697e824c2b4d4918

I have to verify this though...

sandreas avatar Aug 05 '22 03:08 sandreas

Pardon my ineptitude, but how does one pull that patch into a docker test? I tried steps from Test1 and Test2 above, but if you have a better sequence to test this, please let me know!

I tried the steps from Test 1 above, an got the identical version identifier to before - are these versions auto-generated from the source's hash or something? Anyway, Docker hub is still showing "latest" as being 20 days old, so its not there yet. Test result was as before - no image, no chapters.

I then tried the steps from Test 2 above, and still got v.0.4.2. The problem is, this this version always worked before, but I continued anyway. The resulting file gave a proper cover image, and included chapters... but not the proper chapters.

Empty tag fields : album, albumartist, artist, chapters, comment, copyright, cover, description, disk, disks, encoded-by, genre, grouping, language, longdesc, lyrics, name, performer, publisher, purchaseDate, sortAlbumArtist, sortWriter, sortalbum, sortartist, sortname, track, tracks, writer, year
total estimated duration: 4674432
DEBUG           0ms == load input files ==
NOTICE          3ms reading metadata and streaminfo for file /mnt/Queue/101/1-01 Ident.mp3
DEBUG           8ms ffmpeg -hide_banner -i "/mnt/Queue/101/1-01 Ident.mp3" -f ffmetadata -
DEBUG         269ms ;FFMETADATA1
encoded_by=My Encoder
title=Main title
artist=Main Artist
album_artist=First Artist/Second Artist/Third Artist
TCM=TCMPerson
album=My Album Names
track=1/19
TPA=1/3
comment=Location
genre=Audiobooks
date=2022
encoder=Lavf59.16.100

[mp3 @ 0x7f08f1971840] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/mnt/Queue/101/1-01 Ident.mp3':
  Metadata:
    encoded_by      : My Encoder
    title           : Main title
    artist          : Main Artist
    album_artist    : First Artist/Second Artist/Third Artist
    TCM             : TCMPerson
    album           : My Album Names
    track           : 1/19
    TPA             : 1/3
    comment         : Location
    genre           : Audiobooks
    date            : 2022
  Duration: 00:00:14.81, start: 0.000000, bitrate: 1230 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s
  Stream #0:1: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 1417x1417, 90k tbr, 90k tbn (attached pic)
    Metadata:
      comment         : Other
Output #0, ffmetadata, to 'pipe:':
  Metadata:
    encoded_by      : My Encoder
    title           : Main title
    artist          : Main Artist
    album_artist    : First Artist/Second Artist/Third Artist
    TCM             : TCMPerson
    album           : My Album Names
    track           : 1/19
    TPA             : 1/3
    comment         : Location
    genre           : Audiobooks
    date            : 2022
    encoder         : Lavf59.16.100
Stream mapping:
Press [q] to stop, [?] for help
size=       0kB time=-577014:32:22.77 bitrate=N/A speed=N/A    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded 

DEBUG         270ms ffmpeg -hide_banner -i "/mnt/Queue/101/1-01 Ident.mp3" -f null -
DEBUG         524ms 
[mp3 @ 0x7faa820ce840] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/mnt/Queue/101/1-01 Ident.mp3':
  Metadata:
    encoded_by      : My Encoder
    title           : Main title
    artist          : Main Artist
    album_artist    : First Artist/Second Artist/Third Artist
    TCM             : TCMPerson
    album           : My Album Names
    track           : 1/19
    TPA             : 1/3
    comment         : Location
    genre           : Audiobooks
    date            : 2022
  Duration: 00:00:14.81, start: 0.000000, bitrate: 1230 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s
  Stream #0:1: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 1417x1417, 90k tbr, 90k tbn (attached pic)
    Metadata:
      comment         : Other
Stream mapping:
  Stream #0:1 -> #0:0 (mjpeg (native) -> wrapped_avframe (native))
  Stream #0:0 -> #0:1 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
  Metadata:
    encoded_by      : My Encoder
    title           : Main title
    artist          : Main Artist
    album_artist    : First Artist/Second Artist/Third Artist
    TCM             : TCMPerson
    album           : My Album Names
    track           : 1/19
    TPA             : 1/3
    comment         : Location
    genre           : Audiobooks
    date            : 2022
    encoder         : Lavf59.16.100
  Stream #0:0: Video: wrapped_avframe, yuvj444p(pc, bt470bg/unknown/unknown, progressive), 1417x1417, q=2-31, 200 kb/s, 90k fps, 90k tbn (attached pic)
    Metadata:
      comment         : Other
      encoder         : Lavc59.18.100 wrapped_avframe
  Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc59.18.100 pcm_s16le
frame=    1 fps=0.0 q=-0.0 size=N/A time=00:00:00.02 bitrate=N/A speed=0.244x    
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:14.81 bitrate=N/A speed=83.7x    
video:0kB audio:2552kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

NOTICE        551ms searching for cover in ./Queue/101
NOTICE        551ms using cover  ./Queue/101/cover.jpg
NOTICE        551ms searching for description.txt in ./Queue/101
DEBUG         551ms checking file ./Queue/101/description.txt, realpath: 
NOTICE        551ms file description.txt not found or too big
NOTICE        551ms skip cover extraction, file ./Queue/101/cover.jpg already exists - use --force to overwrite
NOTICE        568ms preparing conversion with 2 simultaneous jobs, please wait...
NOTICE     306643ms using cover  ./Queue/101/cover.jpg
NOTICE     306645ms searching for chapters.txt in ./Queue/101
DEBUG      306645ms checking file ./Queue/101/chapters.txt, realpath: 
NOTICE     306645ms file chapters.txt not found or too big
NOTICE     306646ms rebuilding chapters from converted files title tags
DEBUG      307966ms ffmpeg -hide_banner -f concat -safe 0 -vn -i ./Converted/101_Test2.m4b.listing.txt -max_muxing_queue_size 9999 -c copy -f mp4 ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b
NOTICE     307967ms merging ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b, this can take a while
NOTICE     314222ms 
DEBUG      314223ms tagging file ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b with tag:
M4bTool\Audio\Tag Object
(
    [encoder] => m4b-tool
    [title] => Main title
    [sortTitle] => 
    [artist] => Main Artist
    [sortArtist] => 
    [genre] => Audiobooks
    [writer] => 
    [album] => My Album Names
    [sortAlbum] => 
    [disk] => 
    [disks] => 
    [albumArtist] => First Artist/Second Artist/Third Artist
    [year] => 2022
    [track] => 
    [tracks] => 
    [cover] => SplFileInfo Object
        (
            [pathName:SplFileInfo:private] => ./Queue/101/cover.jpg
            [fileName:SplFileInfo:private] => cover.jpg
        )

    [description] => 
    [longDescription] => 
    [comment] => 
    [copyright] => 
    [encodedBy] => 
    [performer] => 
    [language] => 
    [publisher] => 
    [lyrics] => 
    [chapters] => Array
        (
            [0] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 1
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 0
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 14834
                        )

                )

            [1] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 1.1
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 14834
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 27895
                        )

                )

            [2] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 2.1
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 42729
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 255370
                        )

                )

            [3] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 3.1
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 298099
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 318351
                        )

                )

            [4] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 4.1
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 616450
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 454919
                        )

                )

            [5] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 5.1
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 1071369
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 306256
                        )

                )

            [6] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 6.1
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 1377625
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 284339
                        )

                )

            [7] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 7.1
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 1661964
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 232669
                        )

                )

            [8] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 8
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 1894633
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 19379
                        )

                )

            [9] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 1.2
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 1914012
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 27817
                        )

                )

            [10] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 2.2
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 1941829
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 341992
                        )

                )

            [11] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 3.2
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 2283821
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 400976
                        )

                )

            [12] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 4.2
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 2684797
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 386870
                        )

                )

            [13] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 5.2
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 3071667
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 455938
                        )

                )

            [14] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 6.2
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 3527605
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 326344
                        )

                )

            [15] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 7.2
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 3853949
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 59295
                        )

                )

            [16] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 9
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 3913244
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 46599
                        )

                )

            [17] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 1.3
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 3959843
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 323993
                        )

                )

            [18] => M4bTool\Audio\Chapter Object
                (
                    [name:protected] => 2.3
                    [tag:protected] => 
                    [start:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 4283836
                        )

                    [length:protected] => Sandreas\Time\TimeUnit Object
                        (
                            [milliseconds:protected] => 390971
                        )

                )

        )

    [series] => 
    [seriesPart] => 
)

DEBUG      314223ms fixing mimetype of file ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b to audio/mp4
DEBUG      314223ms ffmpeg -hide_banner -i ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b -vn -acodec copy -map_metadata 0 ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b-tmp.m4b
NOTICE     314223ms fixing mimetype to audio/mp4
NOTICE     317477ms 
DEBUG      317539ms file ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b is an MP4 file
DEBUG      317539ms mp4tags -help
NOTICE     317540ms check for sorting support in mp4tags
NOTICE     317820ms supported, proceeding...
DEBUG      317820ms mp4tags -song "Main title" -artist "Main Artist" -genre Audiobooks -albumartist "First Artist/Second Artist/Third Artist" -year 2022 -album "My Album Names" -encodedby m4b-tool -type 2 ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b
NOTICE     317820ms tagging file ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b
DEBUG      318075ms mp4art --add ./Queue/101/cover.jpg ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b -f
NOTICE     318075ms adding cover ./Queue/101/cover.jpg to ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b
NOTICE     319328ms 
DEBUG      319328ms adding ./Queue/101/cover.jpg -> ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b

DEBUG      319329ms mp4chaps -i ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b
NOTICE     319330ms importing chapters for ./Converted/101_Test2-tmpfiles//tmp_101_Test2.m4b

Dekker500 avatar Aug 05 '22 15:08 Dekker500

Not fixed yet. I'm on it closing this ticket as soon as done.

Currently family stuff to do. sorry.

sandreas avatar Aug 05 '22 18:08 sandreas

Oh, no problem at all. I actually finished my current "queue" using an older version, and will be offline for most of next week so won't be able to test more until then. Just helping to keep the project in the best shape possible!

Dekker500 avatar Aug 05 '22 18:08 Dekker500

Ok, should be fixed in sandreas/m4b-tool:latest... feedback would be great. Feel free to reopen.

sandreas avatar Aug 06 '22 12:08 sandreas