basesub
_Line
Source code in muxtools/subtitle/basesub.py
TYPE: str
instance-attribute
The type of line. Should either be Dialogue
or Comment
.
effect: str
instance-attribute
A legacy effect to be applied to the event. Can usually also be used as another freeform field.
end: timedelta
instance-attribute
End of this line as a timedelta.
layer: int
instance-attribute
An integer value in the range [0, 2³¹-1]
. Events with a lower Layer value are placed behind events with a higher value.
margin_l: int
instance-attribute
Left margin overriding the value in the current style.
margin_r: int
instance-attribute
Right margin overriding the value in the current style.
margin_v: int
instance-attribute
Vertical margin overriding the value in the current style.
name: str
instance-attribute
Usually used for what character is currently speaking. Known as Actor
in aegisub.
start: timedelta
instance-attribute
Start of this line as a timedelta.
style: str
instance-attribute
Style name used for this line. Must exactly match one of the styles in your subtitle file.
text: str
instance-attribute
The text displayed (or not, if this is a Comment)
ASSHeader
Bases: IntEnum
Basic enum class for some functional ASS headers.
Check https://github.com/libass/libass/wiki/ASS-File-Format-Guide for more information on each member.
Also contains the function to validate the input.
Source code in muxtools/subtitle/basesub.py
LayoutResX = 1
class-attribute
instance-attribute
Video width this subtitle was originally authored on.
LayoutResY = 2
class-attribute
instance-attribute
Video height this subtitle was originally authored on.
PlayResX = 3
class-attribute
instance-attribute
Video width this subtitle is used on.
PlayResY = 4
class-attribute
instance-attribute
Video height this subtitle is used on.
ScaledBorderAndShadow = 6
class-attribute
instance-attribute
Scale border and shadow with playback resolution. Should ideally always be yes.
WrapStyle = 5
class-attribute
instance-attribute
The default line-wrapping behaviour.
YCbCr_Matrix = 7
class-attribute
instance-attribute
The color range and matrix this subtitle was authored for.
BaseSubFile
dataclass
Bases: ABC
, MuxingFile
A base class for the SubFile class.
Mostly contains the functions to read/write the file and some commonly reused functions to manipulate headers/lines.
Source code in muxtools/subtitle/basesub.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
|