X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?p=living-lab-site.git;a=blobdiff_plain;f=cis%2Fextract_summary_thumbs.py;fp=cis%2Fextract_summary_thumbs.py;h=f0a569c0e64dfa64ff1c0f8b6a38091785621819;hp=0000000000000000000000000000000000000000;hb=961611537619595dc7eed2104faafcd0c9cdc57b;hpb=038c14e7fb3d5de1399310651c97b1b8c892e145 diff --git a/cis/extract_summary_thumbs.py b/cis/extract_summary_thumbs.py new file mode 100755 index 0000000..f0a569c --- /dev/null +++ b/cis/extract_summary_thumbs.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +import sys + +from api import ffmpeg + +if len(sys.argv) != 4: + sys.stderr.write('usage: ' + sys.argv[0] + ' input_video_file dest_path thumbs_count\n') + exit(1) + +if __name__ == '__main__': + fn = sys.argv[1] + thumbs_count = int(sys.argv[3]) + + video_name = fn[0:fn.rindex('_')] + video_name = video_name[video_name.rindex('/')+1:] + + fte = ffmpeg.FFmpegThumbExtractor(input_file = fn, name = video_name) + fte.dest_path = sys.argv[2] + + fte.extract_summary_thumbs(thumbs_count) \ No newline at end of file