SrcBox (Windows / WPF)

July 28, 2026 · View on GitHub

License: MIT .NET Platform PRs Welcome

English | 中文

SrcBox is a high-performance, modern IPTV player designed for the Windows platform.

Built on the powerful libmpv playback core and combined with a modern WPF interface, it delivers a smooth and stable live viewing experience. It supports core features like M3U playlists, EPG (Electronic Program Guide), and Catchup (Replay), while offering deep optimizations for IPTV scenarios (such as FCC fast channel switching and UDP multicast optimization), making it the ideal choice for watching live TV on your PC.


Disclaimer:

  1. All videos, screenshots, and demonstrations shown on this page are for functional demonstration purposes only and are not actual playable or available media resources.
  2. This project does not provide any m3u playlist files or the channel data contained therein, nor is it responsible for third-party data sources.
  3. SrcBox is merely an open-source player tool; users must find legal playback sources themselves. Please comply with local laws and regulations.

Table of Contents


Overview

SrcBox uses libmpv-2.dll as its playback core, hosting the video window via WindowsFormsHost. It provides IPTV channel list, EPG, catchup, timeshift, recording, and upload queue capabilities.


Technical Architecture

This project is developed using C# / WPF. The core architecture is as follows:

  • UI Layer: Built with WPF (ModernWpf), providing a smooth and modern user experience.
  • Architecture Layer: Architecture/ is split into Application / Platform / Presentation, with modular playback and settings flows.
  • Interop Layer: Encapsulates libmpv calls via MpvPlayer.cs and MpvPlayerEngineAdapter.
  • Rendering Layer: Uses WindowsFormsHost to host a Win32 window handle, embedding mpv's rendering output into the WPF interface to bypass WPF's native media element limitations.
  • Service Layer:
    • M3UParser: High-performance regex-based parser supporting complex M3U extended tags.
    • EpgService: Asynchronous EPG loading and in-memory caching based on XmlSerializer.

Project Structure

📂 SrcBox
├── 📂 Architecture    # Layered modules (Application/Platform/Presentation)
├── 📂 Services        # Core services (M3U/EPG/Recording/WebDAV/Notifications)
├── 📂 Controls        # Drawers and dialogs (EPG/Recording/Timeshift/Upload Queue)
├── 📂 Resources       # Localization and theme resources
├── 📂 Tests           # MSTest automation project
├── 📄 MainWindow.*.cs # Split main window logic
└── 📄 MpvPlayer.cs    # libmpv wrapper

Features & Changelog

Version note: verifiable Git tags in this repository are 1.0.1 to 1.1.2; the current branch describes as 1.1.6, and the project version is 1.1.6 (see LibmpvIptvClient.csproj / setup.iss).

Core Playback

FeatureDescriptionParams/ExampleChangelog
Playback ControlPlay/Pause, Stop, Seek, Fast Forward/RewindHotkeys: Space/S/Arrow keysSince 1.0.1
Volume ControlSlider adjustment, mute supportRange 0-100, hotkey MSince 1.0.7
Audio SettingsVolume gain, max volume limit, audio delay-200dB~+60dB, hotkey Ctrl+PgUp/PgDnSince 1.1.6
Status IndicatorsLive/Replay/Timeshift status in overlayAuto-detectionSince 1.0.5
Scheduled Reminder & Auto PlayProgram reminder and scheduled autoplay policySupports “remind-only / auto-play” modesSince 1.1.2
Minimal ModeCompact player window mode with dedicated interactionsSynchronized in window/fullscreen, hotkey WPost-1.1.2 (untagged)

IPTV Specifics

FeatureDescriptionParams/ExampleChangelog
M3U ParsingLocal/Remote M3U, UTF-8/GB18030 compatibleSupports #EXTINF attributesSince 1.0.1
EPGXMLTV (gz) support, day switchingAuto-match tvg-id, hotkey ESince 1.0.1
Catchup (Replay)Template-based catchup URL generation{utc:yyyyMMddHHmmss} etc.Since 1.0.1
TimeshiftSeek back in live stream history, hotkey TDepends on catchup-sourceSince 1.0.2
Channel MgmtGrouping, Search, Favorites, HistoryPersisted locally, hotkeys L/FGroup/Search/Favorites: since 1.0.1; History: since 1.0.4
FCC/UDPFast Channel Change & Multicast optimizationToggle in SettingsSince 1.0.1
DeinterlaceOptimized for 1080i/720i interlaced videoAuto-detection, multiple algorithmsSince 1.1.6
Web RemoteControl player through browserPlayback, volume, channel switchingSince 1.1.6
Recording & UploadLocal recording, WebDAV upload, upload queueLocal/remote modes, hotkey RPost-1.1.2 (untagged)

Fullscreen & Overlay

  • Double-click/Enter Fullscreen: Toggle fullscreen by double-clicking or pressing Enter.
  • Overlay Bar: Auto-shows at bottom on mouse move; supports controls & EPG toggle.
  • Side Drawer: Auto-shows channel list (right) or EPG (left) on mouse hover near edges.
  • Escape Key: Exit fullscreen mode.

v1.1.6 New Features

  • Web Remote Control: Control the player through a browser, with playback control, volume, channel switching and status view
  • Audio Settings: Volume gain (-200dB~+60dB), max volume limit (100%~1000%), audio delay (-100s~+100s)
  • Deinterlace: Optimized for 1080i/720i interlaced video streams with auto-detection and multiple algorithms (yadif/bwdif)
  • Keyboard Shortcuts: Full keyboard shortcut support including playback control, channel switching, volume, fullscreen toggle, etc.
  • Resizable Settings Window: Settings window can now be freely resized

v1.1.2+ Interaction Highlights (Synced from VitePress)

  • EPG status chips: Live red chip and Replay green chip; clicking Live chip switches back to live immediately.
  • Now-playing indicators: Current row highlight and a green left stripe during replay playback.
  • Scheduling improvements: single-instance reminder list, checkbox batch delete, Select All/Invert, and unified tray/right-click/dropdown entries.
  • Scheduled autoplay policy: supports both “remind-only” and “auto-play-at-time” modes.
  • Minimal mode sync: compact window top interactions, resize behavior, and status badges stay synchronized with window/fullscreen states.
  • Tray & exit flow: persistent tray with Open/Reminders/Manage M3U/Settings/Exit and explicit “No => minimize to tray” behavior.

Roadmap

We are dedicated to continuously improving the IPTV viewing experience. Here are our future plans and completed features:

Future Plans

  • AI Recommendation: Personalized content suggestions based on viewing habits.
  • Multi-view: Picture-in-Picture (PiP) and Mosaic view support.
  • Cloud PVR: Remote recording to connected cloud storage.
  • Advanced A/V: HDR10+ dynamic metadata support, 8K 120fps decoding optimization.
  • Interactive Features: Voice barrage (Speech-to-Text), low-latency cloud gaming entry.
  • Copyright Protection: Blockchain-based copyright verification.
  • Test Coverage Expansion: Add more unit tests for playback state, recording index, and EPG synchronization.
  • Recording UX Improvements: Improve in-progress metadata sync and remote metadata consistency.
  • Playback Pipeline Optimization: Further reduce zap latency and improve weak-network resilience.
  • Source Governance: Improve source health checks, fallback policies, and observability logs.

Completed Features

  • Timeshift: Replay-based timeshifting via catchup-source with real-time seeking.
  • EPG: XMLTV (gz) parsing and display.
  • Catchup: Template-based automatic replay URL generation.
  • M3U Parsing: Local/Remote playlist support with #EXTINF attributes.
  • Channel Mgmt: Grouping, search, and favorites.
  • Live Optimization: FCC fast switching, UDP multicast optimization, auto-source switching.
  • Hardware Decoding: Enabled d3d11va by default.
  • Recording: Local recording, recording index, upload queue, and WebDAV integration.
  • Scheduling: Program reminders, reminder list, and scheduled autoplay policy.
  • Minimal Mode: Compact player mode, top-bar interactions, and state synchronization across window/fullscreen.
  • Web Remote Control: Browser-based player control with playback, volume, and channel switching.
  • Audio Settings: Volume gain, max volume limit, and audio delay adjustment.
  • Deinterlace: Smart processing for 1080i/720i interlaced video.
  • Keyboard Shortcuts: Full keyboard shortcut support for blind operation.
  • UI/UX: Fullscreen overlay, side drawer, multi-language support (ZH/EN/ZH-TW/RU), resizable settings window.

Internationalization

This project supports multi-language switching (currently Simplified Chinese, Traditional Chinese, English, Russian).

For detailed internationalization guides and how to contribute translations, please refer to the Internationalization Documentation.

Quick Contribution

  1. Locate Strings.en-US.xaml in the Resources/ directory.
  2. Copy and rename it to the target language code (e.g., Strings.fr-FR.xaml).
  3. Translate the content and submit a Pull Request.

Interface & Interaction

Main Interface

  • Top Bar: Menu buttons (Open File, Settings, etc.) and window controls.
  • Center: Video playback area.
  • Bottom/Overlay: Progress bar, volume, toggles (EPG/List).

Keyboard Shortcuts

ShortcutFunctionDescription
SpacePlay/PauseToggle playback state
SStopStop current playback
Previous ChannelSwitch to previous channel
Next ChannelSwitch to next channel
Previous Source / RewindLive mode: switch source; Timeshift/Replay mode: rewind
Next Source / Fast ForwardLive mode: switch source; Timeshift/Replay mode: fast forward
MMuteToggle mute state
EnterToggle FullscreenEnter/exit fullscreen mode
LChannel ListShow/hide channel list sidebar
EEPGShow/hide EPG program guide
EscapeExit FullscreenReturn to window mode from fullscreen
F1Debug WindowOpen debug information window

For detailed information, please refer to the Keyboard Shortcuts Documentation.

Official Documentation

Visit Official Documentation Website <<

LanguageDocumentation Link
简体中文srcbox.top
繁體中文srcbox.top/zh-TW
Englishsrcbox.top/en
Русскийsrcbox.top/ru

Configuration & Parameters

user_settings.json

Located in the application run directory, stores user preferences.

{
  "Hwdec": true,              // Hardware decoding
  "SourceTimeoutSec": 3,      // Source switch timeout (seconds)
  "TimeshiftHours": 2,        // Timeshift duration (hours)
  "Language": "en-US",        // Interface language
  "ThemeMode": "Dark"         // Theme mode (Dark/Light/System)
}

libmpv Engine

This project depends on libmpv-2.dll.

  • Hardware Decoding: d3d11va is enabled by default.
  • No Audio: Some IPTV sources have slow audio probing; probesize=32 is set to speed up start, which might cause brief silence.

Development Guide

Prerequisites

  • OS: Windows 10 / 11 (x64)
  • IDE: Visual Studio 2022 or JetBrains Rider
  • SDK: .NET 8.0 SDK
  • Dependency: libmpv-2.dll (included in repository root and copied to output on build)

Build & Run

# Restore dependencies
dotnet restore

# Build (Debug)
dotnet build

# Run
dotnet run

# Tests
dotnet test .\Tests\LibmpvIptvClient.Tests.csproj

Note: If libmpv-2.dll is missing at runtime, the app will fail to start; by default the repository copy is copied during build.

Troubleshooting

IssuePossible CauseSolution
Crash on startupMissing libmpv-2.dllDownload x64 dll and place in run dir
Video but no audioAudio probe timeoutNormal optimization; try switching tracks or restarting
EPG "No Data"Network or format issueCheck XMLTV URL accessibility and GZIP format
Settings not savingPermission deniedEnsure write permission to app directory

Testing & Contribution

Workflow

  1. Fork the repository.
  2. Create a feature branch: git checkout -b feature/AmazingFeature.
  3. Commit changes: git commit -m 'feat: Add some AmazingFeature' (Follow Conventional Commits).
  4. Push branch: git push origin feature/AmazingFeature.
  5. Submit a Pull Request.

Code Style

  • Follow existing C# style (K&R / Allman hybrid, see .editorconfig if available).
  • Ensure UI changes adapt to both Dark and Light themes.

Performance Benchmarks

  • CPU Usage: < 15% @ 1080p (i5-8250U baseline).
  • Memory: < 500MB during stable playback.
  • Startup: < 2 seconds (cold start).

Privacy & Security

  • Local First: All playlists, EPG caches, and user configurations (favorites, settings) are stored locally on your device (user_settings.json) and are never uploaded to any cloud server.
  • Network Activity: The application only initiates network connections when requesting your specified M3U/EPG URLs, checking for updates (GitHub API), or downloading CDN resources.

Screenshots

  • Main Interface
    main

  • Fullscreen Overlay
    fullscreen-overlay

  • Settings
    settings