ffmpeg_ply is a simple implementation of a video player (similar to ffplay) written in C. It leverages FFmpeg for media decoding and SDL2 for rendering video and audio.
Important
This project is still under construction 🏗️.
- How to Write a Video Player in Less Than 1000 Lines: The primary guide for this implementation.
- leandromoreira/ffmpeg-libav-tutorial: FFmpeg libav tutorial for learning media fundamentals.
- leandromoreira/digital_video_introduction: Introduction to video technology and codecs.
- rambod-rahmani/ffmpeg-video-player: Reference implementation.
- ffplay.c: The official FFmpeg player source.
Ensure you have the following installed:
gccFFmpeglibraries (libavformat,libavcodec,libavutil,libswscale,libswresample)SDL2pkg-config
Use the provided Makefile to build the project:
make buildTo clean the build artifacts:
make cleanRun the player by passing a video file as an argument:
./player <input_file>The playground/ directory contains various experimental programs used to test specific features of SDL2 and FFmpeg in isolation, such as:
- Audio playback and mixing.
- Simple SDL2 rendering.
- Synchronized audio/video playback experiments.
Each subdirectory in playground/ typically contains its own standalone implementation for learning purposes.