feat: v1.2.1

feat: added '--sub-alignment' arg. This can control the position of the subtitles for everything that isn't a "sync" frame
This commit is contained in:
jlw4049 2024-06-12 01:02:20 -04:00
parent 40baeb3c39
commit eee1442bc3
2 changed files with 8 additions and 2 deletions

@ -7,7 +7,7 @@ from frame_forge.cli_utils import frame_list
program_name = "FrameForge"
__version__ = "1.2.0"
__version__ = "1.2.1"
if __name__ == "__main__":
@ -40,6 +40,9 @@ if __name__ == "__main__":
"--encode-index-path", type=str, help="Path to look/create indexes for encode"
)
parser.add_argument("--sub-size", type=int, default=20, help="Size of subtitles")
parser.add_argument(
"--sub-alignment", type=int, default=7, help="Alignment of subtitles (.ass)"
)
parser.add_argument("--left-crop", type=int, help="Left crop")
parser.add_argument("--right-crop", type=int, help="Right crop")
parser.add_argument("--top-crop", type=int, help="Top crop")
@ -114,6 +117,7 @@ if __name__ == "__main__":
source_index_path=args.source_index_path,
encode_index_path=args.encode_index_path,
sub_size=args.sub_size,
sub_alignment=args.sub_alignment,
left_crop=args.left_crop,
right_crop=args.right_crop,
top_crop=args.top_crop,

@ -22,6 +22,7 @@ class GenerateImages:
source_index_path: None | str,
encode_index_path: None | str,
sub_size: int,
sub_alignment: int,
left_crop: int,
right_crop: int,
top_crop: int,
@ -47,6 +48,7 @@ class GenerateImages:
self.source_index_path = source_index_path
self.encode_index_path = encode_index_path
self.sub_size = sub_size
self.sub_alignment = sub_alignment
self.left_crop = left_crop
self.right_crop = right_crop
self.top_crop = top_crop
@ -88,7 +90,7 @@ class GenerateImages:
selected_sub_style = (
f"Segoe UI,{self.sub_size},{color},&H00000000,&H00000000,&H00000000,"
"1,0,0,0,100,100,0,0,1,1,0,7,10,10,10,1"
f"1,0,0,0,100,100,0,0,1,1,0,{self.sub_alignment},10,10,10,1"
)
sync_sub_base = (
"Segoe UI,{size},&H31FF31&,&H00000000,&H00000000,&H00000000,"