Scythe
SCYTHE is a lightweight, C#-based game engine focused on modifiability and rapid iteration using Raylib.
Clean and user-friendly extension for raylib that adds seamless audio and video streaming support via the FFmpeg libav*…
git clone https://github.com/cloudofoz/raylib-media.gitcloudofoz/raylib-mediaNote: This library is in beta. Your feedback and support in enhancing its quality are greatly appreciated!
raylib-media is a clean and user-friendly extension for raylib that adds seamless audio and video streaming support via the FFmpeg libav* libraries. It enables easy integration of multimedia content into raylib applications, providing direct access to video textures and audio streams, with support for seeking and looping.
Texture and AudioStream for efficient media handlingLoadMedia function.These 3-4 lines of code show the minimal code needed to play a video with raylib-media:
#include <raymedia.h>
MediaStream media = LoadMedia("path/to/your_file.mp4"); // Load the media
while (...) { // Begin your main loop
...
UpdateMedia(&media); // Update the media stream according to frame time
...
DrawTexture(media.videoTexture, 0, 0, WHITE); // Draw the video frame
...
}
UnloadMedia(&media); // Unload media when done
Description: Demonstrates how to play a video on the screen and loop it continuously.
Description: A simple media player illustrating how to control playback speed, seek, pause, loop, adjust audio volume, and apply real-time shader effects to the video.
Description: A 3D demo scene demonstrating multiple video streams with synchronized audio that dynamically adjusts based on cursor proximity.
Description: Demonstrates how to use
LoadMediaFromStreamwith custom callbacks for reading media.
This example simulates a custom stream using a memory buffer, showcasing the flexibility of the API. Real-world use cases include:
- Reading from compressed archives
- Streaming over a network
- Accessing custom data formats or encrypted resources
raylib-media depends on the following files and libraries:
E.g. with GCC:
gcc ... rmedia.c -lraylib -lavcodec -lavformat -lavutil -lswresample -lswscale
src/raymedia.h and src/rmedia.c
rmedia.c and use the compiled library.The following subset of libav* libraries from FFmpeg:
libavcodeclibavformatlibavutillibswresamplelibswscaleYou may want to start by using precompiled libraries and later compile your own version, if needed:
Linux: Install via your package manager (e.g., sudo apt install libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev).
macOS:
Use Homebrew (brew install ffmpeg).
Windows:
Download compiled libraries from sources like FFmpeg Builds by BtbN: ffmpeg-n7.1-latest-win64-lgpl-shared-7.1.zip
FFmpeg is available in two versions:
What does this mean for you?
This project is licensed under the Zlib License - see the LICENSE file for details.
Special thanks to the following resources:
more like this
SCYTHE is a lightweight, C#-based game engine focused on modifiability and rapid iteration using Raylib.
Pathfinding library for calculating all node pairs' shortest paths in an unweighted undirected graph.
.Net 10 (.Net 8+) webassembly starter project using raylib-cs nuget 7.0.2 and raylib 5.5
search projects, people, and tags