From 5dc477412109d6cbcb5296265620e5930add9695 Mon Sep 17 00:00:00 2001 From: PawaraGunawardena Date: Fri, 1 Mar 2019 16:24:54 +0530 Subject: [PATCH] adding the initial test script to the video_to_frames.py script --- src/test_video_to_frames.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/test_video_to_frames.py diff --git a/src/test_video_to_frames.py b/src/test_video_to_frames.py new file mode 100644 index 0000000..59db233 --- /dev/null +++ b/src/test_video_to_frames.py @@ -0,0 +1,26 @@ +''' +Within this script, focus to test the script in video_to_frames.py. + +Requirements +---- +You require OpenCV 3.2 to be installed. + +Run +---- +If need to run this script seperately, then can edit the relevant input file path and output file path. +Or can make the folders in the similar folder as ./data/input_video and as ./data/generated_frames according to the script. +The input video can move to the ./data/input_video location and rename as input_video.mp4 + +As done in the this testing script, can use the video_to_frames.py script in other programs. +''' + +import video_to_frames + +def run(): + video_input_path = "./data/input_video/input_video.mp4" + frame_output_path = "./data/generated_frames/" + video_to_frames.get_frames(video_input_path, frame_output_path) + +if __name__ == "__main__": + run() +