src
src
Uses lsmas for previewing and bestsource otherwise. Still supports dgi files directly if dgdecodenv is installed to not break existing scripts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath
|
Path to video or dgi file |
required | |
preview_sourcefilter
|
SourceFilter | None
|
Source filter to be used when previewing using vspreview. |
AUTO
|
sourcefilter
|
SourceFilter
|
Source filter to be used otherwise. |
BESTSOURCE
|
kwargs
|
KwargsT
|
Other arguments you may or may not wanna pass to the indexer. |
{}
|
Returns:
Type | Description |
---|---|
VideoNode
|
Video Node |
Source code in vsmuxtools/utils/source.py
src_file
Source code in vsmuxtools/utils/source.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 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 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
|
__init__(file, trim=None, preview_sourcefilter=SourceFilter.FFMS2, sourcefilter=SourceFilter.BESTSOURCE, idx=None, **kwargs)
Custom FileInfo
kind of thing for convenience
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file
|
PathLike | GlobSearch | Sequence[PathLike]
|
Either a string based filepath or a Path object |
required |
trim
|
Trim
|
Can be a single trim or a sequence of trims. |
None
|
preview_sourcefilter
|
SourceFilter | None
|
Source filter to be used when previewing using vspreview. |
FFMS2
|
sourcefilter
|
SourceFilter
|
Source filter to be used otherwise. |
BESTSOURCE
|
idx
|
Callable[[str], VideoNode] | None
|
Custom indexer for the input file. Pass a function that takes a string in and returns a vs.VideoNode. |
None
|
Source code in vsmuxtools/utils/source.py
get_audio(track=0, **kwargs)
Indexes the specified audio track from the input file(s).
Source code in vsmuxtools/utils/source.py
get_audio_trimmed(track=0, **kwargs)
Gets the indexed audio track with the trim specified in the src_file.
Source code in vsmuxtools/utils/source.py
init(bits=None, matrix=None, transfer=None, primaries=None, chroma_location=None, color_range=None, field_based=None, strict=False, dither_type=DitherType.AUTO)
Getter that calls vstools.initialize_clip
on the src clip for convenience
Source code in vsmuxtools/utils/source.py
init_cut(bits=None, matrix=None, transfer=None, primaries=None, chroma_location=None, color_range=None, field_based=None, strict=False, dither_type=DitherType.AUTO)
Getter that calls vstools.initialize_clip
on the src_cut clip for convenience
Source code in vsmuxtools/utils/source.py
SRC_FILE (alias)
FileInfo (alias)
Converts a frame number to a sample number
Parameters:
Name | Type | Description | Default |
---|---|---|---|
frame
|
int
|
The frame number |
required |
sample_rate
|
AudioNode | int
|
Can be a flat number like 48000 (=48 kHz) or an AudioNode to get the sample rate from |
48000
|
fps
|
VideoNode | Fraction
|
Can be a Fraction or a VideoNode to get the fps from |
Fraction(24000, 1001)
|
Returns:
Type | Description |
---|---|
int
|
The sample number |