snapshot
This commit is contained in:
+5
-5
@@ -58,7 +58,7 @@ def optimize_gif(gif_path: Path) -> Path:
|
||||
subprocess.run(
|
||||
[
|
||||
"gifsicle",
|
||||
"--lossy=98",
|
||||
"--lossy=200",
|
||||
"--optimize=3",
|
||||
"--batch",
|
||||
"-i",
|
||||
@@ -75,9 +75,9 @@ def parse_args(argv: typing.List[str] = None) -> argparse.Namespace:
|
||||
arger.add_argument(
|
||||
"--start", "-s", dest="from_time", type=str, help="Time to start from, e.g. 02:59", required=True
|
||||
)
|
||||
arger.add_argument("--duration", "-d", default=3, type=int, help="Duration of gif in seconds")
|
||||
arger.add_argument("--fps", default=15, type=int, help="Frames per second")
|
||||
arger.add_argument("--width", default=400, type=int, help="Image width")
|
||||
arger.add_argument("--duration", "-d", default=3, type=float, help="Duration of gif in seconds")
|
||||
arger.add_argument("--fps", default=20, type=int, help="Frames per second")
|
||||
arger.add_argument("--width", default=376, type=int, help="Image width")
|
||||
arger.add_argument("--optimize", default=True, action="store_true", help="Reduce GIF filesize")
|
||||
|
||||
if len(argv) == 0:
|
||||
@@ -105,7 +105,7 @@ def main():
|
||||
|
||||
save_path = None
|
||||
if str(args.video_path).startswith("http"):
|
||||
save_path = Path("~/Downloads").expanduser() / f"{md5(str(video_path))}__{from_time.replace(':', '')}.gif"
|
||||
save_path = Path("~/Pictures/Screenshots/").expanduser() / f"{md5(str(video_path))}__{from_time.replace(':', '')}.gif"
|
||||
|
||||
gif_path = create_gif(
|
||||
video_path=video_path,
|
||||
|
||||
Reference in New Issue
Block a user