Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty chapters file resulting in on chapter meta in M4B file #329

Open
thecodedad opened this issue Sep 21, 2024 · 0 comments
Open

Empty chapters file resulting in on chapter meta in M4B file #329

thecodedad opened this issue Sep 21, 2024 · 0 comments

Comments

@thecodedad
Copy link

thecodedad commented Sep 21, 2024

I'm running into an issue with select books. I'm currently converting ~50 books that are a mix of MP3 and M4A tile types. Some of the books are merging files and applying the chapter meta just fine, others are not. It seems to be the same books every time, and I haven't been able to determine the difference between the books that are successful and those that aren't.

bragibooks  | [2024-09-15 00:08:43,898: INFO/MainProcess] celery@31a5b27c6da3 ready.
bragibooks  | Validated ASIN: B076DLM5ZY
bragibooks  | Making models and merging files for: /input/04 - Flight of the Eisenstein
bragibooks  | Book already exists in database, only merging files
bragibooks  | Adding book The Flight of The Eisenstein - The Horus Heresy, Book 4: by James Swallow to processing queue
bragibooks  | [2024-09-15 00:10:04,801: INFO/MainProcess] Task importer.tasks.m4b_merge_task[8fbcb2cd-f048-4d55-9fe3-d1c53f82b60c] received
bragibooks  | [2024-09-15 00:10:04,826: INFO/ForkPoolWorker-1] --------------- Starting to process B076DLM5ZY: The Flight of The Eisenstein - The Horus Heresy, Book 4 ---------------
bragibooks  | [2024-09-15 00:10:05,276: INFO/ForkPoolWorker-1] Processing The Flight of The Eisenstein - The Horus Heresy, Book 4
bragibooks  | [2024-09-15 00:10:05,288: INFO/ForkPoolWorker-1] Final path format: James Swallow/The Flight of The Eisenstein/The Flight of The Eisenstein - The Horus Heresy, Book 4
bragibooks  | [2024-09-15 00:10:05,289: INFO/ForkPoolWorker-1] Complete output path: /output/James Swallow/The Flight of The Eisenstein/The Flight of The Eisenstein - The Horus Heresy, Book 4
bragibooks  | [2024-09-15 00:10:05,794: INFO/ForkPoolWorker-1] Processing multiple files in a dir...
bragibooks  | [2024-09-15 00:10:05,956: INFO/ForkPoolWorker-1] Source bitrate: 129000
bragibooks  | [2024-09-15 00:10:05,996: INFO/ForkPoolWorker-1] Source samplerate: 44100
bragibooks  | found 17 files to convert
bragibooks  | using cover /input/04 - Flight of the Eisenstein/cover.jpg
bragibooks  | skip cover extraction, a custom cover has been specified: /input/04 - Flight of the Eisenstein/cover.jpg
bragibooks  | preparing conversion with 20 simultaneous jobs, please wait...
   0 remaining /   17 total, preparing next task |
bragibooks  | using cover /input/04 - Flight of the Eisenstein/cover.jpg
bragibooks  | merging 17 files into /tmp/m4b-tool.29/tmp_The Flight of The Eisenstein - The Horus Heresy, Book 4.m4b, this can take a while
bragibooks  | running silence detection for file /tmp/m4b-tool.29/tmp_The Flight of The Eisenstein - The Horus Heresy, Book 4.m4b with min length 00:00:01.750
bragibooks  | silence detection finished
bragibooks  | tagged file tmp_The Flight of The Eisenstein - The Horus Heresy, Book 4.m4b (artist: Jonathan Keeble, name: The Flight of The Eisenstein - The Horus Heresy, Book 4, chapters: 17)
bragibooks  | moved temporary tmp_The Flight of The Eisenstein - The Horus Heresy, Book 4.m4b to /output/James Swallow/The Flight of The Eisenstein/The Flight of The Eisenstein - The Horus Heresy, Book 4.m4b
bragibooks  | successfully merged 17 files to /output/James Swallow/The Flight of The Eisenstein/The Flight of The Eisenstein - The Horus Heresy, Book 4.m4b
bragibooks  | an error occured, that has not been caught:
bragibooks  | Array
bragibooks  | (
bragibooks  |     [type] => 512
bragibooks  |     [message] => Failed to save key "m4b-tool.silence-cache.1750-a5f828ba0102199c270254d3eec86712cfe8502071c9e71ba02d6033e43e8f5b" of type array: fopen(/tmp/symfony-cache/@/0767e8e8c8eb): Failed to open stream: Permission denied
bragibooks  |     [file] => phar:///usr/local/bin/m4b-tool/vendor/symfony/cache/CacheItem.php
bragibooks  |     [line] => 201
bragibooks  | )
bragibooks  | [2024-09-15 00:18:43,866: INFO/ForkPoolWorker-1] Using existing chapter data
bragibooks  | [2024-09-15 00:18:43,898: ERROR/ForkPoolWorker-1] Chapter file is empty, attempting to correct
bragibooks  | Deleting QuickTime and Nero chapters from file "/output/James Swallow/The Flight of The Eisenstein/The Flight of The Eisenstein - The Horus Heresy, Book 4.m4b"
bragibooks  | optimizing /output/James Swallow/The Flight of The Eisenstein/The Flight of The Eisenstein - The Horus Heresy, Book 4.m4b
bragibooks  | [2024-09-15 00:19:45,978: INFO/ForkPoolWorker-1] --------------- Done processing B076DLM5ZY ---------------
bragibooks  | [2024-09-15 00:19:45,979: INFO/ForkPoolWorker-1] Task importer.tasks.m4b_merge_task[8fbcb2cd-f048-4d55-9fe3-d1c53f82b60c] succeeded in 581.183006547999s: None

Checking the Audnexus API with the ASIN returns the chapters are you would expect...

{
    "asin": "B076DLM5ZY",
    "brandIntroDurationMs": 1625,
    "brandOutroDurationMs": 3297,
    "chapters": [
        {
            "lengthMs": 3013718,
            "startOffsetMs": 0,
            "startOffsetSec": 0,
            "title": "One"
        },
        {
            "lengthMs": 2567338,
            "startOffsetMs": 3013718,
            "startOffsetSec": 3014,
            "title": "Two"
        },
        {
            "lengthMs": 2832231,
            "startOffsetMs": 5581056,
            "startOffsetSec": 5581,
            "title": "Three"
        },
        {
            "lengthMs": 2687849,
            "startOffsetMs": 8413287,
            "startOffsetSec": 8413,
            "title": "Four"
        },
        {
            "lengthMs": 2564830,
            "startOffsetMs": 11101136,
            "startOffsetSec": 11101,
            "title": "Five"
        },
        {
            "lengthMs": 2911318,
            "startOffsetMs": 13665966,
            "startOffsetSec": 13666,
            "title": "Six"
        },
        {
            "lengthMs": 2563066,
            "startOffsetMs": 16577284,
            "startOffsetSec": 16577,
            "title": "Seven"
        },
        {
            "lengthMs": 4777,
            "startOffsetMs": 19140350,
            "startOffsetSec": 19140,
            "title": "Part Two"
        },
        {
            "lengthMs": 2897066,
            "startOffsetMs": 19145127,
            "startOffsetSec": 19145,
            "title": "Eight"
        },
        {
            "lengthMs": 2745853,
            "startOffsetMs": 22042193,
            "startOffsetSec": 22042,
            "title": "Nine"
        },
        {
            "lengthMs": 2599102,
            "startOffsetMs": 24788046,
            "startOffsetSec": 24788,
            "title": "Ten"
        },
        {
            "lengthMs": 2592554,
            "startOffsetMs": 27387148,
            "startOffsetSec": 27387,
            "title": "Eleven"
        },
        {
            "lengthMs": 2597105,
            "startOffsetMs": 29979702,
            "startOffsetSec": 29980,
            "title": "Twelve"
        },
        {
            "lengthMs": 2159357,
            "startOffsetMs": 32576807,
            "startOffsetSec": 32577,
            "title": "Thirteen"
        },
        {
            "lengthMs": 3722,
            "startOffsetMs": 34736164,
            "startOffsetSec": 34736,
            "title": "Part Three"
        },
        {
            "lengthMs": 2733638,
            "startOffsetMs": 34739886,
            "startOffsetSec": 34740,
            "title": "Fourteen"
        },
        {
            "lengthMs": 2977355,
            "startOffsetMs": 37473524,
            "startOffsetSec": 37474,
            "title": "Fifteen"
        },
        {
            "lengthMs": 2618143,
            "startOffsetMs": 40450879,
            "startOffsetSec": 40451,
            "title": "Sixteen"
        },
        {
            "lengthMs": 1089852,
            "startOffsetMs": 43069022,
            "startOffsetSec": 43069,
            "title": "Seventeen"
        }
    ],
    "isAccurate": true,
    "region": "us",
    "runtimeLengthMs": 44158874,
    "runtimeLengthSec": 44159
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant