Jellyfin Forum
SOLVED: Problem with generationg video thumbinails - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Media Scanning & Identification (https://forum.jellyfin.org/f-media-scanning-identification)
+---- Thread: SOLVED: Problem with generationg video thumbinails (/t-solved-problem-with-generationg-video-thumbinails)



Problem with generationg video thumbinails - apaczenko1993 - 2025-01-15

Hello
I have problem with generate thumbinails in some video.
The log shows error like this:

Code:
[2025-01-15 13:21:56.715 +01:00] [ERR] [45] MediaBrowser.Providers.Videos.VideoMetadataService: Error in "Screen Grabber"
MediaBrowser.Common.FfmpegException: ffmpeg image extraction timed out for file:"/volume1/prywatne/Inne/Projekt_Lech.mp4" after 10000ms
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.

How can I solve this? Does it depend on whether I have GPU acceleration or not?
I tried to rescan my libray with GPU acceleration and without.
The libray type is movies and photos. Maybe the timeout is to small? 
The videos where I get error are 4k files, encoded in HEVC or AVC. I have no problem with 1080p files.


RE: Problem with generationg video thumbinails - TheDreadPirate - 2025-01-15

What is the output of ffprobe on that file?


RE: Problem with generationg video thumbinails - apaczenko1993 - 2025-01-15

For example full output for file

Code:
[2025-01-16 00:14:08.309 +01:00] [INF] [4] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting "/var/packages/ffmpeg7/target/bin/ffprobe" with args "-analyzeduration 200M -probesize 1G -i file:\"/volume1/prywatne/Inne/Projekt_Lech.mp4\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"

[2025-01-16 00:14:36.068 +01:00] [ERR] [69] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: I-frame image extraction failed, will attempt standard way. Input: "file:\"/volume1/prywatne/Inne/Projekt_Lech.mp4\""
MediaBrowser.Common.FfmpegException: ffmpeg image extraction timed out for file:"/volume1/prywatne/Inne/Projekt_Lech.mp4" after 10000ms

[2025-01-16 00:14:59.771 +01:00] [ERR] [71] MediaBrowser.Providers.Videos.VideoMetadataService: Error in "Screen Grabber"
MediaBrowser.Common.FfmpegException: ffmpeg image extraction timed out for file:"/volume1/prywatne/Inne/Projekt_Lech.mp4" after 10000ms



RE: Problem with generationg video thumbinails - TheDreadPirate - 2025-01-15

Probably some sort of corruption or edge case encoding. Not sure if there is a way to fix that without re-encoding.


RE: Problem with generationg video thumbinails - apaczenko1993 - 2025-01-15

OK, so can I set re-encoding for some selected files? I'm asking because when I scan the entire library again, it can randomly find thumbnails for files that previously had an error.


RE: Problem with generationg video thumbinails - TheDreadPirate - 2025-01-16

Perhaps the disk was just too busy before, causing it to reach the 10 second timeout?


RE: Problem with generationg video thumbinails - apaczenko1993 - 2025-01-17

Is it possible Smiling-face I wrote script in Python to generate thumbinails, and now I see the Jellyfin reads the image as thumbinail. Sometimes generating takes more than 10 seconds. In my opinion the timeout should be able to change in settings. I will add this script to task scheduler in NAS, so my problem should be solved.

If someone has the same problem, I can upload the script.