(Click thumbnail to watch)
Video player built using FFmpeg for processing and SDL for rendering. It supports basic playback controls and synchronization. I wrote in C, which i learnt for the first time when I took on this project. My C game is still a bit wack but eyy, it works ;).
- Table of Contents
- Features
- Supported Platforms
- Architecture Overview
- Building and Running
- Known Limitations
- Play/Pause: Toggle playback with spacebar or on-screen button
- Seeking:
- Short jumps: ±10 seconds (left/right arrows)
- Long jumps: ±60 seconds (up/down arrows)
- Audio-Video Sync: Automatic synchronization with audio as master clock
- Basic UI: On-screen controls for play/pause and seeking
- macOS (primary development platform)
- Note: I don't know if it will work on other platforms
The player is organized into several key modules:
-
Player (
player.c/h)- Main event loop and state management
- Handles user input and playback controls
- Coordinates audio/video threads
-
Audio (
audio.c/h)- Audio stream decoding and resampling
- SDL audio callback implementation
- Audio clock management for synchronization
-
Video (
video.c/h)- Video stream decoding and frame processing
- YUV conversion and texture management
- Frame timing and display scheduling
-
Synchronization (
sync.c/h)- Implements audio-video synchronization logic
- Supports multiple sync strategies (audio master, video master, external)
-
Packet Queue (
packet_queue.c/h)- Thread-safe FIFO queue for AVPackets
- Used for both audio and video streams
- FFmpeg libraries (avcodec, avformat, avutil, swscale, swresample)
- SDL2 (with SDL_ttf for UI elements)
- C compiler (tested with clang)
-
Install dependencies:
brew install ffmpeg sdl2 sdl2_ttf
-
Clone the repository:
git clone https://github.com/deshydan/not-vlc.git
cd not-vlc- Build the project:
mkdir build && cd build
cmake ..
make- Run the player:
./Not_VLC - Why is there no option to select video files? I don't know, I just didn't implement it.
- Limited video format support
- Basic UI with minimal controls. Improvement needed include -> video progress bar(very cool), volume and speed control
- Seeking can be choppy with some codecs
- No volume control or fullscreen toggle yet
- Not cross-platform compatible
Please open issues or pull requests to contribute.