Jump to content

Thumbnail extraction (*.bif) generated for movies, fails for tv shows


marktaff
 Share

Go to solution Solved by rbjtech,

Recommended Posts

marktaff

Brief: Thumbnail extraction and creation of *.bif files for progress/seek bar doesn't create *.bif files for tv shows, but it does for movies.

Running EmbyServer 4.6.7.0 on Kubuntu 22.04

I reviewed this link for reference; it helped with debugging a bit, but didn't solve anything.

A few days ago, I turned on thumbnail extraction for *.bif on two libraries, movies and tv shows. After the first run timed-out after 4 hours (a sensible default), I ran the scheduled task manually so it would go to completion. Today, it finished the movies, and *should* have taken another week or so to chew through the tv shows. The *.bif files for the movies are present in /var/lib/emby/metadata (as expected and desired), and they function as expected, at least in Emby Theater for Linux.

Looking in embyserver.txt, I see thousands of lines with "quick-extract-imageseries' (one with the command executed, one noting success, per movie). However, when it finished the movies and switched to TV shows, it started using 'quick-extract-image' instead, again with two entries (command & success) as for movies. However, no *.bif files were generated for tv shows, either in /var/lib/emby/metadata (desired) nor in the content folders (not desired). Incanted `updatedb&`, then used `locate` and `grep` to confirm no *.bif files for tv shows anywhere on the machine.

Below is a sanitized snippet from embyserver.txt showing the transition from movies to tv shows.

<snip>
  
2022-08-10 14:42:57.187 Info App: ProcessRun 'quick-extract-imageseries' Execute: /opt/emby-server/bin/ffmpeg -f matroska -threads 1 -skip_interval 10 -copyts -i file:"/srv/samba/public/video/movies/Movie.Title,The [2022.1080p.x265.EAC3.6CH].mkv" -an -sn -vf "scale=w=320:h=180,format=yuv420p,eq=contrast=0.9:gamma=0.95:saturation=1.8" -vsync cfr -r 0.1 -f image2 "/var/lib/emby/cache/temp/1c2a5bd3e45247c4a9b6a13faa9b9815/img_%05d.jpg"
2022-08-10 14:43:53.471 Info LibraryMonitor: tmpmusicvideos (/srv/samba/public/video/tmpmusicvideos) will be refreshed.
2022-08-10 14:43:54.187 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: /opt/emby-server/bin/ffprobe -i file:"/srv/samba/public/video/tmpmusicvideos/Starland Vocal Band/Afternoon Delight/Starland Vocal Band - Afternoon Delight.mkv" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
2022-08-10 14:43:54.211 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded
2022-08-10 14:43:54.866 Info HttpClient: GET https://musicbrainz.emby.tv/ws/2/artist/?query="Starland Vocal Band"&dismax=true
2022-08-10 14:43:55.417 Info HttpClient: GET https://www.theaudiodb.com/api/v1/json/2139078587215309723505/artist-mb.php?i=2dd30f18-241e-44b3-8bb3-950380f22dfa
2022-08-10 14:43:55.585 Info HttpClient: GET https://webservice.fanart.tv/v3.1/music/2dd30f18-241e-44b3-8bb3-950380f22dfa?api_key=x_secret1_x
2022-08-10 14:43:58.530 Debug NetworkManager: Detected local ip addresses: 192.168.1.2, fe80::4423:11d7:9015:f4ae%2, 127.0.0.1, ::1
2022-08-10 14:44:07.972 Info App: ProcessRun 'quick-extract-imageseries' Process exited with code 0 - Succeeded
2022-08-10 14:44:08.029 Info App: ProcessRun 'quick-extract-image' Execute: /opt/emby-server/bin/ffmpeg -skip_list 515 -f matroska -threads 1 -copyts -i file:"/srv/samba/public/video/tv/TV Show Name/S04/Tv.Show.Name.S04E01 [1080p.x265.AAC.6CH].mkv" -an -sn -update 1 -vf "scale=trunc(min(max(iw\,ih*dar)\,min(600\,0*dar))/2)*2:trunc(min(max(iw/dar\,ih)\,min(600/dar\,0))/2)*2,thumbnail=24" -vsync 0 -f image2 "/var/lib/emby/cache/temp/ca5f3275-94c8-4a9d-9bbc-55120e9ad6a3.jpg"
2022-08-10 14:44:12.279 Info App: ProcessRun 'quick-extract-image' Process exited with code 0 - Succeeded
  
 <snip>

EmbyServer spent about 6 hours doing 'quick-image-extract' for all the tv shows.  It then spent about 15 minutes doing 'extract-multi-image' for some very recent tv show episodes.

When I try to run the scheduled task manually, it finishes in 0 seconds, doing nothing.  There is no "thumbnail-failures.txt" in /var/lib/emby/cache.

Screenies of the relevant portions of the library settings are attached. TV library was set to 'Chapters' originally, which seems suspect.  I just changed it to '10 seconds' and re-ran the scheduled task. It completed within 49 seconds, which can't be right.  More investigation is required.  I've attached the complete server log corresponding to the snippet above.

Update: Changing the tv library to '10 seconds', then re-running the scheduled task resulting in emby creating *.bif files for four tv episodes, then finishing the task. Running the scheduled task again (repeatedly) and it just finishes instantly without creating more *.bif files.

emby.movie.library.thumb.png.571c10f2c0c148c83dc9efee31ae6c83.png

 

emby_tv_show.library.thumb.png.885277acc6544286967f4799350afc7b.pngemby_tv_show.library_10.second.thumb.png.bf065a6a602d4a8f11f2f91b8ae61293.png

2022-08-10 20:39:32.364

embyserver.error.finishing.movies.starting.tv.shows.no.bif.files.for.tv.txt

Edited by marktaff
Update on effects of changing to '10 seconds'
Link to comment
Share on other sites

marktaff

Scanning the tv library (and all libraries) then re-running the scheduled task had no effect.

2022-08-11 01:44:10.224 Info Server: http/1.1 POST http://‌‍‍columbia‌:8096/emby/ScheduledTasks/Running/d15b3f9fc313609ffe7e49bd1c74f753?X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome&X-Emby-Device-Id=ca770f09-d034-4001-acde-1a3a6cf6bb75&X-Emby-Client-Version=4.7.6.0. UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36
2022-08-11 01:44:10.224 Info Server: http/1.1 Response 204 to ‌‍‍192.168.1.5‌. Time: 1ms. http://‌‍‍columbia‌:8096/emby/ScheduledTasks/Running/d15b3f9fc313609ffe7e49bd1c74f753?X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome&X-Emby-Device-Id=ca770f09-d034-4001-acde-1a3a6cf6bb75&X-Emby-Client-Version=4.7.6.0
2022-08-11 01:46:06.190 Debug NetworkManager: Detected local ip addresses: 192.168.1.2, fe80::4423:11d7:9015:f4ae%2, 127.0.0.1, ::1

 

Link to comment
Share on other sites

Hi, you set the interval on your TV library to chapter intervals, not 10 seconds. That's going to use a different technique and it won't create a .bif file.

Link to comment
Share on other sites

marktaff
15 minutes ago, Luke said:

Hi, you set the interval on your TV library to chapter intervals, not 10 seconds. That's going to use a different technique and it won't create a .bif file.

Thanks, yeah, got that, as noted.  The issue is that after changing it to '10 seconds' and re-running the task, it still doesn't work.  I mean, it made *.bif files for four old episodes after that, but then nothing. How do I convince emby to go back and make them now? Re-scanning the library files, then re-running the scheduled task has no effect.

Link to comment
Share on other sites

7 minutes ago, marktaff said:

Thanks, yeah, got that, as noted.  The issue is that after changing it to '10 seconds' and re-running the task, it still doesn't work.  I mean, it made *.bif files for four old episodes after that, but then nothing. How do I convince emby to go back and make them now? Re-scanning the library files, then re-running the scheduled task has no effect.

The top of the library options dialog notes that changing the options applies to new content only, and it indicates what needs to be done if you want to apply to existing content.

Link to comment
Share on other sites

  • Solution

I'm not 100% on this - but a manual refresh at a library level using the 'missing metadata' option may generate the missing BIF files without needing to regenerate all the other metadata...

image.png.7d33c277fdcd63f776ceee714bd5e186.png

  • Like 1
Link to comment
Share on other sites

marktaff

Thanks. I did a 'search for missing' metadata refresh, and by the embyserver.txt log that I'm tailing, it is now making *.bif files for the episodes.  🙂

A couple of curious points. There is no clear GUI indication of what it is doing (no running task on dashboard, no active scheduled task). Just the circular progress icon on the library stuck at 90%, which will presumably be like that for the next week or two as it chews through the episodes.  Also, I didn't have to refresh the metadata to apply the *.bif change to the movies, nor for the four episodes it did do immediately after I set it to '10 seconds'; nor to apply the 'skip intro' setting to the library.  None of that is critical, just curious observations about emby's behavior.

Thanks for your help.

  • Like 1
Link to comment
Share on other sites

marktaff
12 minutes ago, rbjtech said:

I'm not 100% on this - but a manual refresh at a library level using the 'missing metadata' option may generate the missing BIF files without needing to regenerate all the other metadata...

image.png.7d33c277fdcd63f776ceee714bd5e186.png

Thanks, yes.  This appears to be working. 🙂

  • Thanks 1
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...