vsmuxtools.extension.audio
export_audionode
Exports an audionode to a wav/w64 file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node
|
AudioNode
|
Your audionode |
required |
outfile
|
PathLike | None
|
Custom output path if any |
None
|
w64
|
bool | None
|
Force Wave64 output or auto-detect based on file size/extension |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
Returns path |
Source code in
vsmuxtools/extension/audio.py
do_audio
do_audio(fileIn: PathLike | list[PathLike] | list[Path] | src_file | AudioNode, track: int = 0, trims: Trim | list[Trim] | None = None, timesource: TimeSourceT = None, timescale: TimeScaleT = TimeScale.MKV, num_frames: int = 0, extractor: Extractor | None = AutoExtractor(), trimmer: Trimmer | None = AutoTrimmer(), encoder: Encoder | None = AutoEncoder(), quiet: bool = True, output: PathLike | None = None) -> AudioFile
One-liner to handle the whole audio processing
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fileIn
|
PathLike | list[PathLike] | list[Path] | src_file | AudioNode
|
Input file or src_file/FileInfo or AudioNode |
required |
track
|
int
|
Audio track number |
0
|
trims
|
Trim | list[Trim] | None
|
Frame ranges to trim and/or combine, e.g. (24, -24) or [(24, 500), (700, 900)] None inherits the src_file's trims; [] disables trimming. Explicit trims override the source's trims. |
None
|
timesource
|
TimeSourceT
|
The source of timestamps/timecodes. For details check the docstring on the type. Will be taken from input if it's a src_file and assume the usual 24 if not. |
None
|
timescale
|
TimeScaleT
|
Unit of time (in seconds) in terms of which frame timestamps are represented. For details check the docstring on the type. |
MKV
|
num_frames
|
int
|
Total number of frames, used for negative numbers in trims Will be taken from input if it's a src_file |
0
|
extractor
|
Extractor | None
|
Tool used to extract the audio (Will default to None if an AudioNode gets passed, otherwise FFMpeg) |
AutoExtractor()
|
trimmer
|
Trimmer | None
|
Tool used to trim the audio AutoTrimmer means it will choose ffmpeg for lossy and Sox for lossless |
AutoTrimmer()
|
encoder
|
Encoder | None
|
Tool used to encode the audio AutoEncoder means it won't reencode lossy and choose opus otherwise |
AutoEncoder()
|
quiet
|
bool
|
Whether the tool output should be visible |
True
|
output
|
PathLike | None
|
Custom output file or directory, extensions will be automatically added |
None
|
Returns:
| Type | Description |
|---|---|
AudioFile
|
AudioFile Object containing file path, delays and source |