Jump to content

Docker Emby Linux container - Video Preview Thumbnail Extraction issues


Recommended Posts

Posted (edited)

I have discovered a peculiar issue with the video preview thumbnail extraction.  First off, here is my setup:

Linux - Ubuntu 22.04 LTS 
Docker - 27.5.1
Emby Server (Docker version)  - ghcr.io/linuxserver/emby 4.8.11

Scenario:

I record a show.  For this case, please refer to the embyserver.output.txt debug log file and go down to the area where we're working with "Young Sheldon S01E07 A Brisket, Voodoo, and Cannonball Run".

After the show was recorded, it is supposed to go and extract the thumbnails or perform this scheduled task, which is set to every 45 minutes.  What I am seeing, is that this never happens.  I can run the scheduled task manually, wait days for it for it to work, etc., but it will never extract the thumbnails UNTIL I go and play a little bit of the show.  After playing a few seconds of the recorded content, THEN go and extract the thumbnails, it will then work and extract them properly.

You will see this in the server logs.  The show completes.  I go and run a manual "thumbnail image extraction" and it takes 0 seconds (doesn't do anything).  I go and play a little bit of the show.  I run the "thumbnail image extraction" again, and it works.

I'm not sure why this is happening, but I'm wondering if it's because during the playing of the show, it's actually doing a transcode, which I'm curious if this is triggering something?

The only other odd thing I see in the logs after the show is recorded is that there is this error:


"2025-03-11 08:32:05.519 Info VideoEncoder: ProcessRun 'Encoding aadeae' Process exited with code 137 - Failed"
which indicates an out of memory in Docker.  Not sure if this has anything to do with this issue or not.

Please let me know if you need anything else.  Thanks much for digging into this!!!

embyserver.output.txt

transcode_logs.tar.gz

Edited by rdunsirn
ryderjj89
Posted

Maybe because you're not using the official Emby Docker release? 4.8.11 isn't available in Docker yet. Wouldn't be surprised if the support team here tells you the same thing lol.

image.png.04cf2781fafd6dbb1798b5a4dfe73d41.png

ryderjj89
Posted

Yeah I see that Linuxserver has some "enhancements" which, of course, would mean that it's got some modifications not done by the Emby team. Would be hard to say if you're having issues because of the build or because of the actual embyserver release.

We're still waiting for 4.8.11 to upload to Docker Hub so might as well wait for that and see if it works better for you. You will likely have to make some changes to make sure your GPU still works and stuff though.

  • Like 1
Posted (edited)

I can confirm this exact same thing happens on the Emby supported Docker image:

https://hub.docker.com/r/emby/embyserver
 

I started from scratch and am now on Emby version 4.8.10.0.  Exact same issue where after a show records, there are no thumbnail image extractions.  I go and run the scheduled task to extract thumbnails and nothing happens.  I go and play a little bit of the video (still no thumbnails when fast forwarding).  I go back and run the scheduled task to extract the thumbnails and it then works and they are available when fast forwarding the recorded video.

Another thing I found is that if I go to the video (before ever playing it) and manually refresh the metadata, wait about 2-3 minutes, it will then produce the thumbnail images and they will be there when I play the video for the first time.

Edited by rdunsirn
Posted

Hi, we’ll take a look at it. Thanks.

Posted

Thank you!  Another thing I noticed while doing some more testing.  If I go into the library settings and manually perform a metadata refresh on that library where the shows are in, it also extracts the thumbnails.  However, the scheduled task for a metadata refresh is not doing anything.

For now, a manual metadata refresh on that library isn't that bad as it does all the shows that I need at least.  Is there a difference in the command issued by a manual metadata refresh on a library versus a scheduled task metadata refresh?

GrimReaper
Posted (edited)
17 minutes ago, rdunsirn said:

the scheduled task for a metadata refresh is not doing anything.

 

17 minutes ago, rdunsirn said:

versus a scheduled task metadata refresh?

Which task would that be, as such scheduled task doesn't exist but apparently task name is giving you that impression: what is it called? 

Edited by GrimReaper
Posted

None of the following scheduled tasks do anything to newly recorded shows in the Television Show library (which is configured as a "mixed content" library):

- Scan metadata folder - does nothing

- scan media library - does nothing

- video preview thumbnail extraction - does nothing until I play a new show for a few seconds and then run this task again.

I had assumed the "scan metadata folder" should be the same as going into the library and scanning metadata manually?  Or maybe not?  If not, is there a scheduled task that would do the same as going into the library and scanning metadata?

image.png.8de15c2f49f479a628bb8f5234943a39.png

GrimReaper
Posted
12 minutes ago, rdunsirn said:

I had assumed the "scan metadata folder" should be the same as going into the library and scanning metadata manually? 

If you refer to Refresh Metadata - no, it doesn't, it just scans server metadata folder (located under \install-dir\programdata folder) for any changes made manually (as denoted in helper text below the task). 

14 minutes ago, rdunsirn said:

If not, is there a scheduled task that would do the same as going into the library and scanning metadata?

Again, if referring to Refresh Metadata - there ain't (except per-library Automatic metadata 30/60/90 days refresh setting, but that task is not exposed anywhere else in the UI). 

To confirm, your items are getting recognized and metadata downloaded, you're just having issues with BIFs/chapter marker thumbnails? What is your library setting for Video preview images set to, "As a scheduled task only" or "When items are added" also? 

 

Posted

That makes sense.  Thanks for clearing that up!

24 minutes ago, GrimReaper said:

If you refer to Refresh Metadata - no, it doesn't, it just scans server metadata folder (located under \install-dir\programdata folder) for any changes made manually (as denoted in helper text below the task). 

Again, if referring to Refresh Metadata - there ain't (except per-library Automatic metadata 30/60/90 days refresh setting, but that task is not exposed anywhere else in the UI). 

To confirm, your items are getting recognized and metadata downloaded, you're just having issues with BIFs/chapter marker thumbnails? What is your library setting for Video preview images set to, "As a scheduled task only" or "When items are added" also? 

 

My library is set up this way:

image.png.f56e1c619c4b021572e5104eec2ddd06.png

Also, I found that if I run the Swagger API -->  

curl -X 'POST'   'http://localhost:8096/emby/Items/3/Refresh?Recursive=true&ImageRefreshMode=FullRefresh&MetadataRefreshMode=FullRefresh&ReplaceAllImages=false&ReplaceAllMetadata=true&api_key=xxxxxxxxxxxxxxxxx'   -H 'accept: */*'   -d '' -v

This also works.  I'm thinking about setting up a crontab job every hour for now.

GrimReaper
Posted
5 minutes ago, rdunsirn said:

I'm thinking about setting up a crontab job every hour for now.

That could work. 

You could also set Video preview thumbnails to "As scheduled task" only (without "When media is added", maybe in-progress recordings are messing up with it) and run "Thumbnails extraction" task on a schedule (hourly?), see how does that compare. 

Posted
1 minute ago, GrimReaper said:

That could work. 

You could also set Video preview thumbnails to "As scheduled task" only (without "When media is added", maybe in-progress recordings are messing up with it) and run "Thumbnails extraction" task on a schedule (hourly?), see how does that compare. 

So I've tried to change the setting from "when media is added" to just an hourly task.  Also tried it every 45 minutes just in case something else was running on the hour.  The one thing I noticed, however, is that it just wouldn't find the media it needed to create thumbnails for until I actually played a little bit of the media and then re-ran the "video preview thumbnail extraction" again.  Something must happen during the playback of the new media that tags it and discovers it for needing the "thumbnails"...I assume it is similar to what goes on during a manual library metadata refresh?

Posted
6 hours ago, rdunsirn said:

 

For now, a manual metadata refresh on that library isn't that bad as it does all the shows that I need at least.  Is there a difference in the command issued by a manual metadata refresh on a library versus a scheduled task metadata refresh?

there is no scheduled task for a metadata refresh.

Posted
3 hours ago, rdunsirn said:

Scan metadata folder - does nothing

image.png.8de15c2f49f479a628bb8f5234943a39.png

HI, did you read the description to see what this task is for?

Posted
55 minutes ago, Luke said:

HI, did you read the description to see what this task is for?

Hi Luke, I did.  I just posted that it did nothing for reference.  The more notable thing is that the Thumbnail extraction does nothing until I actually play a few seconds of the new video.  So for some reason, the Thumbnail extraction task isn't picking up my newly recorded TV shows until I actually play a little bit of those shows (something happens during the initial playback where the Thumbnail extraction suddenly sees they are "new" content and extracts the thumbnails.

Another workaround that I found at this point is to run the API command every hour:
 

curl -X 'POST'   'http://localhost:8096/emby/Items/3/Refresh?Recursive=true&ImageRefreshMode=FullRefresh&MetadataRefreshMode=FullRefresh&ReplaceAllImages=false&ReplaceAllMetadata=true&api_key=xxxxxxxxxxxxxxxxx'   -H 'accept: */*'   -d '' -v

This fixes my issue as it does a metadata refresh on that library and also extracts the thumbnails.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...