Mercurial Hosting > traffic-intelligence
comparison scripts/info-video.py @ 967:373e8ef6ee25
modified function to access video property
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 05 Dec 2017 16:15:44 -0500 |
parents | 51269511229b |
children | 933670761a57 |
comparison
equal
deleted
inserted
replaced
966:40af0f20ee2d | 967:373e8ef6ee25 |
---|---|
7 parser = argparse.ArgumentParser(description='The program displays the video.') | 7 parser = argparse.ArgumentParser(description='The program displays the video.') |
8 parser.add_argument('-i', dest = 'videoFilename', help = 'name of the video file', required = True) | 8 parser.add_argument('-i', dest = 'videoFilename', help = 'name of the video file', required = True) |
9 | 9 |
10 args = parser.parse_args() | 10 args = parser.parse_args() |
11 | 11 |
12 cvutils.infoVideo(args.videoFilename) | 12 videoProperties = cvutils.infoVideo(args.videoFilename) |
13 for k,v in videoProperties.iteritems(): | |
14 print('Video {}: {}'.format(k, v)) |