Be totally quiet. Overwrite thumbs.

This commit is contained in:
Joachim Tingvold 2015-06-17 20:10:50 +02:00
parent 52e025b07d
commit 9a15b2c2c0

View File

@ -376,7 +376,16 @@ class Photo(object):
def _video_thumbnails(self, thumb_path, original_path): def _video_thumbnails(self, thumb_path, original_path):
(tfd, tfn) = tempfile.mkstemp(); (tfd, tfn) = tempfile.mkstemp();
p = VideoTranscodeWrapper().call('-i', original_path, '-f', 'image2', '-vsync', '1', '-vframes', '1', '-an', '-loglevel', 'quiet', tfn) p = VideoTranscodeWrapper().call(
'-i', original_path, # original file to extract thumbs from
'-f', 'image2', # extract image
'-vsync', '1', # CRF
'-vframes', '1', # extrat 1 single frame
'-an', # disable audio
'-loglevel', 'quiet', # don't display anything
'-y', # don't prompt for overwrite
tfn
)
if p == False: if p == False:
message("couldn't extract video frame", os.path.basename(original_path)) message("couldn't extract video frame", os.path.basename(original_path))
os.unlink(tfn) os.unlink(tfn)
@ -424,7 +433,7 @@ class Photo(object):
'-bufsize', '10000000', # define how much the client should buffer '-bufsize', '10000000', # define how much the client should buffer
'-f', 'mp4', # fileformat mp4 '-f', 'mp4', # fileformat mp4
'-threads', str(num_of_cores), # number of cores (all minus one) '-threads', str(num_of_cores), # number of cores (all minus one)
'-loglevel', '0', # don't display anything '-loglevel', 'quiet', # don't display anything
'-y' # don't prompt for overwrite '-y' # don't prompt for overwrite
] ]
filters = [] filters = []