audiobookshelf icon indicating copy to clipboard operation
audiobookshelf copied to clipboard

[Bug]: Some covers cannot be fetched and displayed (invalid cover)

Open chonki opened this issue 2 years ago • 2 comments

Describe the issue

Some covers cannot be displayed.

When i try to update some missing covers via Edit->Covers->Search->"Click on Cover" i get an "Inavlid Cover"-Image grafik

The log shows the following error:

[2022-08-05 21:14:15]  INFO: [Server] Init v2.1.1
...
[2022-08-05 21:19:45]  INFO: [CoverManager] Downloaded libraryItem cover "/xxxxxxx/cover.jpg" from url "https://m.media-amazon.com/images/I/915+pQSMURS.jpg" for "xxxxxxx"
[2022-08-05 21:19:47] ERROR: [FfmpegHelpers] Resize Image Error Error: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!
  ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219
  configuration: --prefix=/usr --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --disable-debug
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, image2, from '/xxxxxxxxxxxx/cover.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 133843 kb/s
  Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 2400x2400 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> webp (libwebp_anim))
Press [q] to stop, [?] for help
[Parsed_scale_0 @ 0x7fd6f6687e40] Error when evaluating the expression '400'.
[Parsed_scale_0 @ 0x7fd6f6687e40] Failed to configure output pad on Parsed_scale_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!
...

Steps to reproduce the issue

  1. Fetch the cover from Audible Edit->Covers->Search (Audible)->"click on cover" i get an "Inavlid Cover"-Image
  2. Get Invalid Cover Image and Error in Log

Audiobookshelf version

v2.1.1

How are you running audiobookshelf?

Docker

chonki avatar Aug 05 '22 21:08 chonki

I tried that exact image url and it worked for me. If you enter that URL directly what happens then? Do you have another URL I can try that also didn't work? Are you storing the covers with your library item or in the /metadata?

advplyr avatar Aug 05 '22 23:08 advplyr

I am storing the covers with my library items.

If i enter the url directly i get the same error message:

[2022-08-08 18:20:10]  INFO: [CoverManager] Downloaded libraryItem cover "/xxxxxxx/cover.jpg" from url "https://m.media-amazon.com/images/I/915+pQSMURS.jpg" for "Rachesommer"
[2022-08-08 18:20:11] ERROR: [FfmpegHelpers] Resize Image Error Error: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!
  ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219
  configuration: --prefix=/usr --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --disable-debug
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, image2, from '/xxxxxx/cover.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 133843 kb/s
  Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 2400x2400 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> webp (libwebp_anim))
Press [q] to stop, [?] for help
[Parsed_scale_0 @ 0x7f78a1234e40] Error when evaluating the expression '400'.
[Parsed_scale_0 @ 0x7f78a1234e40] Failed to configure output pad on Parsed_scale_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

I have the following permission on the cover:

$ ls -n cover.jpg
-rwxr--r-- 1 1000 1000 669216 Aug  8 20:20 cover.jpg

The cover on the second book is working (with the cover image having excatly the same dimensions as the book with the error)

chonki avatar Aug 08 '22 18:08 chonki

Is this still happening on the latest version?

advplyr avatar Oct 20 '22 22:10 advplyr

Is this still happening on the latest version? This is still happening on v2.2.1

I manualy downloaded the image (https://m.media-amazon.com/images/I/915+pQSMURS.jpg) and if i try to manualy upload the image i get the same error message. But when i open and save the image in paint and try to upload it again it works. The error seems to be ffmpeg related :(

[2022-10-21 14:01:47]  INFO: [Server] Socket Connected EwmTz8n4JaS1dIB9AAAV
[2022-10-21 14:02:00]  INFO: [CoverManager] Downloaded libraryItem cover "/xxxxxx/cover.jpg" from url "https://m.media-amazon.com/images/I/915+pQSMURS.jpg" for "Rachesommer"
[2022-10-21 14:02:02] ERROR: [FfmpegHelpers] Resize Image Error Error: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!
  ffmpeg version 5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219
  configuration: --prefix=/usr --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --disable-debug
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Input #0, image2, from '/xxxxxx/cover.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 133843 kb/s
  Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 2400x2400 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> webp (libwebp_anim))
Press [q] to stop, [?] for help
[Parsed_scale_0 @ 0x7f03cba30e40] Error when evaluating the expression '400'.
[Parsed_scale_0 @ 0x7f03cba30e40] Failed to configure output pad on Parsed_scale_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

chonki avatar Oct 21 '22 14:10 chonki

What system are you running docker on?

advplyr avatar Oct 27 '22 22:10 advplyr

What system are you running docker on?

Ubuntu 20.04.4 LTS Docker version 20.10.17, build 100c701

chonki avatar Oct 31 '22 11:10 chonki

Are you still having this issue? Is this just isolated to that one cover?

advplyr avatar Mar 13 '23 22:03 advplyr