Skip to content

Commit

Permalink
add suboptions (#192)
Browse files Browse the repository at this point in the history
Co-authored-by: Takeoischifan <[email protected]>
  • Loading branch information
TakeoIschiFan and TakeoIschiFan authored May 13, 2024
1 parent 225e8e5 commit 8d4902b
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions src/encode.moon
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,41 @@ append_list_options = (out, property_name, option_prefix) ->

-- Get the current playback options, trying to match how the video is being played.
get_playback_options = ->
ret = {}
append_property(ret, "video-rotate")
append_property(ret, "ytdl-format")
append_property(ret, "deinterlace")

return ret

get_sub_options = ->
ret = {}
append_property(ret, "sub-ass-override")
append_property(ret, "sub-ass-force-style")
append_property(ret, "sub-ass-vsfilter-aspect-compat")
append_property(ret, "sub-auto")
append_property(ret, "sub-pos")
append_property(ret, "sub-delay")
append_property(ret, "video-rotate")
append_property(ret, "ytdl-format")
append_property(ret, "deinterlace")
append_property(ret, "sub-scale")
append_property(ret, "sub-font")
append_property(ret, "sub-font-size")
append_property(ret, "sub-bold")
append_property(ret, "sub-italic")
append_property(ret, "sub-color")
append_property(ret, "sub-back-color")
append_property(ret, "sub-border-color")
append_property(ret, "sub-border-size")
append_property(ret, "sub-shadow-color")
append_property(ret, "sub-shadow-offset")
append_property(ret, "sub-use-margins")
append_property(ret, "sub-margin-x")
append_property(ret, "sub-margin-y")
append_property(ret, "sub-align-x")
append_property(ret, "sub-align-y")
append_property(ret, "sub-spacing")
append_property(ret, "sub-justify")
append_property(ret, "sub-gauss")
append_property(ret, "sub-gray")

return ret

Expand Down Expand Up @@ -193,6 +218,8 @@ get_video_filters = (format, region) ->
get_video_encode_flags = (format, region) ->
flags = {}
append(flags, get_playback_options!)
append(flags, get_sub_options!)


filters = get_video_filters(format, region)
for f in *filters
Expand Down

0 comments on commit 8d4902b

Please sign in to comment.