SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-28-2011, 01:43 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
GenerateThumbnail & multi-segment files

Should GenerateThumbnail() work for files with multiple segments? My testing suggests that it works for time values within the duration of the first segment, but fails for time values beyond that, even if they fall within subsequent segments. Is this the intended behavior?

I tried passing in a java.io.File pointing to the second segment in place of the expected MediaFile, and the call succeeded, but behaved as if I had passed in the corresponding MediaFile object, i.e. it generated a thumbnail from the first segment.

Ideally it should be possible to extract thumbnails from any file segment, by passing in an appropriate time value between GetFileStartTime() and GetFileEndTime(). If the passed-in value happens to fall in an unrecorded gap between segments, the method should return false. But if it falls within a segment, it should return true (and generate the appropriate thumbnail).

Alternatively, the method could accept an arbitrary java.io.File in place of the MediaFile and generate the thumbnail from the given file. Then it would be up to the caller to calculate time codes relative to the appropriate segment.
__________________
-- Greg
Reply With Quote
  #2  
Old 03-28-2011, 11:12 AM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,308
OK, this'll be fixed for the next build. It'll deal with multi-segment files properly; and if the time range falls outside of where a segment is then it'll just return false.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #3  
Old 03-28-2011, 12:19 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Great; thanks!
__________________
-- Greg
Reply With Quote
  #4  
Old 03-28-2011, 02:41 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
On further experimentation it looks like GetFileEndTime() and GetFileDuration() are not reliable predictors of what sort of time values will be acceptable to GenerateThumbnail(). In particular, GetFileDuration() returns the duration as recorded in the database, which may exceed the actual length of the video and therefore cause GenerateThumbnail() to fail.

Is there a way (short of trial and error) to calculate the largest time value for which GenerateThumbnail() will succeed?
__________________
-- Greg
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
multi-segment media file imports drewg SageTV v7 Customizations 1 11-13-2010 01:00 PM
Copy code segment and resolve references jphipps SageTV Studio 4 05-09-2009 08:00 PM
Latest SageTV & Neilm's Multi-Speed STVi - Working for you? jlmdxtv SageTV Customizations 6 04-12-2007 07:16 AM
Multi-Card Encoders & Sound PaulG Hardware Support 11 09-23-2004 07:03 PM


All times are GMT -6. The time now is 03:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.