You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
983 B

9 years ago
  1. import sys, argparse
  2. from gooey import Gooey
  3. @Gooey
  4. def main():
  5. parser = argparse.ArgumentParser(description='The program displays the video.')
  6. parser.add_argument('-i', dest = 'videoFilename', help = 'name of the video file', required = True)
  7. parser.add_argument('-f', dest = 'firstFrameNum', help = 'number of first frame number to display', default = 0, type = int)
  8. parser.add_argument('--fps', dest = 'frameRate', help = 'approximate frame rate to replay', type = float)
  9. parser.add_argument('-r', dest = 'rescale', help = 'rescaling factor for the displayed image', default = 1., type = float)
  10. args = parser.parse_args()
  11. firstFrameNum = 0
  12. if args.firstFrameNum is not None:
  13. firstFrameNum = args.firstFrameNum
  14. frameRate = -1
  15. if args.frameRate is not None:
  16. frameRate = args.frameRate
  17. print('{} {} {} {}'.format(args.videoFilename, firstFrameNum, frameRate, rescale = args.rescale))
  18. main()