From 8788843458f614a609f936ecdb1fc6c49c2cbf9b Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 19 Aug 2020 12:44:08 +0530 Subject: added custom date and time option --- src/VHSVideo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/VHSVideo.py') diff --git a/src/VHSVideo.py b/src/VHSVideo.py index 7e23ad0..88c065f 100644 --- a/src/VHSVideo.py +++ b/src/VHSVideo.py @@ -17,7 +17,7 @@ def SaveVid(path): count += 1 -def Style(pathToFrames): +def Style(pathToFrames,date=None,time="00:00"): files = [f for f in os.listdir(pathToFrames) if isfile(join(pathToFrames, f))] count = 0 for i in files: @@ -26,7 +26,7 @@ def Style(pathToFrames): fi = pathToFrames + f out = fi + ".jpg" - generateVHSStyle(fi, out, silence=True) + generateVHSStyle(fi, out, verbose=False,date=date,time=time) os.rename(out, fi) print("--------") print("On Frame: ") @@ -74,7 +74,7 @@ def generateVideo(outfile, path, infile): out.release() -def VHS_Vid(infile, outfile): +def VHS_Vid(infile, outfile,date=None,time="00:00"): path = "./frames/" os.system("rm frames/*") os.system("mkdir frames") @@ -84,7 +84,7 @@ def VHS_Vid(infile, outfile): except: logger.debug("Extracted Frames") logger.info("Applying A E S T H E T I C S") - Style(path) + Style(path,date=date,time=time) logger.info("Generating Vidio") generateVideo("temp.mp4", path, infile) logger.info("Extracting audio of original video") -- cgit v1.2.3