![]() |
|
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. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
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 |
#2
|
||||
|
||||
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 Founder of SageTV |
#3
|
||||
|
||||
Great; thanks!
__________________
-- Greg |
#4
|
||||
|
||||
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 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
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 |