Created
October 31, 2014 18:09
-
-
Save ibebrett/241dc3014c4248cb8b79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import hashlib | |
from videoads import VideoCreative | |
def main(path): | |
new_path = '{0}-converted'.format(path) | |
VideoCreative.convert(path, new_path) | |
phash_key = '1-md5-%s' % hashlib.md5(unicode(VideoCreative.video_phash(new_path, 2))).hexdigest() | |
print phash_key | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser() | |
parser.add_argument('path') | |
args = parser.parse_args() | |
main(args.path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment