jumoog / intro-skipper

Fingerprint audio to automatically detect and skip intro/credit sequences in Jellyfin
https://discord.gg/AYZ7RJ3BuA
GNU General Public License v3.0
607 stars 37 forks source link

[Bug]: Skip credits incorrectly detects part of the show #234

Open accountForIssues opened 1 month ago

accountForIssues commented 1 month ago

Self service debugging

Describe the bug

Maybe this isn't really a bug but all the episodes of the TV show Extraordinary always start with a few seconds of end-titles and then the episode continues (imagine a cold open but at the end) and then the final full credits.

I was wondering if there was a way to improve this false positive detection already or in the future so that the episode part is not included.

Jellyfin install method

Docker

Container image/tag or Jellyfin version

jellyfin/jellyfin:latest

Operating System

NAS Linux 5.10.60-qnap

IMDb ID of that TV Series

tt14531842

Support Bundle

* Jellyfin version: 10.9.8
* Plugin version: 0.2.0+c0708528f0d2
* Queue contents: 3419 episodes, 266 seasons
* Warnings: `UnableToAddSkipButton, InvalidChromaprintFingerprint`
* FFmpeg: `okay`

FFmpeg version:

ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil      58.  2.100 / 58.  2.100
libavcodec     60.  3.100 / 60.  3.100
libavformat    60.  3.100 / 60.  3.100
libavdevice    60.  1.100 / 60.  1.100
libavfilter     9.  3.100 /  9.  3.100
libswscale      7.  1.100 /  7.  1.100
libswresample   4. 10.100 /  4. 10.100
libpostproc    57.  1.100 / 57.  1.100


### Jellyfin logs

_No response_
rlauuzo commented 1 month ago

Can you post the MediaInfo for one of these files? I assume it might have unusual chapter names.

accountForIssues commented 1 month ago

Unfortunately, it's just a single marker for "Credits" which starts around (usually before) the mid credits scene.

And I realised it might be a bit more difficult than that to "fix" this by just audio analysis. Because they also have a different song at the end of each episode. I checked and the plugin is using the chapter marker for the credits.

I can also upload a small clip somewhere if that would help.

The MediaInfos:

General
Unique ID                                : 78499313183519072169774631626499435871 (0x3B0E6AF41D67445F5A0477ADCE4C2D5F)
Complete name                            : Extraordinary - 01x05 The Jen Show.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 3.30 GiB
Duration                                 : 28 min 28 s
Overall bit rate                         : 16.6 Mb/s
Frame rate                               : 23.976 FPS
Writing application                      : mkvmerge v73.0.0 ('25 or 6 to 4') 64-bit
Writing library                          : libebml v1.4.4 + libmatroska v1.7.1

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5@High
HDR format                               : Dolby Vision, Version 1.0, Profile 5, dvhe.05.06, BL+RPU
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 28 min 28 s
Bit rate                                 : 16.3 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.082
Stream size                              : 3.25 GiB (98%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
Color range                              : Full

Audio
ID                                       : 2
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : A_EAC3
Duration                                 : 28 min 28 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 52.1 MiB (2%)
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Text #1
ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 27 min 42 s
Bit rate                                 : 79 b/s
Frame rate                               : 0.276 FPS
Count of elements                        : 458
Stream size                              : 16.1 KiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No

Menu
00:01:27.462                             : en:Intro
00:01:31.425                             : en:Scene 1
00:27:22.851                             : en:Credits
General
Unique ID                                : 156535467369369800923601858646356826917 (0x75C3A267CFA5C99BFDE26B9C77A49B25)
Complete name                            : Extraordinary - 01x06 The Real Powers are the Friends we Made Along the way.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 3.39 GiB
Duration                                 : 29 min 21 s
Overall bit rate                         : 16.5 Mb/s
Frame rate                               : 23.976 FPS
Writing application                      : mkvmerge v73.0.0 ('25 or 6 to 4') 64-bit
Writing library                          : libebml v1.4.4 + libmatroska v1.7.1

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5@High
HDR format                               : Dolby Vision, Version 1.0, Profile 5, dvhe.05.06, BL+RPU
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 29 min 21 s
Bit rate                                 : 16.3 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.082
Stream size                              : 3.34 GiB (98%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
Color range                              : Full

Audio
ID                                       : 2
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : A_EAC3
Duration                                 : 29 min 21 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 53.8 MiB (2%)
Language                                 : English
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Text #1
ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Duration                                 : 28 min 26 s
Bit rate                                 : 67 b/s
Frame rate                               : 0.257 FPS
Count of elements                        : 439
Stream size                              : 14.1 KiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No

Menu
00:01:27.004                             : en:Intro
00:01:30.966                             : en:Scene 1
00:28:20.701                             : en:Credits
AbandonedCart commented 1 month ago

Using a different song for the credits each time is the kryptonite to chromaprint, but black screen and chapters should still be somewhat handy. Does the mid credit scene always have the same length?

An easy fix would be to then add that length to what it detects for each episode, which wouldn’t be the most inconvenient thing in the new UI.

Unfortunately, you’ll get stuck with the first chunk of the credits unless the plugin was rewritten to skip multiple credit instances sequentially.

accountForIssues commented 1 month ago

Yeah I realised it a bit too late. As it was skipping the credits, I thought the plugin was doing something with the video as well (and not just following the markers).

For now, I'll just manually tweak them. It's only 16 episodes so not that bad. The new UI works great so should be easy enough.

AbandonedCart commented 1 month ago

Alright, that works. Unfortunately, you found the perfect situation the break detection. Sorry for the hassle.

VampiricAlien commented 1 month ago

I can second this. Chapter marker at 21:41 as end credits yet the show runs for 23 minutes. I always miss out on the ending.

Adding some extra options could help, such as turning credits off for some shows?

AbandonedCart commented 1 month ago

@VampiricAlien A bunch of extra options were just added. There's a new editor, new offset options, and a bunch of bug fixes. Are you using the latest release?

VampiricAlien commented 1 month ago

@AbandonedCart Plugin version: 0.2.0+c0708528f0d2 (0.2.14)

AbandonedCart commented 1 month ago

https://github.com/jumoog/intro-skipper/releases/tag/10.9%2Fpreview

I should have specified preview release.

VampiricAlien commented 1 month ago

"This is a prerelease version." How will this version help with ending credits?

AbandonedCart commented 1 month ago

Some extra options will be available in the next release.

VampiricAlien commented 1 month ago

I can wait for the next release, only one show is effected that I know of.

You and the other developers are doing good work developing the plugin.

AbandonedCart commented 1 month ago

Thanks, but they are doing all the work. I mostly just just throw out ideas.

The UI changes may have made it into the last release. I didn't check the hashes, but the dates line up. If it did, you can edit the credit times directly in the episode info window. If it was a more general issue, then the next update would be more useful because that adds a global offset for delaying the credits skip. That would be more if it were every show, though.

VampiricAlien commented 1 month ago

Team effort. I haven't had time to install the that update yet.

What about having a option that disables credit for an season or show? another suggestion for Select TV Series to manage would be to add search to make finding shows easier,