I am writing a python script to process a video using OpenCV package. I am quite new to python, so I am facing the following issue.
In the end of the code I want to add the code below. However, I do not know how to add the input and the output file of my code.
import argparse
def main(input_, output_):
pass # do something with the parameters
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='OpenCV video processing')
parser.add_argument('-i', "--input", help='full path to input video that will be processed')
parser.add_argument('-o', "--output", help='full path for saving processed video output')
args = parser.parse_args()
if args.input is None or args.output is None:
sys.exit("Please provide path to input and output video files! See --help")
main(args.input, args.output)
Can you help me understand what I am filling in wrongly?