ConfusedPolarBear / intro-skipper

Fingerprint audio to automatically detect and skip intro sequences in Jellyfin
GNU General Public License v3.0
988 stars 388 forks source link

[Bug] Analyzing episodes fails #52

Open jenslys opened 2 years ago

jenslys commented 2 years ago

Describe the bug Pressing "Analyze episodes" fails instantly Screenshot 2022-07-05 at 15 12 02

System information

Jellyfin logs

[2022-07-05 15:07:47.143 +02:00] [INF] [14] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Analyze episodes"
[2022-07-05 15:07:47.195 +02:00] [ERR] [14] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error
ConfusedPolarBear.Plugin.IntroSkipper.FingerprintException: No episodes to analyze: either no show libraries are defined or ffmpeg could not be found
   at ConfusedPolarBear.Plugin.IntroSkipper.FingerprinterTask.ExecuteAsync(IProgress`1 progress, CancellationToken cancellationToken)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) in /github/workspace/spk/jellyfin/work-aarch64-7.0/jellyfin-10.8.0/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs:line 412
[2022-07-05 15:07:47.257 +02:00] [INF] [14] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Analyze episodes" Failed after 0 minute(s) and 0 seconds

Analyzing the episodes worked the first time I installed the plugin, but now when I tried to press it again after adding some tv-shows, it fails.

ConfusedPolarBear commented 2 years ago

Can you try the beta release of v0.1.6?

Weevild commented 2 years ago

@ConfusedPolarBear Sorry for hijacking the thread, I'm not the OP (obviously) but I'm having the same issue. My Jellyfin is running in a container with version 10.8.1 and running the Analyze task gives this error prompt in the logs (I've updated the plugin to the .6-beta 2 version):


[00:05:39] [ERR] [8] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: The installed version of ffmpeg does not support chromaprint

2022-08-02 00:05:39,687 DEBG 'jellyfin' stdout output:
[00:05:39] [ERR] [8] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error
ConfusedPolarBear.Plugin.IntroSkipper.FingerprintException: ffmpeg with chromaprint is not installed on this system - episodes will not be analyzed. If Jellyfin is running natively, install jellyfin-ffmpeg5. If Jellyfin is running in a container, upgrade it to the latest version of 10.8.0.
   at ConfusedPolarBear.Plugin.IntroSkipper.QueueManager.EnqueueAllEpisodes()
   at ConfusedPolarBear.Plugin.IntroSkipper.FingerprinterTask.ExecuteAsync(IProgress`1 progress, CancellationToken cancellationToken)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) in /tmp/makepkg/jellyfin/src/jellyfin-10.8.1/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs:line 417

2022-08-02 00:05:39,688 DEBG 'jellyfin' stdout output:
[00:05:39] [INF] [8] Emby.Server.Implementations.ScheduledTasks.TaskManager: Analyze episodes Failed after 0 minute(s) and 0 seconds

2022-08-02 00:05:39,689 DEBG 'jellyfin' stdout output:
[00:05:39] [INF] [8] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks´´´
ConfusedPolarBear commented 2 years ago

Can you (as well as the OP) enable verbose logs and post the logs of Jellyfin starting up? Include all the lines from the initial Jellyfin version message to the ffmpeg with chromaprint is not installed error.

Weevild commented 2 years ago

@ConfusedPolarBear Does this suffice?:


[14:06:53] [ERR] [1] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: The installed version of ffmpeg does not support chromaprint

2022-08-02 14:06:53,747 DEBG 'jellyfin' stdout output:
[14:06:53] [ERR] [1] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: Unable to run startup enqueue: ConfusedPolarBear.Plugin.IntroSkipper.FingerprintException: ffmpeg with chromaprint is not installed on this system - episodes will not be analyzed. If Jellyfin is running natively, install jellyfin-ffmpeg5. If Jellyfin is running in a container, upgrade it to the latest version of 10.8.0.
   at ConfusedPolarBear.Plugin.IntroSkipper.QueueManager.EnqueueAllEpisodes()
   at ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint.RunAsync()

2022-08-02 14:06:53,748 DEBG 'jellyfin' stdout output:
[14:06:53] [DBG] [1] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: Total enqueued seasons: 0 (0 episodes)

2022-08-02 14:06:53,749 DEBG 'jellyfin' stdout output:
[14:06:53] [INF] [1] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification: LibrarySyncNotification Startup...

2022-08-02 14:06:53,750 DEBG 'jellyfin' stdout output:
[14:06:53] [INF] [1] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: UserSyncNotification Startup...

2022-08-02 14:06:53,920 DEBG 'jellyfin' stdout output:
[14:06:53] [INF] [1] Emby.Server.Implementations.ApplicationHost: Executed all post-startup entry points in 0:00:00.198103
[14:06:53] [INF] [1] Main: Startup complete 0:00:15.5343489

2022-08-02 14:06:53,921 DEBG 'jellyfin' stdout output:
[14:06:53] [INF] [13] Emby.Server.Implementations.IO.LibraryMonitor: Watching directory /Media/Anime/Movies

2022-08-02 14:06:54,137 DEBG 'jellyfin' stdout output:
[14:06:54] [INF] [8] Emby.Server.Implementations.IO.LibraryMonitor: Watching directory /Media/Anime/TV

2022-08-02 14:06:54,576 DEBG 'jellyfin' stdout output:
[14:06:54] [INF] [8] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 192.168.0.49 request

2022-08-02 14:06:54,639 DEBG 'jellyfin' stdout output:
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'AccessSchedule' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.

2022-08-02 14:06:54,640 DEBG 'jellyfin' stdout output:
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'ActivityLog' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'CustomItemDisplayPreferences' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.

2022-08-02 14:06:54,640 DEBG 'jellyfin' stdout output:
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'DisplayPreferences' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'HomeSection' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.

2022-08-02 14:06:54,641 DEBG 'jellyfin' stdout output:
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'ImageInfo' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'ItemDisplayPreferences' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'Permission' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'Preference' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.

2022-08-02 14:06:54,641 DEBG 'jellyfin' stdout output:
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'ApiKey' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'Device' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'DeviceOptions' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.
[14:06:54] [WRN] [15] Microsoft.EntityFrameworkCore.Model.Validation: The entity type 'User' is configured to use schema 'jellyfin', but SQLite does not support schemas. This configuration will be ignored by the SQLite provider.

2022-08-02 14:06:56,539 DEBG 'jellyfin' stdout output:
[14:06:56] [INF] [25] Emby.Server.Implementations.ScheduledTasks.TaskManager: StartupTrigger fired for task: Update Plugins

2022-08-02 14:06:56,541 DEBG 'jellyfin' stdout output:
[14:06:56] [INF] [25] Emby.Server.Implementations.ScheduledTasks.TaskManager: Queuing task PluginUpdateTask

2022-08-02 14:06:56,544 DEBG 'jellyfin' stdout output:
[14:06:56] [INF] [13] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing Update Plugins

2022-08-02 14:06:58,136 DEBG 'jellyfin' stdout output:
[14:06:58] [INF] [25] Emby.Server.Implementations.ScheduledTasks.TaskManager: Update Plugins Completed after 0 minute(s) and 1 seconds

2022-08-02 14:06:58,145 DEBG 'jellyfin' stdout output:
[14:06:58] [INF] [25] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks

2022-08-02 14:09:57,766 DEBG 'jellyfin' stdout output:
[14:09:57] [INF] [46] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing Analyze episodes

2022-08-02 14:09:57,777 DEBG 'jellyfin' stdout output:
[14:09:57] [DBG] [46] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: Starting ffmpeg with the following arguments: -hide_banner -loglevel warning -muxers

2022-08-02 14:09:57,779 DEBG 'jellyfin' stdout output:
[14:09:57] [VRB] [46] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: ffmpeg muxers: File formats:
 D. = Demuxing supported
 .E = Muxing supported
 --
  E 3g2             3GP2 (3GPP2 file format)
  E 3gp             3GP (3GPP file format)
  E a64             a64 - video for Commodore 64
  E ac3             raw AC-3
  E adts            ADTS AAC (Advanced Audio Coding)
  E adx             CRI ADX
  E aiff            Audio IFF
  E alaw            PCM A-law
  E alp             LEGO Racers ALP
  E alsa            ALSA audio output
  E amr             3GPP AMR
  E amv             AMV
  E apm             Ubisoft Rayman 2 APM
  E apng            Animated Portable Network Graphics
  E aptx            raw aptX (Audio Processing Technology for Bluetooth)
  E aptx_hd         raw aptX HD (Audio Processing Technology for Bluetooth)
  E argo_asf        Argonaut Games ASF
  E asf             ASF (Advanced / Active Streaming Format)
  E asf_stream      ASF (Advanced / Active Streaming Format)
  E ass             SSA (SubStation Alpha) subtitle
  E ast             AST (Audio Stream)
  E au              Sun AU
  E avi             AVI (Audio Video Interleaved)
  E avm2            SWF (ShockWave Flash) (AVM2)
  E avs2            raw AVS2-P2/IEEE1857.4 video
  E bit             G.729 BIT file format
  E caf             Apple CAF (Core Audio Format)
  E cavsvideo       raw Chinese AVS (Audio Video Standard) video
  E codec2          codec2 .c2 muxer
  E codec2raw       raw codec2 muxer
  E crc             CRC testing
  E dash            DASH Muxer
  E data            raw data
  E daud            D-Cinema audio
  E dirac           raw Dirac
  E dnxhd           raw DNxHD (SMPTE VC-3)
  E dts             raw DTS
  E dv              DV (Digital Video)
  E dvd             MPEG-2 PS (DVD VOB)
  E eac3            raw E-AC-3
  E f32be           PCM 32-bit floating-point big-endian
  E f32le           PCM 32-bit floating-point little-endian
  E f4v             F4V Adobe Flash Video
  E f64be           PCM 64-bit floating-point big-endian
  E f64le           PCM 64-bit floating-point little-endian
  E fbdev           Linux framebuffer
  E ffmetadata      FFmpeg metadata in text
  E fifo            FIFO queue pseudo-muxer
  E fifo_test       Fifo test muxer
  E film_cpk        Sega FILM / CPK
  E filmstrip       Adobe Filmstrip
  E fits            Flexible Image Transport System
  E flac            raw FLAC
  E flv             FLV (Flash Video)
  E framecrc        framecrc testing
  E framehash       Per-frame hash testing
  E framemd5        Per-frame MD5 testing
  E g722            raw G.722
  E g723_1          raw G.723.1
  E g726            raw big-endian G.726 ("left-justified")
  E g726le          raw little-endian G.726 ("right-justified")
  E gif             CompuServe Graphics Interchange Format (GIF)
  E gsm             raw GSM
  E gxf             GXF (General eXchange Format)
  E h261            raw H.261
  E h263            raw H.263
  E h264            raw H.264 video
  E hash            Hash testing
  E hds             HDS Muxer
  E hevc            raw HEVC video
  E hls             Apple HTTP Live Streaming
  E ico             Microsoft Windows ICO
  E ilbc            iLBC storage
  E image2          image2 sequence
  E image2pipe      piped image2 sequence
  E ipod            iPod H.264 MP4 (MPEG-4 Part 14)
  E ircam           Berkeley/IRCAM/CARL Sound Format
  E ismv            ISMV/ISMA (Smooth Streaming)
  E ivf             On2 IVF
  E jacosub         JACOsub subtitle format
  E kvag            Simon & Schuster Interactive VAG
  E latm            LOAS/LATM
  E lrc             LRC lyrics
  E m4v             raw MPEG-4 video
  E matroska        Matroska
  E md5             MD5 testing
  E microdvd        MicroDVD subtitle format
  E mjpeg           raw MJPEG video
  E mkvtimestamp_v2 extract pts as timecode v2 format, as defined by mkvtoolnix
  E mlp             raw MLP
  E mmf             Yamaha SMAF
  E mov             QuickTime / MOV
  E mp2             MP2 (MPEG audio layer 2)
  E mp3             MP3 (MPEG audio layer 3)
  E mp4             MP4 (MPEG-4 Part 14)
  E mpeg            MPEG-1 Systems / MPEG program stream
  E mpeg1video      raw MPEG-1 video
  E mpeg2video      raw MPEG-2 video
  E mpegts          MPEG-TS (MPEG-2 Transport Stream)
  E mpjpeg          MIME multipart JPEG
  E mulaw           PCM mu-law
  E mxf             MXF (Material eXchange Format)
  E mxf_d10         MXF (Material eXchange Format) D-10 Mapping
  E mxf_opatom      MXF (Material eXchange Format) Operational Pattern Atom
  E null            raw null video
  E nut             NUT
  E oga             Ogg Audio
  E ogg             Ogg
  E ogv             Ogg Video
  E oma             Sony OpenMG audio
  E opus            Ogg Opus
  E oss             OSS (Open Sound System) playback
  E psp             PSP MP4 (MPEG-4 Part 14)
  E rawvideo        raw video
  E rm              RealMedia
  E roq             raw id RoQ
  E rso             Lego Mindstorms RSO
  E rtp             RTP output
  E rtp_mpegts      RTP/mpegts output format
  E rtsp            RTSP output
  E s16be           PCM signed 16-bit big-endian
  E s16le           PCM signed 16-bit little-endian
  E s24be           PCM signed 24-bit big-endian
  E s24le           PCM signed 24-bit little-endian
  E s32be           PCM signed 32-bit big-endian
  E s32le           PCM signed 32-bit little-endian
  E s8              PCM signed 8-bit
  E sap             SAP output
  E sbc             raw SBC
  E scc             Scenarist Closed Captions
  E segment         segment
  E singlejpeg      JPEG single image
  E smjpeg          Loki SDL MJPEG
  E smoothstreaming Smooth Streaming Muxer
  E sox             SoX native
  E spdif           IEC 61937 (used on S/PDIF - IEC958)
  E spx             Ogg Speex
  E srt             SubRip subtitle
  E stream_segment,ssegment streaming segment muxer
  E streamhash      Per-stream hash testing
  E sup             raw HDMV Presentation Graphic Stream subtitles
  E svcd            MPEG-2 PS (SVCD)
  E swf             SWF (ShockWave Flash)
  E tee             Multiple muxer tee
  E truehd          raw TrueHD
  E tta             TTA (True Audio)
  E ttml            TTML subtitle
  E u16be           PCM unsigned 16-bit big-endian
  E u16le           PCM unsigned 16-bit little-endian
  E u24be           PCM unsigned 24-bit big-endian
  E u24le           PCM unsigned 24-bit little-endian
  E u32be           PCM unsigned 32-bit big-endian
  E u32le           PCM unsigned 32-bit little-endian
  E u8              PCM unsigned 8-bit
  E uncodedframecrc uncoded framecrc testing
  E vc1             raw VC-1 video
  E vc1test         VC-1 test bitstream
  E vcd             MPEG-1 Systems / MPEG program stream (VCD)
  E vidc            PCM Archimedes VIDC
  E video4linux2,v4l2 Video4Linux2 output device
  E vob             MPEG-2 PS (VOB)
  E voc             Creative Voice
  E w64             Sony Wave64
  E wav             WAV / WAVE (Waveform Audio)
  E webm            WebM
  E webm_chunk      WebM Chunk Muxer
  E webm_dash_manifest WebM DASH Manifest
  E webp            WebP
  E webvtt          WebVTT subtitle
  E wtv             Windows Television (WTV)
  E wv              raw WavPack
  E yuv4mpegpipe    YUV4MPEG pipe

2022-08-02 14:09:57,780 DEBG 'jellyfin' stdout output:
[14:09:57] [ERR] [46] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: The installed version of ffmpeg does not support chromaprint

2022-08-02 14:09:57,786 DEBG 'jellyfin' stdout output:
[14:09:57] [ERR] [46] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error
ConfusedPolarBear.Plugin.IntroSkipper.FingerprintException: ffmpeg with chromaprint is not installed on this system - episodes will not be analyzed. If Jellyfin is running natively, install jellyfin-ffmpeg5. If Jellyfin is running in a container, upgrade it to the latest version of 10.8.0.
   at ConfusedPolarBear.Plugin.IntroSkipper.QueueManager.EnqueueAllEpisodes()
   at ConfusedPolarBear.Plugin.IntroSkipper.FingerprinterTask.ExecuteAsync(IProgress`1 progress, CancellationToken cancellationToken)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) in /tmp/makepkg/jellyfin/src/jellyfin-10.8.1/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs:line 417

2022-08-02 14:09:57,786 DEBG 'jellyfin' stdout output:
[14:09:57] [INF] [46] Emby.Server.Implementations.ScheduledTasks.TaskManager: Analyze episodes Failed after 0 minute(s) and 0 seconds

2022-08-02 14:09:57,789 DEBG 'jellyfin' stdout output:
[14:09:57] [INF] [46] Emby.Server.Implementations.ScheduledTasks.TaskManager: ExecuteQueuedTasks´´´
ConfusedPolarBear commented 2 years ago

The copy of ffmpeg that is installed in your container does not support the chromaprint muxer that is required by the plugin to generate audio fingerprints. Support for this muxer was added in version 5.0.1-5 of jellyfin-ffmpeg.

[11:12:51] [INF] [1] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: Running startup enqueue
[11:12:51] [DBG] [1] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: Starting ffmpeg with the following arguments: -hide_banner -loglevel warning -version
[11:12:51] [DBG] [1] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: ffmpeg version information: ffmpeg version 5.0.1-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
Weevild commented 2 years ago
  1. I'm using binhex's docker container based on arch linux.
  2. Seems like I've got version 4.4.1 running oddly enough.
    
    [2022-08-03 15:54:28.015 +02:00] [DBG] [1] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: Starting ffmpeg with the following arguments: "-hide_banner -loglevel warning -version"
    [2022-08-03 15:54:28.018 +02:00] [DBG] [1] ConfusedPolarBear.Plugin.IntroSkipper.Entrypoint: ffmpeg version information: "ffmpeg version 4.4.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
    built with gcc 8 (Debian 8.3.0-6)´´´
ConfusedPolarBear commented 2 years ago

I looked into the binhex/arch-jellyfin container some and confirmed that they are currently shipping an older version of ffmpeg without support for the chromaprint muxer that the plugin requires. Due to this missing dependency, that container image can't be used to run this plugin. This should be resolved once this upstream issue is fixed.

Weevild commented 2 years ago

Great, thanks for the update. Have you confirmed if ffmpeg5 ships with the linuxserver version?

Weevild commented 2 years ago

@ConfusedPolarBear Binhex has updated the container and I've now managed to run the Analyze task without an error prompt. I'll close my own issue on this. Thanks for your time and help!

steelersfan7 commented 2 years ago

Just to add to this, I am using the newest plugin(1.6), and the jellyfin native baremetal install(nightly). I think i need to install ffmpeg 5