intro-skipper icon indicating copy to clipboard operation
intro-skipper copied to clipboard

Recap Detection

Open jumoog opened this issue 1 year ago • 5 comments

find a way thats not CPU/GPU heavy

jumoog avatar Apr 29 '24 21:04 jumoog

https://www.primevideotech.com/computer-vision/automatically-detecting-recaps-introductions-and-credits-in-content-at-scale

jumoog avatar May 01 '24 12:05 jumoog

Here are some approaches for recap detection in TV series:

  • Scene Classification with Machine Learning: This method involves training a machine learning model to classify video scenes based on features like fast cuts, flashbacks, and voiceovers, which are common in recaps. Tools like TensorFlow or PyTorch can be used for this purpose.

  • Audio Fingerprinting: Techniques like audio fingerprinting can be used to identify recurring music or sound effects that indicate recaps. This might involve generating fingerprints for the intros and outros of known recap segments and then comparing them to the episodes.

  • Leveraging Subtitles/Closed Captions: If available, subtitles or closed captions can offer clues about recaps. Look for phrases like "Previously on" or "Last time" that often precede recaps.

  • Pre-existing Recap Information: Some TV series might have information about recaps readily available online (e.g., fan forums, episode summaries). You can utilize this to identify recap segments.

jumoog avatar May 01 '24 12:05 jumoog

Okay the english subtitle has <i>Previously on</i> and ends with a long blackframe

jumoog avatar May 05 '24 14:05 jumoog

https://github.com/Hellowlol/bw_plex does this

previously on, last season, last episode

Jellyfin extracts subtitles on demand, not during indexing. So we have to extract the subtitles ourselves using ffprobe and ffmpeg.

jumoog avatar May 05 '24 15:05 jumoog

Don't forget checking chapters. As far as anime goes, they do label the recap (if they label chapters anyway).

AbandonedCart avatar Aug 03 '24 02:08 AbandonedCart

I guess we can use https://github.com/jellyfin/jellyfin-plugin-subtitleextract to extract the subtitles during scan

jumoog avatar Nov 10 '24 12:11 jumoog