mpv_audio_kit library
mpv_audio_kit: a Flutter audio player powered by libmpv.
Supports macOS, Windows, Linux, iOS, and Android.
Quick start
import 'package:flutter/widgets.dart';
import 'package:mpv_audio_kit/mpv_audio_kit.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
MpvAudioKit.ensureInitialized(); // once, before any Player
final player = Player();
player.stream.position.listen((pos) => print(pos));
player.stream.playing.listen((p) => print('playing: $p'));
await player.open(const Media('https://example.com/audio.mp3'));
await player.play();
// ...
await player.dispose();
}
Classes
- AcompressorEffect
-
Configuration for the
acompressoraudio effect. - AcontrastEffect
-
Configuration for the
acontrastaudio effect. - AcrusherEffect
-
Configuration for the
acrusheraudio effect. - AdeclickEffect
-
Configuration for the
adeclickaudio effect. - AdeclipEffect
-
Configuration for the
adeclipaudio effect. - AdecorrelateEffect
-
Configuration for the
adecorrelateaudio effect. - AdelayEffect
-
Configuration for the
adelayaudio effect. - AdenormEffect
-
Configuration for the
adenormaudio effect. - AderivativeEffect
-
Configuration for the
aderivativeaudio effect. - AdrcEffect
-
Configuration for the
adrcaudio effect. - AdynamicequalizerEffect
-
Configuration for the
adynamicequalizeraudio effect. - AdynamicsmoothEffect
-
Configuration for the
adynamicsmoothaudio effect. - AechoEffect
-
Configuration for the
aechoaudio effect. - AechoTap
-
One echo tap of the lavfi
aechofilter. - AemphasisEffect
-
Configuration for the
aemphasisaudio effect. - AevalEffect
-
Configuration for the
aevalaudio effect. - AexciterEffect
-
Configuration for the
aexciteraudio effect. - AfadeEffect
-
Configuration for the
afadeaudio effect. - AfftdnEffect
-
Configuration for the
afftdnaudio effect. - AfftfiltEffect
-
Configuration for the
afftfiltaudio effect. - AformatEffect
-
Configuration for the
aformataudio effect. - AfreqshiftEffect
-
Configuration for the
afreqshiftaudio effect. - AfwtdnEffect
-
Configuration for the
afwtdnaudio effect. - AgateEffect
-
Configuration for the
agateaudio effect. - AiirChannel
-
One channel slot of the lavfi
aiirfilter: the per-channel gain plus the polynomial coefficients of its IIR transfer function. - AiirEffect
-
Configuration for the
aiiraudio effect. - AintegralEffect
-
Configuration for the
aintegralaudio effect. - AlimiterEffect
-
Configuration for the
alimiteraudio effect. - AllpassEffect
-
Configuration for the
allpassaudio effect. - AnequalizerBand
-
One logical band of the lavfi
anequalizerfilter. - AnequalizerEffect
-
Configuration for the
anequalizeraudio effect. - AnlmdnEffect
-
Configuration for the
anlmdnaudio effect. - ApadEffect
-
Configuration for the
apadaudio effect. - AphaserEffect
-
Configuration for the
aphaseraudio effect. - AphaseshiftEffect
-
Configuration for the
aphaseshiftaudio effect. - ApsyclipEffect
-
Configuration for the
apsyclipaudio effect. - ApulsatorEffect
-
Configuration for the
apulsatoraudio effect. - AresampleEffect
-
Configuration for the
aresampleaudio effect. - ArnndnEffect
-
Configuration for the
arnndnaudio effect. - AsetrateEffect
-
Configuration for the
asetrateaudio effect. - AsoftclipEffect
-
Configuration for the
asoftclipaudio effect. - AsubboostEffect
-
Configuration for the
asubboostaudio effect. - AsubcutEffect
-
Configuration for the
asubcutaudio effect. - AsupercutEffect
-
Configuration for the
asupercutaudio effect. - AsuperpassEffect
-
Configuration for the
asuperpassaudio effect. - AsuperstopEffect
-
Configuration for the
asuperstopaudio effect. - AtempoEffect
-
Configuration for the
atempoaudio effect. - AtiltEffect
-
Configuration for the
atiltaudio effect. - AudioEffect
-
One stage of the audio effects chain: an entry of the ordered list given
to
Player.setAudioEffects. Stages run in list order, and the same filter may appear more than once. - AudioParams
-
Audio format parameters reported by mpv. Used both for the decoder
side (
audio-params+audio-codec*) and for the hardware output side (audio-out-params). - BandpassEffect
-
Configuration for the
bandpassaudio effect. - BandProcessor
- Stateful PCM-to-bands processor: runs the same FFT, windowing, log-band aggregation and asymmetric-EMA smoothing the library uses internally to back PlayerStream.fft.
- BandrejectEffect
-
Configuration for the
bandrejectaudio effect. - BassEffect
-
Configuration for the
bassaudio effect. - BiquadEffect
-
Configuration for the
biquadaudio effect. - CacheRange
- A contiguous time range currently held in the demuxer cache.
- CacheSettings
-
Aggregate of mpv's six cache properties (
cache,cache-secs,cache-on-disk,cache-pause,cache-pause-wait,cache-pause-initial). - ChannelmapEffect
-
Configuration for the
channelmapaudio effect. - Channels
-
How Player.setAudioChannels should resolve mpv's
audio-channelsproperty. - ChannelsCustom
- Custom-string variant: escape hatch for mpv layouts beyond the 41 named ones (comma-separated layouts, raw speaker tags, future mpv additions).
- Chapter
-
A chapter entry in the current track's
chapter-list. - ChorusEffect
-
Configuration for the
chorusaudio effect. - ChorusVoice
-
One voice of the lavfi
chorusfilter. - CompandEffect
-
Configuration for the
compandaudio effect. - CompandEnvelope
-
One per-channel envelope of the lavfi
compandfilter: the attack and decay time-constants the level detector uses on that channel. - CompandPoint
-
One break-point of the lavfi
compandfilter's transfer function. - CompensationdelayEffect
-
Configuration for the
compensationdelayaudio effect. - CoverArt
- Cover-art payload extracted from the currently loaded file.
- CrossfeedEffect
-
Configuration for the
crossfeedaudio effect. - CrystalizerEffect
-
Configuration for the
crystalizeraudio effect. - DcshiftEffect
-
Configuration for the
dcshiftaudio effect. - DeesserEffect
-
Configuration for the
deesseraudio effect. - DemuxerCacheState
-
Rich snapshot of mpv's
demuxer-cache-state: the parts useful to an audio UI streaming over the network. Complements the scalar PlayerState.bufferingPercentage and PlayerState.bufferDuration with the structured cache picture. - DemuxerSettings
-
Aggregate of mpv's three demuxer-buffering properties
(
demuxer-max-bytes,demuxer-max-back-bytes,demuxer-readahead-secs). - Device
- Represents an audio output device detected by mpv.
- DialoguenhanceEffect
-
Configuration for the
dialoguenhanceaudio effect. - DrmeterEffect
-
Configuration for the
drmeteraudio effect. - DynaudnormEffect
-
Configuration for the
dynaudnormaudio effect. - EarwaxEffect
-
Configuration for the
earwaxaudio effect. - Ebur128Effect
-
Configuration for the
ebur128audio effect. - EndFileError
- Playback of a file ended with an error or unexpected EOF.
- EqualizerEffect
-
Configuration for the
equalizeraudio effect. - ExtrastereoEffect
-
Configuration for the
extrastereoaudio effect. - FftFrame
- One FFT frame: a frequency-domain snapshot of the audio currently playing through the player's output.
- FirequalizerEffect
-
Configuration for the
firequalizeraudio effect. - FirequalizerEntry
-
One break-point of the lavfi
firequalizerfilter's gain curve. - FlangerEffect
-
Configuration for the
flangeraudio effect. - HaasEffect
-
Configuration for the
haasaudio effect. - HdcdEffect
-
Configuration for the
hdcdaudio effect. - HighpassEffect
-
Configuration for the
highpassaudio effect. - HighshelfEffect
-
Configuration for the
highshelfaudio effect. - LogError
-
A log message at
errororfatallevel from an mpv subsystem. - Loudness
- EBU R128 loudness measurement snapshot, in LUFS and LU.
- LoudnessScan
-
Result of the offline loudness scan (EBU R128, ITU-R BS.1770) of the
loaded source, emitted on
PlayerStream.loudnessScan. - LoudnormEffect
-
Configuration for the
loudnormaudio effect. - LowpassEffect
-
Configuration for the
lowpassaudio effect. - LowshelfEffect
-
Configuration for the
lowshelfaudio effect. - McompandBand
-
One band of the lavfi
mcompandfilter: a self-contained compander stage with its own dynamics envelope, transfer function, soft-knee, makeup gain, and crossover frequency. - McompandEffect
-
Configuration for the
mcompandaudio effect. - Media
- A piece of media that can be loaded into the Player.
- MediaSession
- Configuration and metadata for the OS media session: the lockscreen, SMTC or MPRIS entry, Bluetooth AVRCP, headset buttons, and (on iOS and Android) the AVAudioSession or AudioFocus integration.
- MediaSessionArtwork
- Artwork shown on the OS media session (lockscreen, Control Center, SMTC, MPRIS). Set via MediaSession.artwork.
- MediaSessionArtworkCustom
- The MediaSessionArtwork.custom variant: a consumer-supplied cover.
- MediaSessionArtworkEmbedded
- The MediaSessionArtwork.embedded variant: artwork from the playing file's embedded cover.
- MediaSessionArtworkNone
- The MediaSessionArtwork.none variant: show no artwork.
- MediaSessionArtworkUri
-
The MediaSessionArtwork.uri variant: the image at an
http(s)://orfile://URL, see MediaSessionArtwork.uri for who loads it. - MediaSessionCommand
- A command issued by the operating system's media session: pressed on the lockscreen, sent by a Bluetooth headset, triggered by Siri or Google Assistant, or forwarded by Android Auto or CarPlay.
- MediaSessionCommandLike
- The MediaSessionCommand.like variant: the favourite (like) control was pressed. Emit-only (no built-in player effect).
- MediaSessionCommandNext
- The MediaSessionCommand.next variant: skip to the next track.
- MediaSessionCommandPause
- The MediaSessionCommand.pause variant: pause playback.
- MediaSessionCommandPlay
- The MediaSessionCommand.play variant: start or resume playback.
- MediaSessionCommandPlayPause
- The MediaSessionCommand.playPause variant: toggle between play and pause.
- MediaSessionCommandPrevious
- The MediaSessionCommand.previous variant: skip to the previous track.
- MediaSessionCommandSeekBy
- The MediaSessionCommand.seekBy variant: seek by a relative offset. Negative offsets rewind.
- MediaSessionCommandSeekTo
- The MediaSessionCommand.seekTo variant: seek to an absolute position, carrying the target position.
- MediaSessionCommandSetPlaybackRate
- The MediaSessionCommand.setPlaybackRate variant: change playback speed to the carried rate.
- MediaSessionCommandSetRepeatMode
- The MediaSessionCommand.setRepeatMode variant: change the repeat mode to the carried loop.
- MediaSessionCommandSetShuffle
- The MediaSessionCommand.setShuffle variant: toggle shuffle to the carried shuffle state.
- MediaSessionCommandStop
- The MediaSessionCommand.stop variant: stop playback and clear the now-playing entry.
- MpvAudioKit
-
One-time initialization for
mpv_audio_kit. Owns the libmpvDynamicLibrarylookup and the orphaned-handle cleanup that fires across Flutter Hot-Restarts. - MpvError
-
Mirror of libmpv's
mpv_errorreturn codes (the subset this package uses). - MpvFileEndedEvent
- Emitted for every file-end event, regardless of whether an error occurred.
- MpvHookEvent
- Emitted by PlayerStream.hook when mpv fires a registered hook.
- MpvLogEntry
-
A structured log entry. Emitted on PlayerStream.log for messages
from the mpv engine (
'ffmpeg','demux','ao', …) and on PlayerStream.internalLog for library-side diagnostics (parse warnings, hook timeouts; always carriesprefix: 'mpv_audio_kit'). Filter by level to reduce noise. - MpvTrack
-
A single track entry from mpv's
track-list(orcurrent-tracks/audio). - PanEffect
-
Configuration for the
panaudio effect. - PcmFormat
- The layout of the raw PCM a PcmSource carries: no header, samples interleaved by channel.
- PcmFrame
- One PCM frame: raw post-DSP audio samples captured at the player's output, before they're handed to the OS audio driver.
- PcmSource
- A live input of raw PCM chunks, played as a Media while it arrives: speech generated chunk by chunk, a network stream of samples, a synthesizer. No file, no socket, no header.
- Player
- A high-performance audio player powered by libmpv.
- PlayerApi
- Public surface of the Player: every method, getter, and stream a consumer interacts with.
- PlayerConfiguration
-
Build-time configuration for a Player: the set-once choices applied
before or at
mpv_initialize. - PlayerError
-
Typed error events delivered on PlayerStream.error. A sealed union
over EndFileError (playback failures) and LogError
(
errororfatallog lines from an mpv subsystem). Pattern-match on the variant to distinguish them. - PlayerState
- Immutable snapshot of the Player's complete playback state.
- PlayerStream
- Typed streams of the Player's state and events.
- Playlist
- An ordered list of Media items loaded into the Player.
- RawAudioEffect
-
A chain stage written as a raw lavfi entry, for filters or option
forms the typed effects do not cover, e.g.
RawAudioEffect('lavfi-aeval=val(0)*0.5|val(1)*0.5'). - ReplayGainSettings
-
Aggregate of mpv's four ReplayGain properties (
replaygain,replaygain-preamp,replaygain-clip,replaygain-fallback). - RubberbandEffect
-
Configuration for the
rubberbandaudio effect. - SilenceremoveEffect
-
Configuration for the
silenceremoveaudio effect. - SourceResolveRequest
- The context handed to a SourceResolver for one load attempt.
- SpectrumSettings
- Configuration for the real-time FFT spectrum + raw PCM streams.
- SpeechnormEffect
-
Configuration for the
speechnormaudio effect. - StereotoolsEffect
-
Configuration for the
stereotoolsaudio effect. - StereowidenEffect
-
Configuration for the
stereowidenaudio effect. - SuperequalizerEffect
-
Configuration for the
superequalizeraudio effect. - SurroundEffect
-
Configuration for the
surroundaudio effect. - TiltshelfEffect
-
Configuration for the
tiltshelfaudio effect. - Track
-
How Player.setAudioTrack should resolve mpv's
aidproperty. - TrackAuto
- The Track.auto variant: defer to mpv's automatic track choice.
- TrackId
- The Track.id variant: select a specific track by mpv track id.
- TrackOff
- The Track.off variant: disable audio output entirely.
- TrebleEffect
-
Configuration for the
trebleaudio effect. - TremoloEffect
-
Configuration for the
tremoloaudio effect. - VibratoEffect
-
Configuration for the
vibratoaudio effect. - VirtualbassEffect
-
Configuration for the
virtualbassaudio effect. - WaveformData
- Mono min, max and RMS amplitude envelope of the audio currently loaded.
Enums
- AcompressorDetection
-
Values for the
detectionoption of theacompressoraudio filter. - AcompressorLink
-
Values for the
linkoption of theacompressoraudio filter. - AcompressorMode
-
Values for the
modeoption of theacompressoraudio filter. - AcrusherMode
-
Values for the
modeoption of theacrusheraudio filter. - AdeclickM
-
Values for the
methodoption of theadeclickaudio filter. - AdeclipM
-
Values for the
methodoption of theadeclipaudio filter. - AdenormType
-
Values for the
typeoption of theadenormaudio filter. - AdynamicequalizerAuto
-
Values for the
autooption of theadynamicequalizeraudio filter. - AdynamicequalizerDftype
-
Values for the
dftypeoption of theadynamicequalizeraudio filter. - AdynamicequalizerMode
-
Values for the
modeoption of theadynamicequalizeraudio filter. - AdynamicequalizerPrecision
-
Values for the
precisionoption of theadynamicequalizeraudio filter. - AdynamicequalizerTftype
-
Values for the
tftypeoption of theadynamicequalizeraudio filter. - AemphasisMode
-
Values for the
modeoption of theaemphasisaudio filter. - AemphasisType
-
Values for the
typeoption of theaemphasisaudio filter. - AfadeCurve
-
Values for the
curveoption of theafadeaudio filter. - AfadeType
-
Values for the
typeoption of theafadeaudio filter. - AfftdnLink
-
Values for the
noise_linkoption of theafftdnaudio filter. - AfftdnMode
-
Values for the
output_modeoption of theafftdnaudio filter. - AfftdnSample
-
Values for the
sample_noiseoption of theafftdnaudio filter. - AfftdnType
-
Values for the
noise_typeoption of theafftdnaudio filter. - AfftfiltWinFunc
-
Values for the
win_funcoption of theafftfiltaudio filter. - AfwtdnWavet
-
Values for the
wavetoption of theafwtdnaudio filter. - AgateDetection
-
Values for the
detectionoption of theagateaudio filter. - AgateLink
-
Values for the
linkoption of theagateaudio filter. - AgateMode
-
Values for the
modeoption of theagateaudio filter. - AiirFormat
-
Values for the
formatoption of theaiiraudio filter. - AiirPrecision
-
Values for the
precisionoption of theaiiraudio filter. - AiirProcess
-
Values for the
processoption of theaiiraudio filter. - AllpassPrecision
-
Values for the
precisionoption of theallpassaudio filter. - AllpassTransformType
-
Values for the
transformoption of theallpassaudio filter. - AllpassWidthType
-
Values for the
width_typeoption of theallpassaudio filter. - AnequalizerBandType
-
lavfi
anequalizerfilter shape. Matchest=0|1|2on the wire. - AnequalizerFscale
-
Values for the
fscaleoption of theanequalizeraudio filter. - AnlmdnMode
-
Values for the
outputoption of theanlmdnaudio filter. - AphaserType
-
Values for the
typeoption of theaphaseraudio filter. - ApulsatorMode
-
Values for the
modeoption of theapulsatoraudio filter. - ApulsatorTiming
-
Values for the
timingoption of theapulsatoraudio filter. - AsoftclipTypes
-
Values for the
typeoption of theasoftclipaudio filter. - AudioFilter
-
Identifies one of the typed audio filters: one value per
XxxEffectclass, i.e. per filter compiled into the bundled libmpv. Use it as a typed identifier in APIs that pick a filter, e.g.player.stream.tap(AudioFilter.equalizer, side: TapSide.post). - AudioOutputState
-
Lifecycle of mpv's audio output, reported by the
audio-output-statempv property. - BandpassPrecision
-
Values for the
precisionoption of thebandpassaudio filter. - BandpassTransformType
-
Values for the
transformoption of thebandpassaudio filter. - BandpassWidthType
-
Values for the
width_typeoption of thebandpassaudio filter. - BandrejectPrecision
-
Values for the
precisionoption of thebandrejectaudio filter. - BandrejectTransformType
-
Values for the
transformoption of thebandrejectaudio filter. - BandrejectWidthType
-
Values for the
width_typeoption of thebandrejectaudio filter. - BassPrecision
-
Values for the
precisionoption of thebassaudio filter. - BassTransformType
-
Values for the
transformoption of thebassaudio filter. - BassWidthType
-
Values for the
width_typeoption of thebassaudio filter. - BiquadPrecision
-
Values for the
precisionoption of thebiquadaudio filter. - BiquadTransformType
-
Values for the
transformoption of thebiquadaudio filter. - Cache
-
Network cache mode, mirroring
--cache=<auto|yes|no>. - Cover
-
External cover-art auto-load behaviour, mirroring
--cover-art-auto=<no|exact|fuzzy|all>. - DeesserMode
-
Values for the
soption of thedeesseraudio filter. - Ebur128Gaugetype
-
Values for the
gaugeoption of theebur128audio filter. - Ebur128Level
-
Values for the
framelogoption of theebur128audio filter. - Ebur128Mode
-
Values for the
peakoption of theebur128audio filter. - Ebur128Scaletype
-
Values for the
scaleoption of theebur128audio filter. - EqualizerPrecision
-
Values for the
precisionoption of theequalizeraudio filter. - EqualizerTransformType
-
Values for the
transformoption of theequalizeraudio filter. - EqualizerWidthType
-
Values for the
width_typeoption of theequalizeraudio filter. - FirequalizerScale
-
Values for the
dumpscaleoption of thefirequalizeraudio filter. - FirequalizerWfunc
-
Values for the
wfuncoption of thefirequalizeraudio filter. - FlangerItype
-
Values for the
interpoption of theflangeraudio filter. - FlangerType
-
Values for the
shapeoption of theflangeraudio filter. - Format
-
Audio sample format passed to mpv's
audio-formatproperty. - Gapless
-
Gapless playback mode, mirroring
--gapless-audio=<no|yes|weak>. - HaasSource
-
Values for the
middle_sourceoption of thehaasaudio filter. - HdcdAnalyzeMode
-
Values for the
analyze_modeoption of thehdcdaudio filter. - HdcdBitsPerSample
-
Values for the
bits_per_sampleoption of thehdcdaudio filter. - HighpassPrecision
-
Values for the
precisionoption of thehighpassaudio filter. - HighpassTransformType
-
Values for the
transformoption of thehighpassaudio filter. - HighpassWidthType
-
Values for the
width_typeoption of thehighpassaudio filter. - HighshelfPrecision
-
Values for the
precisionoption of thehighshelfaudio filter. - HighshelfTransformType
-
Values for the
transformoption of thehighshelfaudio filter. - HighshelfWidthType
-
Values for the
width_typeoption of thehighshelfaudio filter. - HlsBitrate
-
HLS variant-selection policy for adaptive streams: mpv's
--hls-bitrate. - Hook
- Lifecycle hook fired by mpv during file loading and unloading.
- InterruptionPolicy
- How the player reacts when the OS interrupts audio: a phone call, Siri, an alarm, or another app taking audio focus. Set via MediaSession.interruptionPolicy.
- LogLevel
-
Severity threshold for the mpv log stream and library-side
diagnostics. Mirrors mpv's
--msg-levellevels verbatim. - Loop
- Looping behaviour for playback.
- LoudnessScanState
-
Lifecycle of the offline loudness scan observed on
PlayerStream.loudnessScan. - LoudnormPrintFormat
-
Values for the
print_formatoption of theloudnormaudio filter. - LowpassPrecision
-
Values for the
precisionoption of thelowpassaudio filter. - LowpassTransformType
-
Values for the
transformoption of thelowpassaudio filter. - LowpassWidthType
-
Values for the
width_typeoption of thelowpassaudio filter. - LowshelfPrecision
-
Values for the
precisionoption of thelowshelfaudio filter. - LowshelfTransformType
-
Values for the
transformoption of thelowshelfaudio filter. - LowshelfWidthType
-
Values for the
width_typeoption of thelowshelfaudio filter. - MediaAction
- Capabilities to advertise to the operating system's media session (lockscreen controls, Bluetooth AVRCP, headset buttons, …).
- MpvEndFileReason
-
Why a file ended: mirrors
mpv_end_file_reasonfrom the C API. - MpvPlaybackState
-
Aggregate playback lifecycle, derived from
playing,buffering,completed,pausedForCacheand whether a file is loaded. Subscribe viaPlayerStream.playbackStatewhen a single mutually-exclusive state fits the UI better than three separate booleans. The underlying booleans remain available onPlayerStreamfor granular use cases. - PcmEncoding
- The sample encoding of a PcmFormat: interleaved, little endian.
- PcmSourceState
- Where a PcmSource is in its life.
- PrefetchState
- Lifecycle phase of mpv's background playlist-prefetch.
- ReplayGain
-
ReplayGain normalization mode, mirroring
--replaygain=<no|track|album>. - RubberbandChannels
-
Values for the
channelsoption of therubberbandaudio filter. - RubberbandDetector
-
Values for the
detectoroption of therubberbandaudio filter. - RubberbandFormant
-
Values for the
formantoption of therubberbandaudio filter. - RubberbandPhase
-
Values for the
phaseoption of therubberbandaudio filter. - RubberbandPitch
-
Values for the
pitchqoption of therubberbandaudio filter. - RubberbandSmoothing
-
Values for the
smoothingoption of therubberbandaudio filter. - RubberbandTransients
-
Values for the
transientsoption of therubberbandaudio filter. - RubberbandWindow
-
Values for the
windowoption of therubberbandaudio filter. - SilenceremoveDetection
-
Values for the
detectionoption of thesilenceremoveaudio filter. - SilenceremoveMode
-
Values for the
start_modeoption of thesilenceremoveaudio filter. - SilenceremoveTimestamp
-
Values for the
timestampoption of thesilenceremoveaudio filter. - Spdif
- S/PDIF (or HDMI) compressed-audio passthrough codec.
- StereotoolsBmode
-
Values for the
bmode_inoption of thestereotoolsaudio filter. - StereotoolsMode
-
Values for the
modeoption of thestereotoolsaudio filter. - SurroundLfeMode
-
Values for the
lfe_modeoption of thesurroundaudio filter. - SurroundWinFunc
-
Values for the
win_funcoption of thesurroundaudio filter. - TapSide
- Side of an audio filter at which a per-filter tap captures samples.
- TiltshelfPrecision
-
Values for the
precisionoption of thetiltshelfaudio filter. - TiltshelfTransformType
-
Values for the
transformoption of thetiltshelfaudio filter. - TiltshelfWidthType
-
Values for the
width_typeoption of thetiltshelfaudio filter. - TreblePrecision
-
Values for the
precisionoption of thetrebleaudio filter. - TrebleTransformType
-
Values for the
transformoption of thetrebleaudio filter. - TrebleWidthType
-
Values for the
width_typeoption of thetrebleaudio filter. - WindowFunction
- Window function applied to each FFT block before transform.
Extensions
- AdelayChannelsX on AdelayEffect
-
Typed access over lavfi's
adelay.delays, a pipe-separated list of per-channel delays. The Nth entry is the delay applied to the Nth output channel. - AechoTapsX on AechoEffect
-
Typed access over the parallel pipe-separated CSVs lavfi's
aechopacks asdelays/decays. - AfftdnBandNoiseX on AfftdnEffect
-
Typed access over the
band_noise(aliasbn) string lavfi'safftdnpacks as space- or pipe-separated noise levels per band. - AiirChannelsX on AiirEffect
-
Typed access over
aiir's three parallel string parameters (gains/k,poles/p,zeros/z). The Nth|-section of each string belongs to the Nth output channel; coefficient lists within a channel are space-separated. - AnequalizerBandsX on AnequalizerEffect
-
Typed access over the raw
paramsCSV held by AnequalizerEffect. - ChorusVoicesX on ChorusEffect
-
Typed access over the four parallel pipe-separated CSVs
(
delays/decays/depths/speeds) lavfi'schorusexposes. - CompandEnvelopesX on CompandEffect
-
Typed access over the parallel pipe-separated CSVs lavfi's
compandpacks asattacks/decays. - CompandPointsX on CompandEffect
-
Typed access over the
pointsstring lavfi'scompandcarries (space-separatedinDb/outDbpairs). - CompandSoftKneeX on CompandEffect
-
Typed access over
compand.soft-knee: the smoothing applied across the breakpoints of the transfer function. - EndFileErrorX on EndFileError
- Convenience predicates for EndFileError.
- FirequalizerEntriesX on FirequalizerEffect
-
Typed access over the
gain_entrystring lavfi'sfirequalizercarries (entry(freq,gain);entry(freq,gain);…). - McompandBandsX on McompandEffect
-
Typed access over the raw
argsstring held by McompandEffect. - MpvFileEndedEventX on MpvFileEndedEvent
- Whether the file ended naturally and not because of a stop, error, redirect, or shutdown.
- SuperequalizerBandsX on SuperequalizerEffect
-
Typed access over the digit-prefixed
1b,2b, …,18bparameters that lavfi'ssuperequalizerpacks into the bundle's rawparams: Map<String, double>.
Constants
- kAfftdnBandCount → const int
-
Number of fixed bands lavfi's
afftdnuses for its custom noise profile: the filter splits the spectrum into 15 logarithmic bands and lets the consumer set a noise floor per band. - kAfftdnBandNoiseDefault → const double
- Default per-band noise floor when none is provided.
- kCompandSoftKneeDefault → const double
-
lavfi-side default for
compand.soft-knee, which leaves the transfer-function knee hard. - kSuperequalizerBandCount → const int
-
Number of bands the
superequalizerfilter exposes, fixed by the underlying ISO half-octave grid. -
kSuperequalizerFrequencies
→ const List<
double> -
18 fixed band centre frequencies of the lavfi
superequalizer, in Hz, lows-to-highs in declaration order. The frequencies are hard-coded insideaf_superequalizer.cand are not configurable; only the per-band gain is. - kSuperequalizerUnityGain → const double
- Default linear gain for an unmodified band (1.0 = unity, no change to that frequency's level).
Typedefs
-
SourceResolver
= FutureOr<
String?> Function(SourceResolveRequest request) - Resolves the URL mpv should actually open for a playlist entry, invoked by the library right before each stream open (and once more after a failed open, so an expired URL can be refreshed).
Exceptions / Errors
- MpvCommandException
- libmpv rejected a command or a property write: an unknown property or command, a value it refuses, or a command with nothing to act on (a seek with no file loaded).
- PlayerDisposedException
- The Player was disposed before the call, or before it finished starting (a call waiting for the start throws too). A call past that point when Player.dispose runs completes without effect instead.
- PlayerException
- Every exception a Player method throws. Switch on it to handle each case:
- PlayerInitException
- The Player could not start: libmpv failed to load or initialize. Every call on that player throws it.
- SourceException
-
A media source could not be prepared for playback before reaching
libmpv: a missing
asset://, or an Androidcontent://URI the app cannot read. Failures inside libmpv (a 404, an unsupported format) arrive onstream.errorinstead, since playback is asynchronous.