App Crash and Covers invalid #128

Closed
opened 2026-04-24 22:59:04 +02:00 by adam · 13 comments
Owner

Originally created by @MidnightSnowleopard on GitHub (Dec 13, 2021).

After updating from 1.6.38 to 1.6.40 I removed all libraries and configuration entirely after having some issues with it suddenly not displaying covers correctly. A fresh install with new data rescanned the library I had previously and is still coming up with issues regarding covers.
Initial scan of new library finishes but upon loading the main library page the application crashes with the following:

/node_modules/njodb/index.js:103
        throw error;
        ^
Error: Input buffer contains unsupported image format
Emitted 'error' event on Sharp instance at:
    at Object.<anonymous> (/node_modules/sharp/lib/output.js:1075:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! audiobookshelf@1.6.40 start: `node index.js`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the audiobookshelf@1.6.40 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-12-13T03_35_42_245Z-debug.log

Reloading it seems to work and it continues on but continued issues.
Loading the main library page starts immediately showing issue as instead of images a number of covers simply don't load at all. Checking browser console shows 404 errors for what I assume to be all failed to load covers. Clicking onto one of the blank covers load the book information but the image cover displays the "Invalid Cover" image from audiobookshelf. Not all covers are affected by this issue.

Logs during a rescan include a large number of messages like this:

Metadata cover "/metadata/books/ab_srfkssngje1kcpaqvt/cover.png" was removed
WARN: [Audiobook] Extract embedded cover art but cover already exists for 

Force rescanning the library seems to clear up the blank covers and they instead show the default blank cover image. I think there's something going wrong with the embedded image extraction. The ones that seem to having issues all seem to be ones that have embedded covers. Rescanning one of them that had an issue shows this sort of message in the logs:

WARN: [Audiobook] Extract embedded cover art but cover already exists for "Book" - bail
Originally created by @MidnightSnowleopard on GitHub (Dec 13, 2021). After updating from 1.6.38 to 1.6.40 I removed all libraries and configuration entirely after having some issues with it suddenly not displaying covers correctly. A fresh install with new data rescanned the library I had previously and is still coming up with issues regarding covers. Initial scan of new library finishes but upon loading the main library page the application crashes with the following: ``` /node_modules/njodb/index.js:103 throw error; ^ Error: Input buffer contains unsupported image format Emitted 'error' event on Sharp instance at: at Object.<anonymous> (/node_modules/sharp/lib/output.js:1075:18) npm ERR! code ELIFECYCLE npm ERR! errno 7 npm ERR! audiobookshelf@1.6.40 start: `node index.js` npm ERR! Exit status 7 npm ERR! npm ERR! Failed at the audiobookshelf@1.6.40 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-12-13T03_35_42_245Z-debug.log ``` Reloading it seems to work and it continues on but continued issues. Loading the main library page starts immediately showing issue as instead of images a number of covers simply don't load at all. Checking browser console shows 404 errors for what I assume to be all failed to load covers. Clicking onto one of the blank covers load the book information but the image cover displays the "Invalid Cover" image from audiobookshelf. Not all covers are affected by this issue. Logs during a rescan include a large number of messages like this: ``` Metadata cover "/metadata/books/ab_srfkssngje1kcpaqvt/cover.png" was removed WARN: [Audiobook] Extract embedded cover art but cover already exists for ``` Force rescanning the library seems to clear up the blank covers and they instead show the default blank cover image. I think there's something going wrong with the embedded image extraction. The ones that seem to having issues all seem to be ones that have embedded covers. Rescanning one of them that had an issue shows this sort of message in the logs: ``` WARN: [Audiobook] Extract embedded cover art but cover already exists for "Book" - bail ```
adam closed this issue 2026-04-24 22:59:04 +02:00
Author
Owner

@keaganhilliard commented on GitHub (Dec 13, 2021):

This happens in my library when the book in question doesn't have a coverFullPath attribute. So it seems like that attribute isn't set when the cover image is extracted from the audiobook. As for the unsupported format error, do you have local cover files?

@keaganhilliard commented on GitHub (Dec 13, 2021): This happens in my library when the book in question doesn't have a `coverFullPath` attribute. So it seems like that attribute isn't set when the cover image is extracted from the audiobook. As for the unsupported format error, do you have local cover files?
Author
Owner

@MidnightSnowleopard commented on GitHub (Dec 13, 2021):

For some of them, yes there is external local cover files. I don't think there are many of this type though and certainly not nearly anywhere near the number having issues. I also checked some of them stating that the cover had been removed but it hadn't. It was/is still accessible in the metadata folder in question.

@MidnightSnowleopard commented on GitHub (Dec 13, 2021): For some of them, yes there is external local cover files. I don't think there are many of this type though and certainly not nearly anywhere near the number having issues. I also checked some of them stating that the cover had been removed but it hadn't. It was/is still accessible in the metadata folder in question.
Author
Owner

@advplyr commented on GitHub (Dec 14, 2021):

This should hopefully 🤞 be fixed now in v1.6.41

@advplyr commented on GitHub (Dec 14, 2021): This should hopefully 🤞 be fixed now in `v1.6.41`
Author
Owner

@MidnightSnowleopard commented on GitHub (Dec 14, 2021):

Upgraded to v1.6.41 and purged cache and performed force rescan of the library with no change. Completed delete all metadata and configuration and rescanned. New scan looks much better with significantly better with far more showing up. There are still a handful of of covers that are left spinning for an extended period upon initial load before transitioning to a 404 error in library view and invalid cover on individual book view.
Logs from the container suggest some back end errors:

[2021-12-14T01:36:10.592Z] ERROR: [FfmpegHelpers] Resize Image Error Error: ffmpeg exited with code 1: Video encoding failed

Conversion failed!

(node:17) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received type boolean (false)

    at open (fs.js:428:10)

    at go$open (/node_modules/graceful-fs/graceful-fs.js:347:14)

    at open (/node_modules/graceful-fs/graceful-fs.js:344:12)

    at ReadStream$open [as open] (/node_modules/graceful-fs/graceful-fs.js:296:5)

    at ReadStream (internal/fs/streams.js:119:10)

    at new ReadStream (/node_modules/graceful-fs/graceful-fs.js:289:28)

    at Object.createReadStream (/node_modules/graceful-fs/graceful-fs.js:331:12)

    at CacheManager.handleCoverCache (/server/CacheManager.js:40:25)

    at runMicrotasks (<anonymous>)

    at processTicksAndRejections (internal/process/task_queues.js:97:5)

(node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

and

[2021-12-14T01:38:24.172Z] ERROR: [FfmpegHelpers] Extract Cover Error Error: ffmpeg exited with code 1: Press [q] to stop, [?] for help

Error while decoding stream #0:2: Operation not permitted

Cannot determine format of input stream 0:2 after EOF

Error marking filters as finished

Conversion failed!
@MidnightSnowleopard commented on GitHub (Dec 14, 2021): Upgraded to v1.6.41 and purged cache and performed force rescan of the library with no change. Completed delete all metadata and configuration and rescanned. New scan looks much better with significantly better with far more showing up. There are still a handful of of covers that are left spinning for an extended period upon initial load before transitioning to a 404 error in library view and invalid cover on individual book view. Logs from the container suggest some back end errors: ``` [2021-12-14T01:36:10.592Z] ERROR: [FfmpegHelpers] Resize Image Error Error: ffmpeg exited with code 1: Video encoding failed Conversion failed! (node:17) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received type boolean (false) at open (fs.js:428:10) at go$open (/node_modules/graceful-fs/graceful-fs.js:347:14) at open (/node_modules/graceful-fs/graceful-fs.js:344:12) at ReadStream$open [as open] (/node_modules/graceful-fs/graceful-fs.js:296:5) at ReadStream (internal/fs/streams.js:119:10) at new ReadStream (/node_modules/graceful-fs/graceful-fs.js:289:28) at Object.createReadStream (/node_modules/graceful-fs/graceful-fs.js:331:12) at CacheManager.handleCoverCache (/server/CacheManager.js:40:25) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ``` and ``` [2021-12-14T01:38:24.172Z] ERROR: [FfmpegHelpers] Extract Cover Error Error: ffmpeg exited with code 1: Press [q] to stop, [?] for help Error while decoding stream #0:2: Operation not permitted Cannot determine format of input stream 0:2 after EOF Error marking filters as finished Conversion failed! ```
Author
Owner

@advplyr commented on GitHub (Dec 14, 2021):

Ffmpeg is having trouble with some image embedded in your audio files. Did you embed those images yourself?

If you look in the folder of that audiobook, is it creating an image file? Maybe it is failing part-way through extracting the cover image, so the image is invalid.

@advplyr commented on GitHub (Dec 14, 2021): Ffmpeg is having trouble with some image embedded in your audio files. Did you embed those images yourself? If you look in the folder of that audiobook, is it creating an image file? Maybe it is failing part-way through extracting the cover image, so the image is invalid.
Author
Owner

@advplyr commented on GitHub (Dec 15, 2021):

I just pushed a patch, same version number, that added additional error logs.

@advplyr commented on GitHub (Dec 15, 2021): I just pushed a patch, same version number, that added additional error logs.
Author
Owner

@MidnightSnowleopard commented on GitHub (Dec 16, 2021):

So that seems to have clarified some with some of the files it's indexing being legitmately corrupted entirely. There is also some that are just failing to convert. This is one of the messages of that type:

[2021-12-16T00:56:19.050Z] ERROR: [FfmpegHelpers] Resize Image Error Error: ffmpeg exited with code 1: Video encoding failed

Conversion failed!

    media_type      : 2

  Duration: 13:42:07.43, start: 0.000000, bitrate: 64 kb/s

  Chapters:

    Chapter #0:0: start 0.000000, end 49327.431667

      Metadata:

  Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, mono, fltp, 62 kb/s (default)

    Metadata:

      creation_time   : 2013-10-30T17:54:03.000000Z

      handler_name    : Apple Sound Media Handler

      vendor_id       : [0][0][0][0]

  Stream #0:1(eng): Video: png (png  / 0x20676E70), rgba(pc), 316x500 [SAR 2835:2835 DAR 79:125], 0 kb/s, 0.0000 fps, 0.0000 tbr, 600 tbn, 600 tbc (default) (attached pic) (timed thumbnails)

    Metadata:

      creation_time   : 2013-10-30T17:56:34.000000Z

      handler_name    : ?Apple Video Media Handler

      vendor_id       : appl

      encoder         : PNG

  Stream #0:2(eng): Data: bin_data (text / 0x74786574)

    Metadata:

      creation_time   : 2013-10-30T17:56:34.000000Z

      handler_name    : ?Apple Text Media Handler

  Stream #0:3: Video: png, rgba(pc), 316x480, 90k tbr, 90k tbn, 90k tbc (attached pic)

Stream mapping:

  Stream #0:1 -> #0:0 (png (native) -> webp (libwebp_anim))

Press [q] to stop, [?] for help

Output #0, webp, to '/metadata/cache/covers/ab_ljmaa3dmw953uqlbkc_400.webp':

  Metadata:

    major_brand     : mp42

    minor_version   : 1

    compatible_brands: mp42mp41

    media_type      : 2

    encoder         : Lavf58.76.100

  Chapters:

    Chapter #0:0: start 0.000000, end 49327.431667

  Stream #0:0(eng): Video: webp, bgra(pc, gbr/unknown/unknown, progressive), 400x633 [SAR 50007:50000 DAR 79:125], q=2-31, 200 kb/s, 0.0000 fps, 1k tbn (default) (attached pic) (timed thumbnails)

    Metadata:

      creation_time   : 2013-10-30T17:56:34.000000Z

      handler_name    : ?Apple Video Media Handler

      vendor_id       : appl

      encoder         : Lavc58.134.100 libwebp_anim

[libwebp_anim @ 0x7f94eb8fa240] Using libwebp for RGB-to-YUV conversion. You may want to consider passing in YUV instead for lossy encoding.

frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x

[libwebp_anim @ 0x7f94eb8fa240] Encoding WebP frame failed with error: 4

Video encoding failed

Conversion failed!

There is also an issue with embedded when doing a library force refresh. When this new version came out I updated to it and activated a normal library rescan. This did not change anything so I initiated cache purged and then a force rescan. The messages from the library include many like these ones:

[2021-12-16T01:03:23.165Z]  INFO: [Audiobook] Metadata cover "/metadata/books/ab_rvybmtczdaato8m0d2/cover.jpg" was removed | "The Way of Kings"
[2021-12-16T01:03:23.167Z]  INFO: [Audiobook] Metadata cover "/metadata/books/ab_rh9kof6tnqd0mbxet5/cover.jpg" was removed | "The Name of the Wind"
[2021-12-16T01:03:23.167Z]  INFO: [Audiobook] Metadata cover "/metadata/books/ab_i3wtj7oi31ioky5ipn/cover.jpg" was removed | "14 - A Memory of Light"
[2021-12-16T01:03:23.168Z]  INFO: [Audiobook] Metadata cover "/metadata/books/ab_3312pr4w2btetb2ced/cover.png" was removed | "10 - Crossroads of Twilight"
[2021-12-16T01:03:23.168Z]  INFO: [Audiobook] Metadata cover "/metadata/books/ab_fmf0f9uo3ze04r4yjc/cover.png" was removed | "09 - Winter's Heart"
[2021-12-16T01:03:23.168Z]  INFO: [Audiobook] Metadata cover "/metadata/books/ab_s9wh0xksgtpqp2gkxm/cover.png" was removed | "06 - Lord of Chaos"
[2021-12-16T01:03:23.169Z]  INFO: [Audiobook] Metadata cover "/metadata/books/ab_hn6gj56qe2vv29ew21/cover.png" was removed | "05 -  The Fires of Heaven"
[2021-12-16T01:03:23.169Z]  INFO: [Audiobook] Metadata cover "/metadata/books/ab_ajpq4pn6s9tuhba9e1/cover.png" was removed | "04 - The Shadow Rising"
[2021-12-16T01:03:23.169Z]  INFO: [Audiobook] Metadata cover "/metadata/books/ab_ezhdpvfkz9hy5ntgd0/cover.png" was removed | "03 - The Dragon Reborn"
[2021-12-16T01:04:01.785Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "The Way of Kings" - bail
[2021-12-16T01:04:01.806Z]  INFO: [Server] Socket RcTInRJw8iLEGcr2AAAF disconnected from client "root" after 106306ms
[2021-12-16T01:04:01.807Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "The Name of the Wind" - bail
[2021-12-16T01:04:02.138Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "03 - The Dragon Reborn" - bail
[2021-12-16T01:04:02.139Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "04 - The Shadow Rising" - bail
[2021-12-16T01:04:02.139Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "05 -  The Fires of Heaven" - bail
[2021-12-16T01:04:02.139Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "06 - Lord of Chaos" - bail
[2021-12-16T01:04:02.140Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "09 - Winter's Heart" - bail
[2021-12-16T01:04:02.140Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "10 - Crossroads of Twilight" - bail
[2021-12-16T01:04:02.140Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "14 - A Memory of Light" - bail

These are all embedded ones and are removed. Watching the library live as the rescan happens shows covers continually being removed from those items that have embedded covers. The actual cover listed in the metadata path however is never deleted. Seems like somehow it thinks it needs to remove the cover which is tries to do but fails or has a race condition on for the forced rescan but then when it comes back around to extract the embedded cover it bails due to the presence of a cover existing in the metadata folder path for the book. The only way to have extracted covers again on those items is to delete them from library and scan again to re-import them.

@MidnightSnowleopard commented on GitHub (Dec 16, 2021): So that seems to have clarified some with some of the files it's indexing being legitmately corrupted entirely. There is also some that are just failing to convert. This is one of the messages of that type: ``` [2021-12-16T00:56:19.050Z] ERROR: [FfmpegHelpers] Resize Image Error Error: ffmpeg exited with code 1: Video encoding failed Conversion failed! media_type : 2 Duration: 13:42:07.43, start: 0.000000, bitrate: 64 kb/s Chapters: Chapter #0:0: start 0.000000, end 49327.431667 Metadata: Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, mono, fltp, 62 kb/s (default) Metadata: creation_time : 2013-10-30T17:54:03.000000Z handler_name : Apple Sound Media Handler vendor_id : [0][0][0][0] Stream #0:1(eng): Video: png (png / 0x20676E70), rgba(pc), 316x500 [SAR 2835:2835 DAR 79:125], 0 kb/s, 0.0000 fps, 0.0000 tbr, 600 tbn, 600 tbc (default) (attached pic) (timed thumbnails) Metadata: creation_time : 2013-10-30T17:56:34.000000Z handler_name : ?Apple Video Media Handler vendor_id : appl encoder : PNG Stream #0:2(eng): Data: bin_data (text / 0x74786574) Metadata: creation_time : 2013-10-30T17:56:34.000000Z handler_name : ?Apple Text Media Handler Stream #0:3: Video: png, rgba(pc), 316x480, 90k tbr, 90k tbn, 90k tbc (attached pic) Stream mapping: Stream #0:1 -> #0:0 (png (native) -> webp (libwebp_anim)) Press [q] to stop, [?] for help Output #0, webp, to '/metadata/cache/covers/ab_ljmaa3dmw953uqlbkc_400.webp': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: mp42mp41 media_type : 2 encoder : Lavf58.76.100 Chapters: Chapter #0:0: start 0.000000, end 49327.431667 Stream #0:0(eng): Video: webp, bgra(pc, gbr/unknown/unknown, progressive), 400x633 [SAR 50007:50000 DAR 79:125], q=2-31, 200 kb/s, 0.0000 fps, 1k tbn (default) (attached pic) (timed thumbnails) Metadata: creation_time : 2013-10-30T17:56:34.000000Z handler_name : ?Apple Video Media Handler vendor_id : appl encoder : Lavc58.134.100 libwebp_anim [libwebp_anim @ 0x7f94eb8fa240] Using libwebp for RGB-to-YUV conversion. You may want to consider passing in YUV instead for lossy encoding. frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x [libwebp_anim @ 0x7f94eb8fa240] Encoding WebP frame failed with error: 4 Video encoding failed Conversion failed! ``` There is also an issue with embedded when doing a library force refresh. When this new version came out I updated to it and activated a normal library rescan. This did not change anything so I initiated cache purged and then a force rescan. The messages from the library include many like these ones: ``` [2021-12-16T01:03:23.165Z] INFO: [Audiobook] Metadata cover "/metadata/books/ab_rvybmtczdaato8m0d2/cover.jpg" was removed | "The Way of Kings" [2021-12-16T01:03:23.167Z] INFO: [Audiobook] Metadata cover "/metadata/books/ab_rh9kof6tnqd0mbxet5/cover.jpg" was removed | "The Name of the Wind" [2021-12-16T01:03:23.167Z] INFO: [Audiobook] Metadata cover "/metadata/books/ab_i3wtj7oi31ioky5ipn/cover.jpg" was removed | "14 - A Memory of Light" [2021-12-16T01:03:23.168Z] INFO: [Audiobook] Metadata cover "/metadata/books/ab_3312pr4w2btetb2ced/cover.png" was removed | "10 - Crossroads of Twilight" [2021-12-16T01:03:23.168Z] INFO: [Audiobook] Metadata cover "/metadata/books/ab_fmf0f9uo3ze04r4yjc/cover.png" was removed | "09 - Winter's Heart" [2021-12-16T01:03:23.168Z] INFO: [Audiobook] Metadata cover "/metadata/books/ab_s9wh0xksgtpqp2gkxm/cover.png" was removed | "06 - Lord of Chaos" [2021-12-16T01:03:23.169Z] INFO: [Audiobook] Metadata cover "/metadata/books/ab_hn6gj56qe2vv29ew21/cover.png" was removed | "05 - The Fires of Heaven" [2021-12-16T01:03:23.169Z] INFO: [Audiobook] Metadata cover "/metadata/books/ab_ajpq4pn6s9tuhba9e1/cover.png" was removed | "04 - The Shadow Rising" [2021-12-16T01:03:23.169Z] INFO: [Audiobook] Metadata cover "/metadata/books/ab_ezhdpvfkz9hy5ntgd0/cover.png" was removed | "03 - The Dragon Reborn" [2021-12-16T01:04:01.785Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "The Way of Kings" - bail [2021-12-16T01:04:01.806Z] INFO: [Server] Socket RcTInRJw8iLEGcr2AAAF disconnected from client "root" after 106306ms [2021-12-16T01:04:01.807Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "The Name of the Wind" - bail [2021-12-16T01:04:02.138Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "03 - The Dragon Reborn" - bail [2021-12-16T01:04:02.139Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "04 - The Shadow Rising" - bail [2021-12-16T01:04:02.139Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "05 - The Fires of Heaven" - bail [2021-12-16T01:04:02.139Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "06 - Lord of Chaos" - bail [2021-12-16T01:04:02.140Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "09 - Winter's Heart" - bail [2021-12-16T01:04:02.140Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "10 - Crossroads of Twilight" - bail [2021-12-16T01:04:02.140Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "14 - A Memory of Light" - bail ``` These are all embedded ones and are removed. Watching the library live as the rescan happens shows covers continually being removed from those items that have embedded covers. The actual cover listed in the metadata path however is never deleted. Seems like somehow it thinks it needs to remove the cover which is tries to do but fails or has a race condition on for the forced rescan but then when it comes back around to extract the embedded cover it bails due to the presence of a cover existing in the metadata folder path for the book. The only way to have extracted covers again on those items is to delete them from library and scan again to re-import them.
Author
Owner

@advplyr commented on GitHub (Dec 16, 2021):

Thanks for all that info and logs, I found the issue with the covers getting removed. I pushed an update v1.6.42

There will still be the issue with the Ffmpeg command failing, but the error didn't show anything useful to go off of. Did you check that cover image in the file system to make sure you could open it and it wasn't corrupt?

@advplyr commented on GitHub (Dec 16, 2021): Thanks for all that info and logs, I found the issue with the covers getting removed. I pushed an update `v1.6.42` There will still be the issue with the Ffmpeg command failing, but the error didn't show anything useful to go off of. Did you check that cover image in the file system to make sure you could open it and it wasn't corrupt?
Author
Owner

@MidnightSnowleopard commented on GitHub (Dec 16, 2021):

The fix for the covers being removed on force re-scan is now fixed. Had to remove and re-add everything again but it now appears stable.

Unsure what the ffmpeg issue is. The files do show correct icons in explorer and checking the metadata given in the UI shows that there is a cover successfully extracted by Audiobookshelf itself. They are perfectly accessible and renderable outside of the program. Still investigating but all the ones that are having issues have the cover stored as a video track in PNG format. Possible that somehow that's tripping up the ffmpeg that is being used.

@MidnightSnowleopard commented on GitHub (Dec 16, 2021): The fix for the covers being removed on force re-scan is now fixed. Had to remove and re-add everything again but it now appears stable. Unsure what the ffmpeg issue is. The files do show correct icons in explorer and checking the metadata given in the UI shows that there is a cover successfully extracted by Audiobookshelf itself. They are perfectly accessible and renderable outside of the program. Still investigating but all the ones that are having issues have the cover stored as a video track in PNG format. Possible that somehow that's tripping up the ffmpeg that is being used.
Author
Owner

@advplyr commented on GitHub (Dec 19, 2021):

Embedded images in audio files should always show as a video track.
It might be specific to the webp encoding.

@advplyr commented on GitHub (Dec 19, 2021): Embedded images in audio files should always show as a video track. It might be specific to the webp encoding.
Author
Owner

@MidnightSnowleopard commented on GitHub (Dec 26, 2021):

Agreed, something with some of the covers doesn't convert well. Oddly though after doing another force re-scan to update my library for other reasons it has again started exhibiting the behavior of losing covers on ones it previously had.

Further force re-scans continue to display the message of

[2021-12-25T21:52:50.393Z]  WARN: [Audiobook] Extract embedded cover art but cover already exists for "Audiobook" - bail

The cover still exists on the filesystem under the metadata for the book. All of them affected seem to be explicitly embedded covers. There's considerably less of them affected by whatever is causing this as compared to before but it does still happen.

@MidnightSnowleopard commented on GitHub (Dec 26, 2021): Agreed, something with some of the covers doesn't convert well. Oddly though after doing another force re-scan to update my library for other reasons it has again started exhibiting the behavior of losing covers on ones it previously had. Further force re-scans continue to display the message of ``` [2021-12-25T21:52:50.393Z] WARN: [Audiobook] Extract embedded cover art but cover already exists for "Audiobook" - bail ``` The cover still exists on the filesystem under the metadata for the book. All of them affected seem to be explicitly embedded covers. There's considerably less of them affected by whatever is causing this as compared to before but it does still happen.
Author
Owner

@advplyr commented on GitHub (Dec 26, 2021):

Do you have the server setting enabled to auto search and use covers?

If you have debug logs enabled, I'm wondering if you see this log [Audiobook] "${this.title}" Check scan book cover removed.
Debug logs can be toggled on in the config -> logs page.

That log you showed will only print if the audiobook has embedded cover art, a cover image already in your filesystem, and the audiobook has an empty cover field. This means at some point the cover field on that audiobook is getting reset.

@advplyr commented on GitHub (Dec 26, 2021): Do you have the server setting enabled to auto search and use covers? If you have debug logs enabled, I'm wondering if you see this log `[Audiobook] "${this.title}" Check scan book cover removed`. Debug logs can be toggled on in the config -> logs page. That log you showed will only print if the audiobook has embedded cover art, a cover image already in your filesystem, and the audiobook has an empty cover field. This means at some point the cover field on that audiobook is getting reset.
Author
Owner

@MidnightSnowleopard commented on GitHub (Dec 27, 2021):

Another two rebuilds and several force re-scans later and it has decided to have no further problems. I can't reproduce so I'd say this is solved entirely.

Thanks for all the awesome work.

@MidnightSnowleopard commented on GitHub (Dec 27, 2021): Another two rebuilds and several force re-scans later and it has decided to have no further problems. I can't reproduce so I'd say this is solved entirely. Thanks for all the awesome work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#128