5
0

yt_common: automation: scxvid keyframes option

This commit is contained in:
louis f 2021-06-07 00:17:17 -04:00
parent c652a7c5e7
commit feeb11c613
Signed by: louis
GPG Key ID: 44D7E1DE4E23D6F2

View File

@ -66,11 +66,12 @@ class SelfRunner():
action="store_true")
parser.add_argument("-a", "--audio-only", help="Only process audio, no video.", action="store_true")
parser.add_argument("--keyframes", nargs="?", default=None,
help="Generate keyframes and exit", const="keyframes.txt")
help="Generate keyframes and exit.", const="keyframes.txt")
parser.add_argument("--scxvid", help="Use scxvid for keyframes.", action="store_true")
args = parser.parse_args()
if args.keyframes:
kf = find_scene_changes(source.source())
kf = find_scene_changes(source.source(), args.scxvid)
with open(args.keyframes, "w", encoding="utf-8") as kfo:
kfo.write("# WWXD log file, using qpfile format\n\n")
for f in kf: