Merge pull request #25 from osma/patch-1

Fix CLI: add --output option to set output file
This commit is contained in:
Somdev Sangwan 2023-05-29 18:48:17 +05:30 committed by GitHub
commit 825b7e7301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,8 @@ Additional command line arguments are given below:
use this face use this face
-t TARGET_PATH, --target TARGET_PATH -t TARGET_PATH, --target TARGET_PATH
replace this face replace this face
-o OUTPUT_FILE, --output OUTPUT_FILE
save output to this file
--keep-fps keep original fps --keep-fps keep original fps
--gpu use gpu --gpu use gpu
--keep-frames don't delete frames directory --keep-frames don't delete frames directory

1
run.py
View File

@ -20,6 +20,7 @@ args = {}
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-f', '--face', help='use this face', dest='source_img') parser.add_argument('-f', '--face', help='use this face', dest='source_img')
parser.add_argument('-t', '--target', help='replace this face', dest='target_path') parser.add_argument('-t', '--target', help='replace this face', dest='target_path')
parser.add_argument('-o', '--output', help='save output to this file', dest='output_file')
parser.add_argument('--keep-fps', help='maintain original fps', dest='keep_fps', action='store_true', default=False) parser.add_argument('--keep-fps', help='maintain original fps', dest='keep_fps', action='store_true', default=False)
parser.add_argument('--gpu', help='use gpu', dest='gpu', action='store_true', default=False) parser.add_argument('--gpu', help='use gpu', dest='gpu', action='store_true', default=False)
parser.add_argument('--keep-frames', help='keep frames directory', dest='keep_frames', action='store_true', default=False) parser.add_argument('--keep-frames', help='keep frames directory', dest='keep_frames', action='store_true', default=False)