sandreas / m4b-tool

m4b-tool is a command line utility to merge, split and chapterize audiobook files such as mp3, ogg, flac, m4a or m4b
MIT License
1.15k stars 76 forks source link

Could not tag file with `m4b-tool split` #218

Closed gazpachoking closed 1 year ago

gazpachoking commented 1 year ago

Getting this error (which repeats for every file creating during the split command) when trying to split an m4b into chapters. I don't actually notice anything other than the wall of red logged during the command going wrong though, so maybe it can just be ignored.

could not tag file /temp/untagged/Adrian Tchaikovsky-Time-#1-Children of Time/001-1.m4b, error: Call to a member function contains() on null
#0 phar:///usr/local/bin/m4b-tool-pre/src/library/Audio/BinaryWrapper.php(265): M4bTool\Executables\Tone->writeTag()
#1 phar:///usr/local/bin/m4b-tool-pre/src/library/Command/AbstractConversionCommand.php(260): M4bTool\Audio\BinaryWrapper->writeTag()
#2 phar:///usr/local/bin/m4b-tool-pre/src/library/Command/SplitCommand.php(369): M4bTool\Command\AbstractConversionCommand->tagFile()
#3 phar:///usr/local/bin/m4b-tool-pre/src/library/Command/SplitCommand.php(132): M4bTool\Command\SplitCommand->splitChapters()
#4 phar:///usr/local/bin/m4b-tool-pre/vendor/symfony/console/Command/Command.php(255): M4bTool\Command\SplitCommand->execute()
#5 phar:///usr/local/bin/m4b-tool-pre/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#6 phar:///usr/local/bin/m4b-tool-pre/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#7 phar:///usr/local/bin/m4b-tool-pre/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#8 phar:///usr/local/bin/m4b-tool-pre/bin/m4b-tool.php(52): Symfony\Component\Console\Application->run()
#9 /usr/local/bin/m4b-tool-pre(10): require('...')
#10 {main}
sandreas commented 1 year ago

Could you please provide a full command and the m4b-tool --version output.

gazpachoking commented 1 year ago

Running inside a docker container. This is a different book, but I use the same command on them all.

m4b-tool-pre split '/temp/merged/1 - House of Earth and Blood/1 - House of Earth and Blood.m4b' --skip-cover --max-chapter-
length=3600,5400 '--output-dir=/temp/untagged/1 - House of Earth and Blood'
docker compose exec auto-m4b m4b-tool-pre --version
m4b-tool latest-178-gaeb8b2b
gazpachoking commented 1 year ago

Docker container is based on the official one here, but I've modified it to pull 0.1.3 of tone rather than 0.1.0. (I had the same problem on 0.1.0, was seeing if the latest version helped.)

sandreas commented 1 year ago

Confirmed. Misconception in Tone wrapper. Fix follows hopefully in the next days.