Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen Grabber\Image Extractor Not Always Working #2355

Open
Artiume opened this issue Jan 30, 2020 · 24 comments
Open

Screen Grabber\Image Extractor Not Always Working #2355

Artiume opened this issue Jan 30, 2020 · 24 comments
Labels
bug Something isn't working confirmed This issue has been reviewed and confirmed

Comments

@Artiume
Copy link
Contributor

Artiume commented Jan 30, 2020

Describe the bug

Found logs for FFmpeg Extractor trying to run. Everything is disabled so it shouldn't be running.

The System Exception errors are also interesting, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset

Expected behavior

Extractor shouldn't be attempting to run when it's not called for.
Logs

[2020-01-30 15:56:06.345 -05:00] [INF] [14] MediaBrowser.MediaEncoding.Encoder.MediaEncoder:Killing ffmpeg process
[2020-01-30 15:56:06.345 -05:00] [ERR] [14] MediaBrowser.MediaEncoding.Encoder.MediaEncoder:ffmpeg image extraction failed for file:"/media/movies/F/Freaks (1932)/Freaks (1932) WEBDL-1080p.mkv"
[2020-01-30 15:56:06.346 -05:00] [ERR] [14] MediaBrowser.MediaEncoding.Encoder.MediaEncoder:I-frame image extraction failed, will attempt standard way. Input: "file:\"/media/movies/F/Freaks (1932)/Freaks (1932) WEBDL-1080p.mkv\""
System.Exception: ffmpeg image extraction failed for file:"/media/movies/F/Freaks (1932)/Freaks (1932) WEBDL-1080p.mkv"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
@Artiume Artiume added the bug Something isn't working label Jan 30, 2020
@Artiume
Copy link
Contributor Author

Artiume commented Jan 31, 2020

@Artiume
Copy link
Contributor Author

Artiume commented Feb 24, 2020

every image extractor is turned off. found this for a music file.
[2020-02-23 19:58:32.991 -05:00] [ERR] [14] App: Error in "Image Extractor" System.Exception: ffmpeg image extraction failed for file:"/media/music/file" at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable1 imageStreamIndex, Nullable1 threedFormat, Nullable1 offset, Boolean useIFrame, CancellationToken cancellationToken)
at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable1 threedFormat, Nullable1 offset, CancellationToken cancellationToken) at MediaBrowser.Providers.MediaInfo.AudioImageProvider.GetImage(Audio item, List1 imageStreams, CancellationToken cancellationToken)
at MediaBrowser.Providers.Manager.ItemImageProvider.RefreshFromProvider(BaseItem item, IDynamicImageProvider provider, ImageRefreshOptions refreshOptions, TypeOptions savedOptions, LibraryOptions libraryOptions, ICollection1 downloadedImages, RefreshResult result, CancellationToken cancellationToken)

Edit: Whelp, I accidently had the image extractor on for music. That being said, the image extractor is currently failing.

So I haven't seen any movie Extraction attempts so far, I can change the ticket to image failure. It might be because the file has no image (can ffprobe verify that first before attempting to extract?) or the extractor is failing to pull the image. I don't know if I have any music that has images so I can't verify it.

@Artiume
Copy link
Contributor Author

Artiume commented Feb 24, 2020

[2020-02-23 20:44:40.573 -05:00] [ERR] [14] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/anime/Mahou Shoujo! Naria☆Girls/Season 1/Mahou Shoujo! Naria☆Girls - S01E12 - A World Without Magical Girls HDTV-720p.mkv"
this is in nightly20200223

Both of these are unchecked. I'm sort of confused between their difference. What's the intended behavior?

Chapter Images

Enable chapter image extraction

Extracting chapter images will allow clients to display graphical scene selection menus. The process can be slow, resource intensive, and may require several gigabytes of space. It runs when videos are discovered, and also as a nightly scheduled task. The schedule is configurable in the scheduled tasks area. It is not recommended to run this task during peak usage hours.
Extract chapter images during the library scan

Generate chapter images when videos are imported during the library scan. Otherwise, they will be extracted during the chapter images scheduled task, allowing the regular library scan to complete faster.

@Artiume
Copy link
Contributor Author

Artiume commented Feb 24, 2020

Screen Grabber appears to be the source of the image extractor.

@Artiume
Copy link
Contributor Author

Artiume commented Feb 24, 2020

Here's more screen grabber logs. I verified I had no image preview available.

2020-02-23 20:44:42.599 -05:00] [ERR] [11] App: Error in "Screen Grabber"
System.Exception: ffmpeg image extraction failed for file:"/media/anime/Mahou Shoujo! Naria☆Girls/Season 1/Mahou Shoujo! Naria☆Girls - S01E04 - The Transfer Student Is a Sweet Trap of Love HDTV-720p.mkv"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
   at MediaBrowser.Providers.MediaInfo.VideoImageProvider.GetVideoImage(Video item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ItemImageProvider.RefreshFromProvider(BaseItem item, IDynamicImageProvider provider, ImageRefreshOptions refreshOptions, TypeOptions savedOptions, LibraryOptions libraryOptions, ICollection`1 downloadedImages, RefreshResult result, CancellationToken cancellationToken)
[2020-02-23 20:44:43.720 -05:00] [ERR] [14] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/anime/Mahou Shoujo! Naria☆Girls/Season 1/Mahou Shoujo! Naria☆Girls - S01E08 - A Fourth Magical Girl HDTV-720p.mkv"
[2020-02-23 20:44:43.721 -05:00] [ERR] [14] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: I-frame image extraction failed, will attempt standard way. Input: "file:\"/media/anime/Mahou Shoujo! Naria☆Girls/Season 1/Mahou Shoujo! Naria☆Girls - S01E08 - A Fourth Magical Girl HDTV-720p.mkv\""
System.Exception: ffmpeg image extraction failed for file:"/media/anime/Mahou Shoujo! Naria☆Girls/Season 1/Mahou Shoujo! Naria☆Girls - S01E08 - A Fourth Magical Girl HDTV-720p.mkv"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
[2020-02-23 20:44:43.985 -05:00] [ERR] [14] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/anime/Mahou Shoujo! Naria☆Girls/Season 1/Mahou Shoujo! Naria☆Girls - S01E08 - A Fourth Magical Girl HDTV-720p.mkv"
[2020-02-23 20:44:43.986 -05:00] [ERR] [14] App: Error in "Screen Grabber"
System.Exception: ffmpeg image extraction failed for file:"/media/anime/Mahou Shoujo! Naria☆Girls/Season 1/Mahou Shoujo! Naria☆Girls - S01E08 - A Fourth Magical Girl HDTV-720p.mkv"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
   at MediaBrowser.Providers.MediaInfo.VideoImageProvider.GetVideoImage(Video item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ItemImageProvider.RefreshFromProvider(BaseItem item, IDynamicImageProvider provider, ImageRefreshOptions refreshOptions, TypeOptions savedOptions, LibraryOptions libraryOptions, ICollection`1 downloadedImages, RefreshResult result, CancellationToken cancellationToken)

@Artiume
Copy link
Contributor Author

Artiume commented Feb 24, 2020

Verified that no Preview image was generated. We should rename Screen Grabber to something better, I didnt know what it was until now.This is an h264 8bit media, no reason this should have failed. It was RO but that shouldnt impact it

image

@Artiume Artiume changed the title FFmpeg Image Extractor Running Unexpectedly Screen Grabber\Image Extractor Not Always Working Feb 24, 2020
@Artiume Artiume mentioned this issue Feb 27, 2020
37 tasks
@Ashyni
Copy link

Ashyni commented Mar 9, 2020

Hey, i confirmed Screen Grabber / Image extraction is disable, and it's trigger anyway, for me it's failing only with remote file (rclone/gdrive), it's not suppose to be a problem because it's normally fully disable or as last option after provider to reduce request/bandwidth on gdrive.

[14:53:15] [ERR] [15] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/Films/Need for Speed (2014)/Need for Speed (2014) - [FR+EN][BLURAY-1080P][DTS-ES 6.0][X264].mkv"
[14:53:15] [ERR] [15] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: I-frame image extraction failed, will attempt standard way. Input: file:"/media/Films/Need for Speed (2014)/Need for Speed (2014) - [FR+EN][BLURAY-1080P][DTS-ES 6.0][X264].mkv"
System.Exception: ffmpeg image extraction failed for file:"/media/Films/Need for Speed (2014)/Need for Speed (2014) - [FR+EN][BLURAY-1080P][DTS-ES 6.0][X264].mkv"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
[14:53:21] [INF] [10] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Killing ffmpeg process
[14:53:21] [ERR] [10] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/Films/Need for Speed (2014)/Need for Speed (2014) - [FR+EN][BLURAY-1080P][DTS-ES 6.0][X264].mkv"
[14:53:21] [ERR] [10] App: Error in Screen Grabber
System.Exception: ffmpeg image extraction failed for file:"/media/Films/Need for Speed (2014)/Need for Speed (2014) - [FR+EN][BLURAY-1080P][DTS-ES 6.0][X264].mkv"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
   at MediaBrowser.Providers.MediaInfo.VideoImageProvider.GetVideoImage(Video item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ItemImageProvider.RefreshFromProvider(BaseItem item, IDynamicImageProvider provider, ImageRefreshOptions refreshOptions, TypeOptions savedOptions, LibraryOptions libraryOptions, ICollection`1 downloadedImages, RefreshResult result, CancellationToken cancellationToken)

@anthonylavado anthonylavado added the confirmed This issue has been reviewed and confirmed label Apr 14, 2020
@evulhotdog
Copy link

I'm also experiencing the same thing, and I'm also using rclone mounted for storage.

Manually running the ffprobe command which I found through the debug logging, it does take a few seconds to run, which could be longer than it should take if it was a local filesystem.

Ultimately it feels like the root cause may be that the image extraction is still running when it shouldn't be (and is disabled on the library.) Because it is still running, the image extraction is still happening and is taking longer than expected due to the backend storage not being as responsive as jellyfin would like. Then jellyfin kills ffmpeg due to some static timeout and goes on its merry way.

Items still get added to the library, things are still playable, etc, but the scan process is excruciatingly slow.

@Artiume
Copy link
Contributor Author

Artiume commented Apr 19, 2020

This is on nfs mounted storage, no rclone. I'm not sure if it's networked related or not. Series 293491 is https://www.thetvdb.com/series/ghost-in-the-shell-arise-alternative-architecture

Not sure what the pattern is, Here's the video info for the file. Its h264 10bit.

Video
Title1080P H264
CodecH264
AVCYes
ProfileHigh 10
Level40
Resolution1920x1080
Aspect ratio16:9
InterlacedNo
Framerate23.976025
Bitrate6042 kbps
Bit depth10 bit
Pixel formatyuv420p10le
Ref frames1
NAL4
[2020-04-19 01:03:27.050 -04:00] [INF] [21] ProviderManager: OnRefreshProgress "f27caa37e5142225cceded48f6553502" 92.54903057419835
[2020-04-19 01:03:27.594 -04:00] [ERR] [21] MediaBrowser.Providers.Plugins.TheTvdb.TvdbEpisodeImageProvider: Failed to retrieve episode images for series "293491"
TvDbSharper.TvDbServerException: The given series ID does not exist; No results for your query: map[AiredSeason:0 EpisodeNumber:1]
   at TvDbSharper.Infrastructure.Parser.Parse[T](ApiResponse response, IReadOnlyDictionary`2 errorMap)
   at TvDbSharper.Clients.SeriesClient.GetEpisodesAsync(Int32 seriesId, Int32 page, EpisodeQuery query, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Plugins.TheTvdb.TvdbClientManager.TryGetValue[T](String key, String language, Func`1 resultFactory)
   at MediaBrowser.Providers.Plugins.TheTvdb.TvdbClientManager.GetEpisodeTvdbId(Int32 seriesTvdbId, EpisodeQuery episodeQuery, String language, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Plugins.TheTvdb.TvdbEpisodeImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
[2020-04-19 01:03:33.602 -04:00] [INF] [35] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Killing ffmpeg process
[2020-04-19 01:03:33.603 -04:00] [ERR] [35] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/anime/Ghost in the Shell- Arise/Specials/Ghost in the Shell- Arise - S00E01 - Ghost in the Shell- The New Movie HDTV-1080p.mkv"
[2020-04-19 01:03:33.603 -04:00] [ERR] [35] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: I-frame image extraction failed, will attempt standard way. Input: "file:\"/media/anime/Ghost in the Shell- Arise/Specials/Ghost in the Shell- Arise - S00E01 - Ghost in the Shell- The New Movie HDTV-1080p.mkv\""
System.Exception: ffmpeg image extraction failed for file:"/media/anime/Ghost in the Shell- Arise/Specials/Ghost in the Shell- Arise - S00E01 - Ghost in the Shell- The New Movie HDTV-1080p.mkv"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
[2020-04-19 01:03:39.603 -04:00] [INF] [35] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Killing ffmpeg process
[2020-04-19 01:03:39.604 -04:00] [ERR] [35] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/anime/Ghost in the Shell- Arise/Specials/Ghost in the Shell- Arise - S00E01 - Ghost in the Shell- The New Movie HDTV-1080p.mkv"
[2020-04-19 01:03:39.604 -04:00] [ERR] [35] MediaBrowser.Providers.TV.EpisodeMetadataService: Error in "Screen Grabber"
System.Exception: ffmpeg image extraction failed for file:"/media/anime/Ghost in the Shell- Arise/Specials/Ghost in the Shell- Arise - S00E01 - Ghost in the Shell- The New Movie HDTV-1080p.mkv"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
   at MediaBrowser.Providers.MediaInfo.VideoImageProvider.GetVideoImage(Video item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ItemImageProvider.RefreshFromProvider(BaseItem item, IDynamicImageProvider provider, ImageRefreshOptions refreshOptions, TypeOptions savedOptions, LibraryOptions libraryOptions, ICollection`1 downloadedImages, RefreshResult result, CancellationToken cancellationToken)
[2020-04-19 01:03:39.773 -04:00] [INF] [35] ProviderManager: OnRefreshProgress "f27caa37e5142225cceded48f6553502" 92.54921700223714

@Artiume
Copy link
Contributor Author

Artiume commented Apr 19, 2020

I'm only seeing mkv's impacted, found a dozen of them, all mkv. Here's another mkv. H264 8bit

Video
Title720P H264
CodecH264
AVCYes
ProfileHigh
Level31
Resolution1280x720
Aspect ratio16:9
InterlacedNo
Framerate23.976
Bitrate5934 kbps
Bit depth8 bit
Pixel formatyuv420p
Ref frames1
NAL4

Edit: Found a mp4 container that was impacted, again, nothing unusual about the codec.

Title480P H264
CodecH264
Codec tagavc1
AVCYes
ProfileMain
Level40
Resolution640x480
Aspect ratio4:3
InterlacedNo
Framerate59.966022
Bitrate2860 kbps
Bit depth8 bit
Pixel formatyuv420p
Ref frames1
NAL4

Found a Jellyfin DVR recorded .ts file that failed as well.

mov file failed. ProviderManager: "TvdbEpisodeImageProvider" failed in GetImageInfos for type "Episode" System.InvalidOperationException: Nullable object must have a value.

[2020-04-19 07:40:13.331 -04:00] [ERR] [15] ProviderManager: "TvdbEpisodeImageProvider" failed in GetImageInfos for type "Episode"
System.InvalidOperationException: Nullable object must have a value.
   at MediaBrowser.Providers.Plugins.TheTvdb.TvdbEpisodeImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.GetImages(BaseItem item, CancellationToken cancellationToken, IRemoteImageProvider provider, List`1 preferredLanguages, Nullable`1 type)
[2020-04-19 07:40:13.360 -04:00] [ERR] [15] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/tv/Powerpuff Girls/Extras/0000 - Commercials/The Powerpuff Girls Movie/The Powerpuff Girls Movie Artist Contest.mov"
[2020-04-19 07:40:13.360 -04:00] [ERR] [15] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: I-frame image extraction failed, will attempt standard way. Input: "file:\"/media/tv/Powerpuff Girls/Extras/0000 - Commercials/The Powerpuff Girls Movie/The Powerpuff Girls Movie Artist Contest.mov\""
System.Exception: ffmpeg image extraction failed for file:"/media/tv/Powerpuff Girls/Extras/0000 - Commercials/The Powerpuff Girls Movie/The Powerpuff Girls Movie Artist Contest.mov"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
[2020-04-19 07:40:13.385 -04:00] [ERR] [15] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/tv/Powerpuff Girls/Extras/0000 - Commercials/The Powerpuff Girls Movie/The Powerpuff Girls Movie Artist Contest.mov"
[2020-04-19 07:40:13.386 -04:00] [ERR] [15] MediaBrowser.Providers.TV.EpisodeMetadataService: Error in "Screen Grabber"
System.Exception: ffmpeg image extraction failed for file:"/media/tv/Powerpuff Girls/Extras/0000 - Commercials/The Powerpuff Girls Movie/The Powerpuff Girls Movie Artist Contest.mov"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)
   at MediaBrowser.Providers.MediaInfo.VideoImageProvider.GetVideoImage(Video item, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ItemImageProvider.RefreshFromProvider(BaseItem item, IDynamicImageProvider provider, ImageRefreshOptions refreshOptions, TypeOptions savedOptions, LibraryOptions libraryOptions, ICollection`1 downloadedImages, RefreshResult result, CancellationToken cancellationToken)

@Artiume
Copy link
Contributor Author

Artiume commented Apr 19, 2020

private async Task<string> ExtractImage(string[] inputFiles, string container, MediaStream videoStream, int? imageStreamIndex, MediaProtocol protocol, bool isAudio,

@evulhotdog
Copy link

evulhotdog commented Apr 20, 2020

I also confirmed this bug / issue happens for me only on Movie libraries, not TV Show libraries.

@Artiume
Copy link
Contributor Author

Artiume commented Apr 20, 2020

I also confirmed this bug / issue happens for only Movie libraries, not TV show libraries in troubleshooting and doing digging with @Artiume :)

I'm actually having it on shows, but that might only be because movies don't typically require a screen rip (unless there's no poster available)

@4luk
Copy link

4luk commented Jun 27, 2020

Any work arounds to fix this yet?

@peperunas
Copy link

I'm having the same issue on .mkv and .m2ts files.

[10:31:10] [INF] [36] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Killing ffmpeg process
[10:31:10] [ERR] [36] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: ffmpeg image extraction failed for file:"/media/movie.m2ts"
[10:31:10] [ERR] [36] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: I-frame image extraction failed, will attempt standard way. Input: file:"/media/movie.m2ts"
System.Exception: ffmpeg image extraction failed for file:"/media/movie.m2ts"
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImageInternal(String inputPath, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, Nullable`1 threedFormat, Nullable`1 offset, Boolean useIFrame, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.ExtractImage(String[] inputFiles, String container, MediaStream videoStream, Nullable`1 imageStreamIndex, MediaProtocol protocol, Boolean isAudio, Nullable`1 threedFormat, Nullable`1 offset, CancellationToken cancellationToken)```

@evulhotdog
Copy link

Any work arounds to fix this yet?

Not that I've been able to find. It's simply slow and causing delays because the Image Extraction is basically always happening. And when the resources aren't local (say, on google drive) this process fails or times out because it takes too long.

@ilteoood
Copy link

Same problem here with version 10.6.0 and tv shows stored on gdrive.

@ssyangchn
Copy link

Same problem in 10.6.3

@Luca-spopo
Copy link

Hey, I am facing this problem as well. I see the bug has been open for around 1.5 years now.

@cvium
Copy link
Member

cvium commented Jun 3, 2021

I haven't been able to reproduce it so that might be why

@Artiume
Copy link
Contributor Author

Artiume commented Jun 3, 2021

There's 2 seperate issues associated with this ticket. My problem was about the setting itself being ignored, the image extractor being on when told to be off. The other issue is that the image extractor fails and that seems to be associated with network/cloud based media.

@Luca-spopo
Copy link

Luca-spopo commented Jun 3, 2021

My bad, I switched off an unrelated setting when I should have switched off "Screen Grabber" as an image source for episodes.
Disabling that, I no longer see any ffmpeg logs, so my problem was a false alarm.

@1337joe
Copy link
Member

1337joe commented Nov 10, 2021

I could reproduce the Screen Grabber running when apparently disabled in a Movies, Shows, or Other type library for:

  1. Extras (featurettes, extras, etc)
    • Item is a Video with no parent but is owned by the Movie it's attached to
  2. Trailers
    • Item is a Trailer with no parent but is owned by the Movie it's attached to
  3. Multiple video files for a movie
    • Item is a Video with no parent or owner.

I addressed these cases as best as I could in #6820.

In addition, the timeout for image extraction was doubled in (this commit)[https://github.com/jellyfin/jellyfin/commit/c2c06ae15b9d35ad587920a2a4994cf6f3381d5a], which may be enough to cover the image extraction failures originally reported.

@RubenTeixeira
Copy link
Contributor

Does anybody know if theres a way to increase the timeout on ffmpeg image extraction, so that it mitigates the remote storage issue? The missing chapter images on some MKVs are starting to aggravate me. I'd like to be able to fix an otherwise mint library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed This issue has been reviewed and confirmed
Projects
Status: Insufficient Data
Development

No branches or pull requests