poster still
This commit is contained in:
parent
894d0399f0
commit
cf952f05cf
5 changed files with 154 additions and 15 deletions
|
|
@ -305,15 +305,16 @@ class ArchiveFile(SQLObject):
|
|||
def updateMeta(self):
|
||||
self.findSubtitleLink()
|
||||
if exists(self.absolutePath):
|
||||
info = midentify.identify(self.absolutePath)
|
||||
self.length = info['length']
|
||||
self.width = info['width']
|
||||
self.frameAspect = "%0.6f" % info['aspect']
|
||||
self.height = info['height']
|
||||
self.bitrate = info['video_bitrate']
|
||||
self.fps = info['fps']
|
||||
self.audio = info['audio_codec']
|
||||
self.video = info['video_codec']
|
||||
if not self.broken:
|
||||
info = midentify.identify(self.absolutePath)
|
||||
self.length = info['length']
|
||||
self.width = info['width']
|
||||
self.frameAspect = "%0.6f" % info['aspect']
|
||||
self.height = info['height']
|
||||
self.bitrate = info['video_bitrate']
|
||||
self.fps = info['fps']
|
||||
self.audio = info['audio_codec']
|
||||
self.video = info['video_codec']
|
||||
self.updatePixels()
|
||||
self.updateBpp()
|
||||
self.loadSubtitleFromFile()
|
||||
|
|
@ -377,7 +378,7 @@ class ArchiveFile(SQLObject):
|
|||
|
||||
def _get_mini_movie_file(self):
|
||||
return join(cache.cache_root, 'mini', self.md5sum[:4], "%s.avi" % self.md5sum)
|
||||
|
||||
|
||||
def _get_frameFolder(self):
|
||||
f = join(cache.cache_root, 'frame', self.md5sum[:4], self.md5sum)
|
||||
oxdb_makedir(f)
|
||||
|
|
@ -385,7 +386,10 @@ class ArchiveFile(SQLObject):
|
|||
|
||||
def _get_timelineFile(self):
|
||||
return join(cache.cache_root, 'timeline', self.md5sum[:4], "%s.png" % self.md5sum)
|
||||
|
||||
|
||||
def _get_posterStillFile(self):
|
||||
return join(cache.cache_root, 'posterStill', self.md5sum[:4], "%s.png" % self.md5sum)
|
||||
|
||||
def removeMiniMovie(self):
|
||||
if exists(self.mini_movie_file):
|
||||
os.remove(self.mini_movie_file)
|
||||
|
|
@ -458,6 +462,9 @@ class ArchiveFile(SQLObject):
|
|||
for p in self._startPoints():
|
||||
self.extractFrame(p)
|
||||
|
||||
def extractPosterStill(self, position, img_folder=):
|
||||
extract_poster_still(self.movieFile, self.posterStillFile, position)
|
||||
|
||||
def extractClipMovie(self, force = False):
|
||||
if self.broken:
|
||||
return
|
||||
|
|
@ -485,8 +492,7 @@ class ArchiveFile(SQLObject):
|
|||
cmd = "mencoder %s >/dev/null 2>&1" % options
|
||||
print cmd.encode('utf-8')
|
||||
os.system(cmd.encode('utf-8'))
|
||||
|
||||
|
||||
|
||||
def removeTimeline(self):
|
||||
if exists(self.timelineFile):
|
||||
os.unlink(self.timelineFile)
|
||||
|
|
@ -582,3 +588,6 @@ class ArchiveFile(SQLObject):
|
|||
|
||||
def timeline(self):
|
||||
return cache.loadTimeline(self)
|
||||
|
||||
def posterStill(self, position):
|
||||
return cache.loadPosterStill(self, position)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue