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 acompressor audio effect.
AcontrastEffect
Configuration for the acontrast audio effect.
AcrusherEffect
Configuration for the acrusher audio effect.
AdeclickEffect
Configuration for the adeclick audio effect.
AdeclipEffect
Configuration for the adeclip audio effect.
AdecorrelateEffect
Configuration for the adecorrelate audio effect.
AdelayEffect
Configuration for the adelay audio effect.
AdenormEffect
Configuration for the adenorm audio effect.
AderivativeEffect
Configuration for the aderivative audio effect.
AdrcEffect
Configuration for the adrc audio effect.
AdynamicequalizerEffect
Configuration for the adynamicequalizer audio effect.
AdynamicsmoothEffect
Configuration for the adynamicsmooth audio effect.
AechoEffect
Configuration for the aecho audio effect.
AechoTap
One echo tap of the lavfi aecho filter.
AemphasisEffect
Configuration for the aemphasis audio effect.
AevalEffect
Configuration for the aeval audio effect.
AexciterEffect
Configuration for the aexciter audio effect.
AfadeEffect
Configuration for the afade audio effect.
AfftdnEffect
Configuration for the afftdn audio effect.
AfftfiltEffect
Configuration for the afftfilt audio effect.
AformatEffect
Configuration for the aformat audio effect.
AfreqshiftEffect
Configuration for the afreqshift audio effect.
AfwtdnEffect
Configuration for the afwtdn audio effect.
AgateEffect
Configuration for the agate audio effect.
AiirChannel
One channel slot of the lavfi aiir filter: the per-channel gain plus the polynomial coefficients of its IIR transfer function.
AiirEffect
Configuration for the aiir audio effect.
AintegralEffect
Configuration for the aintegral audio effect.
AlimiterEffect
Configuration for the alimiter audio effect.
AllpassEffect
Configuration for the allpass audio effect.
AnequalizerBand
One logical band of the lavfi anequalizer filter.
AnequalizerEffect
Configuration for the anequalizer audio effect.
AnlmdnEffect
Configuration for the anlmdn audio effect.
ApadEffect
Configuration for the apad audio effect.
AphaserEffect
Configuration for the aphaser audio effect.
AphaseshiftEffect
Configuration for the aphaseshift audio effect.
ApsyclipEffect
Configuration for the apsyclip audio effect.
ApulsatorEffect
Configuration for the apulsator audio effect.
AresampleEffect
Configuration for the aresample audio effect.
ArnndnEffect
Configuration for the arnndn audio effect.
AsetrateEffect
Configuration for the asetrate audio effect.
AsoftclipEffect
Configuration for the asoftclip audio effect.
AsubboostEffect
Configuration for the asubboost audio effect.
AsubcutEffect
Configuration for the asubcut audio effect.
AsupercutEffect
Configuration for the asupercut audio effect.
AsuperpassEffect
Configuration for the asuperpass audio effect.
AsuperstopEffect
Configuration for the asuperstop audio effect.
AtempoEffect
Configuration for the atempo audio effect.
AtiltEffect
Configuration for the atilt audio 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 bandpass audio 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 bandreject audio effect.
BassEffect
Configuration for the bass audio effect.
BiquadEffect
Configuration for the biquad audio 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 channelmap audio effect.
Channels
How Player.setAudioChannels should resolve mpv's audio-channels property.
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 chorus audio effect.
ChorusVoice
One voice of the lavfi chorus filter.
CompandEffect
Configuration for the compand audio effect.
CompandEnvelope
One per-channel envelope of the lavfi compand filter: the attack and decay time-constants the level detector uses on that channel.
CompandPoint
One break-point of the lavfi compand filter's transfer function.
CompensationdelayEffect
Configuration for the compensationdelay audio effect.
CoverArt
Cover-art payload extracted from the currently loaded file.
CrossfeedEffect
Configuration for the crossfeed audio effect.
CrystalizerEffect
Configuration for the crystalizer audio effect.
DcshiftEffect
Configuration for the dcshift audio effect.
DeesserEffect
Configuration for the deesser audio 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 dialoguenhance audio effect.
DrmeterEffect
Configuration for the drmeter audio effect.
DynaudnormEffect
Configuration for the dynaudnorm audio effect.
EarwaxEffect
Configuration for the earwax audio effect.
Ebur128Effect
Configuration for the ebur128 audio effect.
EndFileError
Playback of a file ended with an error or unexpected EOF.
EqualizerEffect
Configuration for the equalizer audio effect.
ExtrastereoEffect
Configuration for the extrastereo audio effect.
FftFrame
One FFT frame: a frequency-domain snapshot of the audio currently playing through the player's output.
FirequalizerEffect
Configuration for the firequalizer audio effect.
FirequalizerEntry
One break-point of the lavfi firequalizer filter's gain curve.
FlangerEffect
Configuration for the flanger audio effect.
HaasEffect
Configuration for the haas audio effect.
HdcdEffect
Configuration for the hdcd audio effect.
HighpassEffect
Configuration for the highpass audio effect.
HighshelfEffect
Configuration for the highshelf audio effect.
LogError
A log message at error or fatal level 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 loudnorm audio effect.
LowpassEffect
Configuration for the lowpass audio effect.
LowshelfEffect
Configuration for the lowshelf audio effect.
McompandBand
One band of the lavfi mcompand filter: a self-contained compander stage with its own dynamics envelope, transfer function, soft-knee, makeup gain, and crossover frequency.
McompandEffect
Configuration for the mcompand audio 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):// or file:// 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 libmpv DynamicLibrary lookup and the orphaned-handle cleanup that fires across Flutter Hot-Restarts.
MpvError
Mirror of libmpv's mpv_error return 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 carries prefix: 'mpv_audio_kit'). Filter by level to reduce noise.
MpvTrack
A single track entry from mpv's track-list (or current-tracks/audio).
PanEffect
Configuration for the pan audio 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 (error or fatal log 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 rubberband audio effect.
SilenceremoveEffect
Configuration for the silenceremove audio 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 speechnorm audio effect.
StereotoolsEffect
Configuration for the stereotools audio effect.
StereowidenEffect
Configuration for the stereowiden audio effect.
SuperequalizerEffect
Configuration for the superequalizer audio effect.
SurroundEffect
Configuration for the surround audio effect.
TiltshelfEffect
Configuration for the tiltshelf audio effect.
Track
How Player.setAudioTrack should resolve mpv's aid property.
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 treble audio effect.
TremoloEffect
Configuration for the tremolo audio effect.
VibratoEffect
Configuration for the vibrato audio effect.
VirtualbassEffect
Configuration for the virtualbass audio effect.
WaveformData
Mono min, max and RMS amplitude envelope of the audio currently loaded.

Enums

AcompressorDetection
Values for the detection option of the acompressor audio filter.
Values for the link option of the acompressor audio filter.
AcompressorMode
Values for the mode option of the acompressor audio filter.
AcrusherMode
Values for the mode option of the acrusher audio filter.
AdeclickM
Values for the method option of the adeclick audio filter.
AdeclipM
Values for the method option of the adeclip audio filter.
AdenormType
Values for the type option of the adenorm audio filter.
AdynamicequalizerAuto
Values for the auto option of the adynamicequalizer audio filter.
AdynamicequalizerDftype
Values for the dftype option of the adynamicequalizer audio filter.
AdynamicequalizerMode
Values for the mode option of the adynamicequalizer audio filter.
AdynamicequalizerPrecision
Values for the precision option of the adynamicequalizer audio filter.
AdynamicequalizerTftype
Values for the tftype option of the adynamicequalizer audio filter.
AemphasisMode
Values for the mode option of the aemphasis audio filter.
AemphasisType
Values for the type option of the aemphasis audio filter.
AfadeCurve
Values for the curve option of the afade audio filter.
AfadeType
Values for the type option of the afade audio filter.
Values for the noise_link option of the afftdn audio filter.
AfftdnMode
Values for the output_mode option of the afftdn audio filter.
AfftdnSample
Values for the sample_noise option of the afftdn audio filter.
AfftdnType
Values for the noise_type option of the afftdn audio filter.
AfftfiltWinFunc
Values for the win_func option of the afftfilt audio filter.
AfwtdnWavet
Values for the wavet option of the afwtdn audio filter.
AgateDetection
Values for the detection option of the agate audio filter.
Values for the link option of the agate audio filter.
AgateMode
Values for the mode option of the agate audio filter.
AiirFormat
Values for the format option of the aiir audio filter.
AiirPrecision
Values for the precision option of the aiir audio filter.
AiirProcess
Values for the process option of the aiir audio filter.
AllpassPrecision
Values for the precision option of the allpass audio filter.
AllpassTransformType
Values for the transform option of the allpass audio filter.
AllpassWidthType
Values for the width_type option of the allpass audio filter.
AnequalizerBandType
lavfi anequalizer filter shape. Matches t=0|1|2 on the wire.
AnequalizerFscale
Values for the fscale option of the anequalizer audio filter.
AnlmdnMode
Values for the output option of the anlmdn audio filter.
AphaserType
Values for the type option of the aphaser audio filter.
ApulsatorMode
Values for the mode option of the apulsator audio filter.
ApulsatorTiming
Values for the timing option of the apulsator audio filter.
AsoftclipTypes
Values for the type option of the asoftclip audio filter.
AudioFilter
Identifies one of the typed audio filters: one value per XxxEffect class, 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-state mpv property.
BandpassPrecision
Values for the precision option of the bandpass audio filter.
BandpassTransformType
Values for the transform option of the bandpass audio filter.
BandpassWidthType
Values for the width_type option of the bandpass audio filter.
BandrejectPrecision
Values for the precision option of the bandreject audio filter.
BandrejectTransformType
Values for the transform option of the bandreject audio filter.
BandrejectWidthType
Values for the width_type option of the bandreject audio filter.
BassPrecision
Values for the precision option of the bass audio filter.
BassTransformType
Values for the transform option of the bass audio filter.
BassWidthType
Values for the width_type option of the bass audio filter.
BiquadPrecision
Values for the precision option of the biquad audio filter.
BiquadTransformType
Values for the transform option of the biquad audio 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 s option of the deesser audio filter.
Ebur128Gaugetype
Values for the gauge option of the ebur128 audio filter.
Ebur128Level
Values for the framelog option of the ebur128 audio filter.
Ebur128Mode
Values for the peak option of the ebur128 audio filter.
Ebur128Scaletype
Values for the scale option of the ebur128 audio filter.
EqualizerPrecision
Values for the precision option of the equalizer audio filter.
EqualizerTransformType
Values for the transform option of the equalizer audio filter.
EqualizerWidthType
Values for the width_type option of the equalizer audio filter.
FirequalizerScale
Values for the dumpscale option of the firequalizer audio filter.
FirequalizerWfunc
Values for the wfunc option of the firequalizer audio filter.
FlangerItype
Values for the interp option of the flanger audio filter.
FlangerType
Values for the shape option of the flanger audio filter.
Format
Audio sample format passed to mpv's audio-format property.
Gapless
Gapless playback mode, mirroring --gapless-audio=<no|yes|weak>.
HaasSource
Values for the middle_source option of the haas audio filter.
HdcdAnalyzeMode
Values for the analyze_mode option of the hdcd audio filter.
HdcdBitsPerSample
Values for the bits_per_sample option of the hdcd audio filter.
HighpassPrecision
Values for the precision option of the highpass audio filter.
HighpassTransformType
Values for the transform option of the highpass audio filter.
HighpassWidthType
Values for the width_type option of the highpass audio filter.
HighshelfPrecision
Values for the precision option of the highshelf audio filter.
HighshelfTransformType
Values for the transform option of the highshelf audio filter.
HighshelfWidthType
Values for the width_type option of the highshelf audio 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-level levels verbatim.
Loop
Looping behaviour for playback.
LoudnessScanState
Lifecycle of the offline loudness scan observed on PlayerStream.loudnessScan.
LoudnormPrintFormat
Values for the print_format option of the loudnorm audio filter.
LowpassPrecision
Values for the precision option of the lowpass audio filter.
LowpassTransformType
Values for the transform option of the lowpass audio filter.
LowpassWidthType
Values for the width_type option of the lowpass audio filter.
LowshelfPrecision
Values for the precision option of the lowshelf audio filter.
LowshelfTransformType
Values for the transform option of the lowshelf audio filter.
LowshelfWidthType
Values for the width_type option of the lowshelf audio 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_reason from the C API.
MpvPlaybackState
Aggregate playback lifecycle, derived from playing, buffering, completed, pausedForCache and whether a file is loaded. Subscribe via PlayerStream.playbackState when a single mutually-exclusive state fits the UI better than three separate booleans. The underlying booleans remain available on PlayerStream for 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 channels option of the rubberband audio filter.
RubberbandDetector
Values for the detector option of the rubberband audio filter.
RubberbandFormant
Values for the formant option of the rubberband audio filter.
RubberbandPhase
Values for the phase option of the rubberband audio filter.
RubberbandPitch
Values for the pitchq option of the rubberband audio filter.
RubberbandSmoothing
Values for the smoothing option of the rubberband audio filter.
RubberbandTransients
Values for the transients option of the rubberband audio filter.
RubberbandWindow
Values for the window option of the rubberband audio filter.
SilenceremoveDetection
Values for the detection option of the silenceremove audio filter.
SilenceremoveMode
Values for the start_mode option of the silenceremove audio filter.
SilenceremoveTimestamp
Values for the timestamp option of the silenceremove audio filter.
Spdif
S/PDIF (or HDMI) compressed-audio passthrough codec.
StereotoolsBmode
Values for the bmode_in option of the stereotools audio filter.
StereotoolsMode
Values for the mode option of the stereotools audio filter.
SurroundLfeMode
Values for the lfe_mode option of the surround audio filter.
SurroundWinFunc
Values for the win_func option of the surround audio filter.
TapSide
Side of an audio filter at which a per-filter tap captures samples.
TiltshelfPrecision
Values for the precision option of the tiltshelf audio filter.
TiltshelfTransformType
Values for the transform option of the tiltshelf audio filter.
TiltshelfWidthType
Values for the width_type option of the tiltshelf audio filter.
TreblePrecision
Values for the precision option of the treble audio filter.
TrebleTransformType
Values for the transform option of the treble audio filter.
TrebleWidthType
Values for the width_type option of the treble audio 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 aecho packs as delays/decays.
AfftdnBandNoiseX on AfftdnEffect
Typed access over the band_noise (alias bn) string lavfi's afftdn packs 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 params CSV held by AnequalizerEffect.
ChorusVoicesX on ChorusEffect
Typed access over the four parallel pipe-separated CSVs (delays/decays/depths/speeds) lavfi's chorus exposes.
CompandEnvelopesX on CompandEffect
Typed access over the parallel pipe-separated CSVs lavfi's compand packs as attacks/decays.
CompandPointsX on CompandEffect
Typed access over the points string lavfi's compand carries (space-separated inDb/outDb pairs).
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_entry string lavfi's firequalizer carries (entry(freq,gain);entry(freq,gain);…).
McompandBandsX on McompandEffect
Typed access over the raw args string 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, …, 18b parameters that lavfi's superequalizer packs into the bundle's raw params: Map<String, double>.

Constants

kAfftdnBandCount → const int
Number of fixed bands lavfi's afftdn uses 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 superequalizer filter 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 inside af_superequalizer.c and 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 Android content:// URI the app cannot read. Failures inside libmpv (a 404, an unsupported format) arrive on stream.error instead, since playback is asynchronous.