types
Chapter = tuple[timedelta | int, Optional[str]]
module-attribute
PathLike = Union[Path, str, None]
module-attribute
Paths = Union[PathLike, list[PathLike]]
module-attribute
Trim = tuple[int | None, int | None]
module-attribute
__all__ = ['PathLike', 'Paths', 'Trim', 'TrackType', 'AudioFormat', 'AudioFrame', 'AudioStats', 'AudioInfo', 'Chapter', 'DitherType', 'LossyWavQuality']
module-attribute
AudioFormat
dataclass
AudioFrame
dataclass
A dataclass representing ffmpeg's ashowdata
filter output.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n
|
int
|
The (sequential) number of the input frame, starting from 0 |
required |
pts
|
int
|
The presentation timestamp of the input frame, in time base units the time base depends on the filter input pad, and is usually 1/sample_rate |
required |
pts_time
|
float
|
The presentation timestamp of the input frame in seconds |
required |
num_samples
|
int
|
Number of samples in a frame (can also be refered to as frame length or size) |
required |
Source code in muxtools/utils/types.py
n: int
instance-attribute
num_samples: int
instance-attribute
pts: int
instance-attribute
pts_time: float
instance-attribute
__init__
AudioInfo
dataclass
Source code in muxtools/utils/types.py
frames: list[AudioFrame] | None = None
class-attribute
instance-attribute
stats: AudioStats = None
class-attribute
instance-attribute
__init__
AudioStats
dataclass
A dataclass representing ffmpeg's astats
filter output.
Too many attributes to document to be honest.
See https://ffmpeg.org/ffmpeg-filters.html#astats-1
Source code in muxtools/utils/types.py
bit_depth: str = ''
class-attribute
instance-attribute
dc_offset: float = 0.0
class-attribute
instance-attribute
entropy: float = 0.0
class-attribute
instance-attribute
flat_factor: float = 0.0
class-attribute
instance-attribute
max_difference: float = 0.0
class-attribute
instance-attribute
max_level: float = 0.0
class-attribute
instance-attribute
mean_difference: float = 0.0
class-attribute
instance-attribute
min_difference: float = 0.0
class-attribute
instance-attribute
min_level: float = 0.0
class-attribute
instance-attribute
noise_floor_count: float = 0.0
class-attribute
instance-attribute
noise_floor_db: float = 0.0
class-attribute
instance-attribute
number_of_samples: int = 0
class-attribute
instance-attribute
peak_count: float = 0.0
class-attribute
instance-attribute
peak_level_db: float = 0.0
class-attribute
instance-attribute
rms_difference: float = 0.0
class-attribute
instance-attribute
rms_level_db: float = 0.0
class-attribute
instance-attribute
rms_peak_db: float = 0.0
class-attribute
instance-attribute
rms_trough_db: float = 0.0
class-attribute
instance-attribute
__init__
DitherType
Bases: IntEnum
FFMPEG Dither Methods, see https://ffmpeg.org/ffmpeg-resampler.html#Resampler-Options
Source code in muxtools/utils/types.py
F_WEIGHTED = 8
class-attribute
instance-attribute
HIGH_SHIBATA = 7
class-attribute
instance-attribute
IMPROVED_E_WEIGHTED = 10
class-attribute
instance-attribute
LIPSHITZ = 4
class-attribute
instance-attribute
LOW_SHIBATA = 6
class-attribute
instance-attribute
MODIFIED_E_WEIGHTED = 9
class-attribute
instance-attribute
RECTANGULAR = 1
class-attribute
instance-attribute
SHIBATA = 5
class-attribute
instance-attribute
TRIANGULAR = 2
class-attribute
instance-attribute
TRIANGULAR_HP = 3
class-attribute
instance-attribute
LossyWavQuality
Bases: IntEnum
LossyWAV Quality presets, see https://wiki.hydrogenaud.io/index.php?title=LossyWAV#Quality_presets
TL;DR: Insane the least lossy, ExtraPortable the most lossy.
Source code in muxtools/utils/types.py
ECONOMIC = 5
class-attribute
instance-attribute
EXTRAPORTABLE = 7
class-attribute
instance-attribute
EXTREME = 2
class-attribute
instance-attribute
HIGH = 3
class-attribute
instance-attribute
INSANE = 1
class-attribute
instance-attribute
PORTABLE = 6
class-attribute
instance-attribute
STANDARD = 4
class-attribute
instance-attribute
TrackType
Bases: IntEnum
Source code in muxtools/utils/types.py
ATTACHMENT = 4
class-attribute
instance-attribute
AUDIO = 2
class-attribute
instance-attribute
CHAPTERS = 5
class-attribute
instance-attribute
MKV = 6
class-attribute
instance-attribute
SUB = 3
class-attribute
instance-attribute
VIDEO = 1
class-attribute
instance-attribute
ValidInputType
Bases: IntEnum
Source code in muxtools/utils/types.py
AIFF = 2
class-attribute
instance-attribute
AIFF_OR_FLAC = 5
class-attribute
instance-attribute
FLAC = 1
class-attribute
instance-attribute
RF64 = 4
class-attribute
instance-attribute
RF64_OR_FLAC = 7
class-attribute
instance-attribute
W64 = 3
class-attribute
instance-attribute
W64_OR_FLAC = 6
class-attribute
instance-attribute
allows_flac
remove_flac
Source code in muxtools/utils/types.py
qAAC_MODE
Bases: IntEnum