Add Avisynth video encoding workflow

This commit is contained in:
ajp_anton
2026-07-21 00:41:00 +00:00
parent f50f465465
commit 49296d6f45
37 changed files with 9487 additions and 76 deletions
+13 -1
View File
@@ -1,7 +1,7 @@
from __future__ import annotations
import re
from datetime import datetime
from datetime import datetime, timedelta
from pathlib import Path
@@ -16,6 +16,18 @@ def format_filename_stem(dt: datetime) -> str:
return naive_wall_time(dt).strftime("%Y%m%d_%H%M%S")
def round_datetime_to_second(dt: datetime) -> datetime:
rounded = dt.replace(microsecond=0)
if dt.microsecond >= 500_000:
rounded += timedelta(seconds=1)
return rounded
def format_rounded_filename_stem(dt: datetime) -> str:
rounded = round_datetime_to_second(dt)
return format_filename_stem(rounded)
def normalized_extension(path: Path) -> str:
return path.suffix.lower()