Skip to content

chubby1968/egui-video

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

egui-video, a video playing library for egui

crates.io docs license

main_L3Yxngkb7T.mp4

Plays videos in egui from file path, bytes or socket (live stream).

Dependencies

  • Requires ffmpeg 6. Follow the build instructions here
  • Requires sdl2. By default, a feature is enabled to automatically compile it for you, but you are free to disable it and follow these instructions

Usage

/* called once (top level initialization) */

{ // if using audio...
    let audio_device = egui_video::AudioDevice::new()?;
    
    // don't let audio_device drop out of memory! (or else you lose audio)

    add_audio_device_to_state_somewhere(audio_device);
}
/* called once (creating a player) */

let mut player = egui_video::Player::new(ctx, my_media_path)?;

{ // if using audio...
    player = player.with_audio(&mut my_state.audio_device)
}
/* called every frame (showing the player) */
player.ui(ui, player.size);

Contributions

are welcome :)

Current caveats

  • Need to compile in release or opt-level=3 otherwise limited playback performance

About

a video playing library for `egui`

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%