Skip to content

ZachBacon/wxmpc-libmpv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Media Player Classic

A classic-style media player built with wxWidgets and libmpv, inspired by the classic Windows Media Player interface.

Media Player Classic Interface

Features

  • Classic Interface: Familiar Windows Media Player-style UI with dark theme
  • Video and Audio Playback: Supports most common video and audio formats through libmpv
  • Playlist Management: Add files, directories, and manage playback queue
  • Media Controls: Play, pause, stop, seek, volume control with classic button layout
  • Keyboard Shortcuts: Space (play/pause), F11 (fullscreen), arrow keys (seek)
  • Fullscreen Mode: Double-click video area or F11 to toggle fullscreen
  • Cross-platform: Runs on Linux, Windows, and macOS

Supported Formats

Thanks to libmpv, the player supports a wide range of formats including:

Video Formats:

  • MP4, AVI, MKV, MOV, WMV, FLV, WebM
  • And many more through FFmpeg

Audio Formats:

  • MP3, WAV, FLAC, AAC, OGG, WMA
  • And many more through FFmpeg

Dependencies

Required Packages

Ubuntu/Debian:

sudo apt update
sudo apt install build-essential meson ninja-build
sudo apt install libwxgtk3.2-dev libmpv-dev pkg-config

Fedora/RHEL:

sudo dnf install gcc-c++ meson ninja-build
sudo dnf install wxGTK-devel mpv-libs-devel pkgconfig

Arch Linux:

sudo pacman -S base-devel meson ninja
sudo pacman -S wxwidgets-gtk3 mpv pkg-config

macOS (with Homebrew):

brew install meson ninja wxwidgets mpv pkg-config

Windows (with vcpkg):

vcpkg install wxwidgets mpv

Building

  1. Clone or extract the project:

    cd /path/to/media-player-classic
  2. Setup build directory:

    meson setup builddir
  3. Compile the project:

    meson compile -C builddir
  4. Run the media player:

    ./builddir/media-player-classic
  5. Install (optional):

    meson install -C builddir

Project Structure

media-player-classic/
├── meson.build                    # Build configuration
├── media-player-classic.desktop   # Desktop entry file
├── README.md                      # This file
└── src/                          # Source files
    ├── main.cpp                  # Application entry point
    ├── MainFrame.{h,cpp}         # Main window and application logic
    ├── MpvPanel.{h,cpp}          # libmpv integration and video rendering
    ├── ControlPanel.{h,cpp}      # Media controls panel
    ├── SeekBar.{h,cpp}           # Custom seek bar widget
    ├── VolumeControl.{h,cpp}     # Volume control widget
    ├── PlaylistPanel.{h,cpp}     # Playlist management panel
    └── MenuHandler.{h,cpp}       # Menu bar management

Usage

Opening Media

  • File → Open File or Ctrl+O: Open single media file
  • File → Open Multiple Files or Ctrl+Shift+O: Open multiple files
  • File → Open Directory or Ctrl+D: Open directory (planned)
  • Drag & Drop: Drop files onto the window (planned)

Playback Control

  • Space: Play/Pause toggle
  • Media Controls: Use the classic-style buttons in the control panel
  • Seek Bar: Click anywhere to jump to that position
  • Volume: Use slider or scroll wheel over volume area

Playlist Management

  • Files are automatically added to the playlist
  • Use playlist panel buttons to add more files or manage the queue
  • Double-click items in the playlist to play them
  • View → Playlist or Ctrl+L: Toggle playlist visibility

Keyboard Shortcuts

  • Space: Play/Pause
  • F11: Toggle fullscreen
  • Escape: Exit fullscreen
  • Left/Right Arrow: Seek backward/forward 10 seconds
  • Ctrl+O: Open file
  • Ctrl+Shift+O: Open multiple files
  • Ctrl+L: Toggle playlist

Fullscreen Mode

  • Press F11 or double-click the video area
  • All UI elements are hidden in fullscreen mode
  • Press Escape or F11 to exit fullscreen

Interface Elements

Main Components

  • Video Area: OpenGL-accelerated video rendering via libmpv
  • Control Panel: Classic-style media controls with seek bar and time display
  • Playlist Panel: File management with add, remove, and clear functions
  • Menu Bar: Traditional menu with File, Playback, View, and Help menus
  • Status Bar: Shows current file and playback status

Control Panel Layout

[Time] =============[Seek Bar]============= [Duration]
  [⏮] [▶] [⏹] [⏭]                    🔊 [Volume]

Development

This media player demonstrates modern C++ application development with:

  • wxWidgets cross-platform GUI framework
  • OpenGL integration for video rendering
  • Event-driven architecture with proper MVC separation
  • Modern build system with Meson
  • Cross-platform media playback with libmpv

Building from Source

The application uses Meson build system for easy cross-platform compilation:

# Configure with custom options
meson setup builddir --buildtype=release

# Build with verbose output
meson compile -C builddir -v

# Run tests (if any)
meson test -C builddir

# Clean build
rm -rf builddir

Troubleshooting

Build Issues

  • Ensure all dependencies are installed
  • Check wxWidgets and libmpv versions are compatible
  • Try cleaning the build directory: rm -rf builddir

Runtime Issues

  • Verify libmpv is properly installed
  • Check if the media files are in supported formats
  • Ensure OpenGL drivers are properly installed

Performance

  • Hardware video decoding is enabled by default
  • For better performance, ensure GPU drivers are up to date
  • Large playlists may take time to load

Contributing

This project welcomes contributions! Areas for improvement:

  • Directory scanning and recursive file loading
  • Drag & drop support
  • Subtitle support
  • Audio/video filters and effects
  • Skin/theme support
  • Stream URL support
  • Media library management

License

This project is provided as-is for educational and development purposes.

Acknowledgments

  • Built with wxWidgets - Cross-platform GUI toolkit
  • Uses libmpv - Powerful media playback engine
  • Inspired by classic Windows Media Player interface design

About

just a simple media player using libmpv and wxwidgets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published