How does thumbnail creation work?

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
MikMik
Posts: 17
Joined: Thu May 01, 2014 2:50 am

How does thumbnail creation work?

Post by MikMik »

Hi,
I've recently installed UMS in my Windows PC and I've set it up to serve some videos. So far so good. But now, I was trying to make the videos have thumbnails, but I can't do it. Well, actually, I think I have them, but most of them are just black rectangles, or some bits from the starting credits. I've changed the "thumbnail seeking position" to several values with no change.

At some point, UMS has decided to recreate the thumbnails, I think it's been when I've added a file, but even though "thumbnail seeking position" was set to 60 seconds or something like that, I got some strange results: some with the default white and blue UMS image, some with some of the last frames in the final credits...

So I'd like to know briefly how thumnail creation works. Can I do something to force it or UMS just updates them when it seems fit? Does the "seeking position" truly use seconds? Where, if anywhere are the thumbnails stored (I think I've read somewhere that they are in memory)?

Thanks
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: How does thumbnail creation work?

Post by SharkHunter »

yes it uses seconds. But you must save and restart server to make sure that your new seek value take effect. Click the "Restart Server" at the top of the GUI (or stop and start UMS completly).
The thumbs is normally created on the fly but I think (haven't used this myself) that they could be cached if you enable the cache.
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
MikMik
Posts: 17
Joined: Thu May 01, 2014 2:50 am

Re: How does thumbnail creation work?

Post by MikMik »

Well, then either I am doing something wrong or it doesn't work properly; in my system, at least.

I've restarted the server, quit it, reopened, disabled thumbnail creation, enabled it again, changed the seeking time, enabled the cache, cleared it, disabled it, restarted the PC... and I've managed to get two versions of the thumbnails on some (all?) of the videos. One with the first or one of the first frames of the film (usually just a black frame) and one with one of the last or the last frame of the film.

For example, I have ripped a film from my DVD collection and I've been able to see a black frame for it, and, at some point, the age rating of the film that appears at the end of the final credits (which disappears and then there's two seconds of black again in the film). But I haven't been able to get a thumbnail from the "middle" of the film.

Also, I've noticed that disabling "Use Mplayer for video thumbnails" changes the aspect ratio of some videos (as indicated in the tooltips).

The worst part, for debuggin this issue, is that I cannot always reproduce the steps to have one set of thumbnails or the other.

I've been using the BubbleUPnP Android app to view the contents of the server. Also, when it worked, Samsung Allshare PC application, but it doesn't work anymore. They both showed the same.
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: How does thumbnail creation work?

Post by SharkHunter »

WIthout full logs we are in the dark. All I can say is I tried to set the thumb to 30 sec or so and it showed a different pic than with 2.
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
MikMik
Posts: 17
Joined: Thu May 01, 2014 2:50 am

Re: How does thumbnail creation work?

Post by MikMik »

I'm uploading a log file, to see if it helps.

I've set the seeking time to 60 and this time I'm getting the last frames, or no thumbnail at all (the blue and white default icon). For example, there are some videos created with a mobile phone, shorter than 60 seconds, and in those I get the last frames. I could expect that. But with 2 hour-long films, I'm also getting the last frames.
Attachments
ums_dbg_ThumbsCreation.zip
(52.7 KiB) Downloaded 610 times
ExSport
Posts: 595
Joined: Wed Oct 10, 2012 1:57 am

Re: How does thumbnail creation work?

Post by ExSport »

Code: Select all

DEBUG 2014-05-06 16:12:35.722 [pool-9-thread-2] Starting "C:\Program Files\Universal Media Server\win32\mplayer.exe" -ss 5344 -quiet "K:\Peliculas\01_Mayores\Lie With Me.avi" -msglevel all=4 -vf scale=320:-2,expand=:180 -frames 1 -vo jpeg:outdir=mplayer_thumbs:subdirs="9632432" -nosound
Weird, in log there is no -ss 60 which says to grab thumbnail from 60th second. There are lot of quite high values like 5344, 6835,...
Try to disable mplayer for creating thumbs. Instead of it FFMPEG will be used.
MikMik
Posts: 17
Joined: Thu May 01, 2014 2:50 am

Re: How does thumbnail creation work?

Post by MikMik »

I get the same. In fact, I think it's looking at 0 seconds

Code: Select all

DEBUG 2014-05-09 16:50:33.171 [main] Reading thumbnail_seek_position: default: 2, current: 60
...
DEBUG 2014-05-09 16:51:00.880 [pool-6-thread-1] Starting "C:\Program Files\Universal Media Server\win32\ffmpeg.exe" -loglevel info -ss 0 -i K:\Peliculas\MOV00002.3GP -an -an -s 320x180 
I'm uploading the log file
Attachments
ums_dbg_ThumbsCreationWithFFmpeg.zip
(47.54 KiB) Downloaded 603 times
MikMik
Posts: 17
Joined: Thu May 01, 2014 2:50 am

Re: How does thumbnail creation work?

Post by MikMik »

Did anybody have time to take a look into this?
I've found that the high values in the "-ss" parameter are actually the full duration of the videos, in seconds. So, yes, it's actually taking the thumbnail from the last second of the film. But it escapes me why it would do that... :(
User avatar
SharkHunter
Developer
Posts: 648
Joined: Fri Jun 01, 2012 9:36 pm

Re: How does thumbnail creation work?

Post by SharkHunter »

I notice you're running on 3.6.0 and the code have changed somewhat since that. Pls try and upgrade to a later version. It works for me. You get a seek pos of 0 (always) which is strange. BUt first upgrade and see if you get a new seekpos.
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.
MikMik
Posts: 17
Joined: Thu May 01, 2014 2:50 am

Re: How does thumbnail creation work?

Post by MikMik »

I have 3.6.2 now, and I have even updated the OS from Vista to W7, and I get the same results. :(
I'm starting to think I should try to debug it myself, but I've never worked with java, so I would have to start from scratch. Maybe if I find some free time to set everything up
Post Reply