A simple Rust application demonstrating how to play a video using GStreamer and render it with wgpu.
- GStreamer Integration: Uses GStreamer for video decoding and pipeline management.
- wgpu Rendering: Renders video frames to a window using wgpu.
- Dynamic Resizing: Automatically adjusts the texture size to match the video resolution.
- Full-Screen Shader: Uses a custom WGSL shader for efficient display.
- Rust: Install from rustup.rs.
- GStreamer: Install GStreamer development libraries.
- macOS:
brew install pkg-config gstreamer gst-plugins-base gst-plugins-good - Linux (Ubuntu/Debian):
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good - Windows: Install via MSVC installer from GStreamer website.
- macOS:
If no arguments are provided, the application defaults to using videotestsrc.
cargo runProvide the path to a video file as an argument.
cargo run -- path/to/video.mp4Example with downloaded sample:
# Download sample
curl -o sample.mp4 http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
# Run
cargo run -- sample.mp4- ESC: Exit the application.
MIT