only extract keyframe index for video files
This commit is contained in:
parent
466c85190f
commit
01f32871fd
2 changed files with 4 additions and 2 deletions
|
@ -352,6 +352,7 @@ def stream(video, target, profile, info, audio_track=0, flags={}):
|
||||||
shutil.move(enc_target, target)
|
shutil.move(enc_target, target)
|
||||||
for f in glob('%s.log*' % target):
|
for f in glob('%s.log*' % target):
|
||||||
os.unlink(f)
|
os.unlink(f)
|
||||||
|
if info['video']:
|
||||||
make_keyframe_index(target)
|
make_keyframe_index(target)
|
||||||
return True, None
|
return True, None
|
||||||
|
|
||||||
|
|
|
@ -370,6 +370,7 @@ class File(models.Model):
|
||||||
self.info.update(stream.info)
|
self.info.update(stream.info)
|
||||||
self.parse_info()
|
self.parse_info()
|
||||||
self.save()
|
self.save()
|
||||||
|
if stream.info.get('video'):
|
||||||
extract.make_keyframe_index(stream.media.path)
|
extract.make_keyframe_index(stream.media.path)
|
||||||
return True, stream.media.size
|
return True, stream.media.size
|
||||||
return save_chunk(stream, stream.media, chunk, offset, name, done_cb)
|
return save_chunk(stream, stream.media, chunk, offset, name, done_cb)
|
||||||
|
|
Loading…
Reference in a new issue