-
-
Notifications
You must be signed in to change notification settings - Fork 60
Engine VlcPlayer
Sucrose.Live.VlcPlayer is Sucrose's libVLC-based media engine. It hosts libVLC through LibVLCSharp (the WPF VideoView control) and renders Gif and Video wallpapers. Like MpvPlayer, it bundles its own native media library — libVLC — per architecture, so it plays a wide range of formats without any system codecs. It is a second self-contained alternative to MpvPlayer for video and an additional option for GIF. VlcPlayer is not the default for any type (Gif and Video still default to MpvPlayer); you opt into it from Settings → Wallpaper. This page covers the technology, supported types, the bundled binary, playback control, customization, GIF handling, and its limitations.
- At a glance
- Technology
- Supported wallpaper types
- Bundled native binary (no runtime check)
- Playback control
- Hardware acceleration and Stay Awake
- Customization panel
- GIF handling
- Strengths and limitations
- See also
| Property | Value |
|---|---|
| Assembly | Sucrose.Live.VlcPlayer.exe |
| Tech | libVLC (native) via LibVLCSharp.WPF (VideoView) |
| Supported types | Gif, Video |
| Default for | (none — MpvPlayer is the default Gif/Video engine) |
| Preprocessor symbols |
ENGINE, LIVE_VLCPLAYER
|
| Enum member |
EngineType.VlcPlayerLive (index 7) |
| Runtime requirement | None — native libVLC bundled per architecture; no OS-version check, no download prompt |
| Native dependency | Bundled libVLC (VideoLAN.LibVLC.Windows), one architecture per build |
| Interactivity | No (pure media playback; mouse/keyboard input disabled) |
| Audio/system-data injection | No |
| Properties panel | PropertiesType.VlcPlayer |
VlcPlayer embeds libVLC through LibVLCSharp's WPF VideoView, which hosts a MediaPlayer backed by a single LibVLC instance. Frames are rendered natively by libVLC rather than through WPF's media stack or a browser, so it has the broad codec coverage of the VLC engine without relying on any system codecs.
The LibVLC instance is created with a fixed set of options — no-lua, no-osd, no-spu, no-stats, no-drop-late-frames, no-snapshot-preview, no-sub-autodetect-file, no-metadata-network-access — plus a screensaver flag driven by the Stay Awake setting (disable-screensaver / no-disable-screensaver). The player runs Fullscreen with mouse and keyboard input disabled.
The native libVLC binaries come from the VideoLAN.LibVLC.Windows NuGet package; at startup the engine calls Core.Initialize() and looks for the libVLC libraries under %AppData%\Sucrose\Cache\VlcPlayer\.
VlcPlayer renders Gif (SSDEWT.Gif) and Video (SSDEWT.Video) only. App.Configure()'s switch has exactly those two cases (showing the View.Gif or View.Video window); Url, Web, YouTube, and Application fall through to the default → Close() branch and nothing displays. See Type Gif and Type Video.
The source is resolved from Info.Source like the other engines: a local file inside the wallpaper folder, or an http/https URL.
Unlike MpvPlayer (which performs a Windows 10 1607 / IsRedstone1 OS check) and the browser engines (which prompt to download the WebView2 or VC++ runtime), VlcPlayer performs no engine-specific OS or runtime check and shows no auto-download prompt. It bundles libVLC, so no user install is required.
The VideoLAN.LibVLC.Windows package ships native libVLC for x86, x64, and ARM64. By default it copies every architecture to the output, so the build keeps only the architecture it targets — mirroring how MpvPlayer ships a single libmpv-{arch}.dll — via the VlcWindowsX86Enabled / VlcWindowsX64Enabled / VlcWindowsArm64Enabled switches in the engine .csproj. The bundled libVLC binaries are the bulk of the engine's on-disk footprint.
A 1-second GeneralTimer tick drives playback maintenance (Helper/Gif.cs, Helper/Video.cs):
-
Loop —
SetLoop(GetLoop()); on theEndReachedevent the media is replayed when WallpaperLoop is on. -
Volume (Video only) —
SetVolume(GetVolume())each tick, on libVLC's 0–100 scale. GIF media is silent, so the GIF view has no volume control. -
Stretch —
SetStretchmaps the WPFStretchmode (None/Fill/Uniform/UniformToFill) to libVLC scale / aspect-ratio / crop settings. -
Pause / Resume — honors Backgroundog's
PausePerformance: it pauses theMediaPlayerunder a performance rule and resumes when the rule clears. See Performance Rules.
Mouse and keyboard input are disabled (EnableMouseInput = false, EnableKeyInput = false), so VlcPlayer is a non-interactive renderer. On window close the MediaPlayer is disposed.
-
HardwareAcceleration (Settings → Wallpaper) sets
EnableHardwareDecodingon the libVLCMediaPlayer. With it off, the color/image filters in the customization panel are skipped — libVLC video-adjust post-processing requires hardware decoding in this engine, and applying it with decoding disabled would crash. -
Stay Awake is wired two ways: the
LibVLCinstance is created withdisable-screensaver/no-disable-screensaver, and the cross-engine "Stay Awake" loop (SetThreadExecutionStateevery 30 s) also runs. See Settings Wallpaper.
When you Customize a VlcPlayer Gif/Video wallpaper, the Property service renders the PropertiesType.VlcPlayer panel (the base64 VlcProperties JSON). The implemented controls are:
| Control | Effect | Notes |
|---|---|---|
| saturation | Color saturation | slider −100..100 (mapped to libVLC 0.0–3.0) |
| hue | Hue shift | slider −100..100 (mapped to −180..180) |
| brightness | Brightness | slider −100..100 (mapped to 0.0–2.0) |
| contrast | Contrast | slider −100..100 (mapped to 0.0–2.0) |
| gamma | Gamma correction | currently non-functional (a known libVLC video-adjust issue, flagged in the code) |
| speed | Playback rate | applied via MediaPlayer.SetRate
|
| mute | Mute audio | toggle |
The four color filters (saturation, hue, brightness, contrast) and gamma are applied through libVLC's video-adjust and only take effect when Hardware Acceleration is ON — with it off they are silently skipped to avoid a post-processing crash. Speed and mute work regardless.
This is a subset of the MpvPlayer panel, which additionally exposes video-zoom, sharpen, scale-blur, and a subtitle (sid) toggle. Changes are applied live by the engine's property watcher. See Customizing Wallpaper and Property Service.
libVLC's native image demuxer would open an animated GIF as a single still frame (freezing it on the first frame), so for GIF wallpapers VlcPlayer:
- forces the FFmpeg/avformat demuxer (
:demux=avformat) so every frame is decoded; and - forces software decoding (
:avcodec-hw=none), because GIF is a software-only codec and hardware decoding offers nothing and can produce corrupt frames.
As a result GIF playback is CPU-bound, and because VLC 3.x does not loop gaplessly, looping GIFs (and short clips) can show a brief stutter at the loop boundary. For the smoothest local-GIF playback prefer the default MpvPlayer, or the pure-WPF Vexana / Xavier engines. See Type Gif.
Strengths
- Self-contained like MpvPlayer — bundles libVLC, needs no system codecs and no runtime download.
- No OS-version requirement and no dependency prompt.
- A second robust video engine and an extra GIF option, with live color, speed, and mute controls.
Limitations
- Renders only Gif and Video — no interactivity, no audio-reactive / system-status injection.
- The color filters require Hardware Acceleration to be on, and the gamma control is currently non-functional.
- GIF is software-decoded and not gapless — it can stutter at loop points; MpvPlayer / Vexana / Xavier are smoother for GIF.
- The bundled libVLC adds to the engine's on-disk size (one architecture per build).
Getting Started
- Installation
- System Requirements
- Quick Start
- Portal Interface Tour
- Updating Sucrose
- Uninstalling Sucrose
Wallpaper Types
Using Sucrose
- Managing Library
- Using Store
- Customizing Wallpaper
- Multi-Monitor
- Wallpaper Cycling
- Choosing Engines
- Performance Rules
- Theme, Tray & Startup
- Discord Rich Presence
Settings Reference
- Settings Overview
- Settings: General
- Settings: Personal
- Settings: Performance
- Settings: Wallpaper
- Settings: System
- Settings: Other
- Settings: All Keys
Creating Wallpapers
- Create Overview
- Create: Step By Step
- Create: Package Format
- Create: Customization Controls
- Create: JS Bridge
- Create: Audio API
- Create: System API
- Create: Property Listener & Filters
- Create: Web Architecture
- Create: Compatibility
- Create: Example Wallpapers
- Create: Sharing & Publishing
Engine Reference
- Engines Overview
- Engine: MpvPlayer
- Engine: VlcPlayer
- Engine: WebView
- Engine: CefSharp
- Engine: Nebula
- Engine: Vexana
- Engine: Xavier
- Engine: Aurora
- Engine Comparison
Automation & Command Line
Architecture & Internals
- Architecture Overview
- Lifecycle
- Commandog Dispatcher
- Single-Instance Mutexes
- IPC
- Backgroundog Service
- Crash Reporting
- Update Internals
- Property Service
- Undo Internals
Data, Files & Diagnostics
Building & Contributing
- Building From Source
- Repository Layout
- Shared Item Projects
- Code Conventions
- Preprocessor Symbols
- Publish Pipeline
- Bundle Installer Internals
- Extending Sucrose
- Contributing
- Translating with Localizer
- Localization Coverage
- Security Policy
- Privacy & Telemetry
Help & Support