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 | |
force_lsmas
|
bool
|
Force the use of lsmas.LWLibavSource |
False
|
force_bs
|
bool
|
Force the use of bs.VideoSource. This takes priority over the force_lsmas param. |
False
|
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
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 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 |
|
__init__(file, force_lsmas=False, trim=None, idx=None, force_bs=False, **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 |
force_lsmas
|
bool
|
Forces the use of lsmas inside of the default indexer function. |
False
|
trim
|
Trim
|
Can be a single trim or a sequence of trims. |
None
|
idx
|
Callable[[str], VideoNode] | None
|
Indexer for the input file. Pass a function that takes a string in and returns a vs.VideoNode. |
None
|
force_bs
|
bool
|
Forces the use of bestsource inside of the default indexer function. |
False
|
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(*args, **kwargs)
Getter that calls vstools.initialize_clip
on the src clip for convenience
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kwargs
|
Any other args passed to initialize_clip |
{}
|
Source code in vsmuxtools/utils/source.py
init_cut(*args, **kwargs)
Getter that calls vstools.initialize_clip
on the src_cut clip for convenience
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kwargs
|
Any other args passed to initialize_clip |
{}
|
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 |