Skip to content

Commit

Permalink
change font style of harsubs
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbach committed Sep 25, 2023
1 parent cba9c1c commit ba3a824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ffmpeg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def insert_subtitle(input_media_path: Path, subtitles_path: [Path], burn_subtitl
# insert scale, subtitles filter and hwupload if required
# scale at minimul height of 480p. it also will make the dimensions divisible by 2
cmd_ffmpeg.extend(
["-vf", f"format=nv12, scale='ceil((max(480,ih)*iw/ih)/2)*2:ceil(max(480,ih)/2)*2', subtitles=\'{add_ffmpeg_escape_chars(srt_temp.temp_file.name)}\':force_style='Alignment={sub_align},Fontname=Verdana,PrimaryColour=&H03fcff,Fontsize=20,BackColour=&H80000000,Spacing=0.11,Outline=1,Shadow=1.2,MarginL={subtitle_margin},MarginR={subtitle_margin}'" + (', hwupload' if vf_hwupload else '')])
["-vf", f"format=nv12, scale='ceil((max(480,ih)*iw/ih)/2)*2:ceil(max(480,ih)/2)*2', subtitles=\'{add_ffmpeg_escape_chars(srt_temp.temp_file.name)}\':force_style='Alignment={sub_align},Fontname=Futura,PrimaryColour=&H03fcff,Fontsize=18,BackColour=&H80000000,Bold=1,Spacing=0.09,Outline=1,Shadow=0,MarginL={subtitle_margin},MarginR={subtitle_margin}'" + (', hwupload' if vf_hwupload else '')])
else:
if vf_hwupload:
cmd_ffmpeg.extend(["-vf", f"format=nv12, hwupload"])
Expand Down

0 comments on commit ba3a824

Please sign in to comment.