Skip to content

Cactice/gstreamer-wgpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GStreamer wgpu Demo

A simple Rust application demonstrating how to play a video using GStreamer and render it with wgpu.

Features

  • 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.

Prerequisites

  • 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.

Usage

Run with Test Pattern

If no arguments are provided, the application defaults to using videotestsrc.

cargo run

Run with Video File

Provide the path to a video file as an argument.

cargo run -- path/to/video.mp4

Example with downloaded sample:

# Download sample
curl -o sample.mp4 http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

# Run
cargo run -- sample.mp4

Controls

  • ESC: Exit the application.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published