Skip to content

🎬 A modern, lightweight media player written in pure C with FFmpeg & SDL2. Supports MP4, MKV, AVI, WebM and more.

License

Notifications You must be signed in to change notification settings

bernardopg/mymediaplayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

🎬 MyMediaPlayer

MyMediaPlayer Logo

Um media player moderno, leve e elegante escrito em C puro

A modern, lightweight and elegant media player written in pure C

License: MIT Build C FFmpeg SDL2 PRs Welcome


🇧🇷 Português🇺🇸 English📖 Docs🚀 Quick Start


🇧🇷 Português

✨ Sobre o Projeto

O MyMediaPlayer é um reprodutor de vídeo desenvolvido em C puro, projetado para ser rápido, leve e fácil de usar. Utiliza FFmpeg para decodificação de vídeo e SDL2 para renderização com aceleração de hardware.

🎯 Funcionalidades

Recurso Descrição
🎥 Formatos Universais MP4, AVI, MKV, WebM, MOV, FLV e muito mais
🎨 Interface Moderna UI limpa com gradientes suaves e animações
⏯️ Controles Completos Play/pause, seek, pular ±10s, controle de volume
🫥 Auto-Hide Interface some automaticamente após 3 segundos
📺 Tela Cheia Alterne entre janela e fullscreen facilmente
Aceleração GPU Renderização com hardware acceleration
⌨️ Atalhos de Teclado Controles intuitivos para power users

📦 Instalação

🐧 Arch Linux
sudo pacman -S ffmpeg sdl2 sdl2_ttf
🐧 Debian/Ubuntu
sudo apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libsdl2-dev libsdl2-ttf-dev
🐧 Fedora
sudo dnf install ffmpeg-devel SDL2-devel SDL2_ttf-devel

🔨 Compilação

# Clone o repositório
git clone https://github.com/bernardopg/mymediaplayer.git
cd mymediaplayer

# Compile
make

# Ou com otimizações
make release

🚀 Uso

./build/mediaplayer seu_video.mp4

⌨️ Controles

Tecla Ação
ESPAÇO Play/Pause
/ Pular ±10 segundos
/ Volume ±10%
F Tela cheia
H Mostrar/ocultar UI
ESC / Q Sair

🇺🇸 English

✨ About

MyMediaPlayer is a video player built in pure C, designed to be fast, lightweight and user-friendly. It uses FFmpeg for video decoding and SDL2 for hardware-accelerated rendering.

🎯 Features

Feature Description
🎥 Universal Formats MP4, AVI, MKV, WebM, MOV, FLV and more
🎨 Modern UI Clean interface with smooth gradients and animations
⏯️ Complete Controls Play/pause, seek, skip ±10s, volume control
🫥 Auto-Hide UI automatically hides after 3 seconds
📺 Fullscreen Toggle between windowed and fullscreen modes
GPU Acceleration Hardware-accelerated rendering
⌨️ Keyboard Shortcuts Intuitive controls for power users

📦 Installation

🐧 Arch Linux
sudo pacman -S ffmpeg sdl2 sdl2_ttf
🐧 Debian/Ubuntu
sudo apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libsdl2-dev libsdl2-ttf-dev
🐧 Fedora
sudo dnf install ffmpeg-devel SDL2-devel SDL2_ttf-devel

🔨 Building

# Clone the repository
git clone https://github.com/bernardopg/mymediaplayer.git
cd mymediaplayer

# Build
make

# Or with optimizations
make release

🚀 Usage

./build/mediaplayer your_video.mp4

⌨️ Controls

Key Action
SPACE Play/Pause
/ Skip ±10 seconds
/ Volume ±10%
F Fullscreen
H Show/hide UI
ESC / Q Quit

📖 Documentation

🗂️ Project Structure

mymediaplayer/
├── 📁 src/               # Source files
│   ├── main.c            # Entry point
│   ├── video_decoder.c   # FFmpeg decoding
│   ├── video_player.c    # SDL2 rendering
│   └── ui.c              # User interface
├── 📁 include/           # Header files
├── 📁 build/             # Build output
├── 📁 .github/           # CI/CD & templates
├── 📄 Makefile           # Build configuration
└── 📄 README.md          # This file

🎬 Supported Formats

Format Container Codecs
MP4 MPEG-4 H.264, H.265/HEVC
MKV Matroska H.264, VP9, AV1
AVI AVI Various
WebM WebM VP8, VP9
MOV QuickTime H.264, ProRes
FLV Flash H.264, VP6

🛠️ Development

make              # Build (default)
make debug        # Debug build
make release      # Optimized build
make clean        # Clean artifacts
make test         # Run tests

🗺️ Roadmap

  • 🎥 Video playback with FFmpeg
  • 🎨 Modern UI with auto-hide
  • ⏯️ Complete playback controls
  • 📺 Fullscreen support
  • 🔊 Audio playback
  • 📝 Subtitle support (SRT, ASS)
  • 📋 Playlist support
  • 🎛️ Audio equalizer
  • 🌐 Stream playback (HTTP/RTSP)

🤝 Contributing

Contribuições são muito bem-vindas! / Contributions are very welcome!

Veja CONTRIBUTING.md para detalhes. / See CONTRIBUTING.md for details.


📄 License

Este projeto está sob a licença MIT. Veja LICENSE para mais detalhes.

This project is licensed under the MIT License. See LICENSE for details.


👤 Author

Bernardo Gomes@bernardopg

⭐ Se este projeto te ajudou, considere dar uma estrela! ⭐

If this project helped you, consider giving it a star!

About

🎬 A modern, lightweight media player written in pure C with FFmpeg & SDL2. Supports MP4, MKV, AVI, WebM and more.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published