JeninSutradhar
ffmpeg-VideoPlayer-Rust_Slint
Rust

This is a lightweight audio-video player built in Rust using FFmpeg libraries. It demonstrates the usage of FFmpeg with Rust to play back video files.

Last updated Jun 25, 2026
65
Stars
7
Forks
1
Issues
0
Stars/day
Attention Score
25
Language breakdown
Rust 84.5%
Slint 15.5%
โ–ธ Files click to expand
README

FFmpeg Rust Video Player

A professional audio-video player built in Rust using FFmpeg and Slint UI. Features a modern interface with full playback controls, audio support, and cross-platform compatibility.

Screenshot from 2025-10-04 16-33-56

Features

Video Playback

  • Multiple Input Sources: Play videos from URLs or local files
  • Format Support: MP4, MKV, AVI, MOV, WebM, FLV, WMV, M4V
  • High-Quality Rendering: Hardware-accelerated video decoding with FFmpeg
  • Aspect Ratio Preservation: Videos display with correct proportions

Audio Playback

  • Full Audio Support: Synchronized audio-video playback
  • Volume Control: Real-time volume adjustment with slider
  • Multi-format Audio: Supports various audio codecs
  • Audio-Video Sync: Proper synchronization between audio and video

UI

  • Responsive Layout: Adapts to different window sizes
  • Loading Animations: Visual feedback during video loading
  • File Browser: Native file selection dialog
  • URL Input: Direct video URL support

Quick Start

Prerequisites

Rust: Install from rustup.rs

FFmpeg Development Libraries:

# Linux (Debian/Ubuntu) sudo apt update sudo apt install clang libavcodec-dev libavformat-dev libavutil-dev libavfilter-dev libavdevice-dev libasound2-dev pkg-config

macOS (Homebrew)

brew install pkg-config ffmpeg

Windows (vcpkg)

vcpkg install ffmpeg --triplet x64-windows

Installation & Usage

  • Clone and Build:
git clone https://github.com/JeninSutradhar/ffmpeg-VideoPlayer-Rust_Slint
cd ffmpeg-VideoPlayer-Rust_Slint
cargo build --release
  • Run the Player:
cargo run --release

or

./target/release/ffmpeg
  • Load Content:
- From URL: Paste video URL and click "Load URL" - From File: Click "Browse" to select local video file

How to Use

Loading Videos

  • URL Playback:
- Paste any video URL in the input field - Click "Load URL" to start playback - Supports YouTube, direct video links, etc.
  • Local Files:
- Click "๐Ÿ“ Browse" button - Select video file from file dialog - Video starts playing automatically

Playback Controls

  • โ–ถ Play/โธ Pause: Toggle playback
  • โน Stop: Stop video and reset
  • Seek Bar: Drag to jump to any position
  • ๐Ÿ”Š Volume: Adjust audio level (0-100%)
  • Time Display: Shows current/total time

๐Ÿ› ๏ธ Technical Details

Architecture

  • FFmpeg: Video/audio decoding and processing
  • Slint UI: Modern, cross-platform user interface
  • CPAL: Cross-platform audio output
  • Ring Buffer: Smooth audio streaming
  • Threading: Separate threads for UI, video, and audio processing

Performance

  • Hardware Acceleration: Uses FFmpeg's optimized decoders
  • Memory Efficient: Streaming playback with minimal memory usage
  • Real-time Processing: Low-latency audio-video synchronization
  • Cross-platform: Native performance on all supported platforms

๐ŸŒ Supported Platforms

  • โœ… Linux (Tested)
  • โœ… Windows
  • โœ… macOS
  • ๐Ÿ”„ Android (Planned)
  • ๐Ÿ”„ WebAssembly (Planned)

๐Ÿ“‹ Supported Formats

Video Formats

  • MP4, MKV, AVI, MOV, WebM, FLV, WMV, M4V
  • H.264, H.265, VP8, VP9, AV1
  • Any format supported by FFmpeg

Audio Formats

  • AAC, MP3, FLAC, OGG, WAV
  • Any audio codec supported by FFmpeg

๐Ÿ”ง Development

Building from Source

# Debug build
cargo build

Release build (recommended)

cargo build --release

Run tests

cargo test

Dependencies

  • ffmpeg-next: FFmpeg bindings for Rust
  • slint: Modern UI framework
  • cpal: Cross-platform audio library
  • ringbuf: Lock-free ring buffer for audio
  • rfd: Native file dialogs

๐Ÿ› Known Issues

  • Seeking functionality is implemented but may need refinement
  • Some exotic video formats may not work perfectly
  • WebAssembly support is planned but not yet implemented

๐Ÿค Contributing

Contributions are welcome! Please feel free to:

  • Report bugs and issues
  • Suggest new features
  • Submit pull requests
  • Improve documentation

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments


Made with โค๏ธ in Rust

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท JeninSutradhar/ffmpeg-VideoPlayer-Rust_Slint ยท Updated daily from GitHub