JeninSutradhar / ffmpeg-VideoPlayer-Rust_Slint

This is a lightweight audio-video player built in Rust using FFmpeg libraries. It demonstrates the usage of FFmpeg with Rust to play back video files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FFmpeg Rust Video Player

This is a lightweight audio-video player built in Rust using FFmpeg libraries. It demonstrates the usage of FFmpeg with Rust to play back video files.

Supported Builds -

  • Android
  • Windows
  • Linux
  • Mac
  • (wasm32)

Necessary Libraries

This example application requires the following libraries:

Linux

  • On Linux, you need to install FFmpeg and ALSA. For example, on Debian-based systems:
sudo apt-get install clang libavcodec-dev libavformat-dev libavutil-dev libavfilter-dev libavdevice-dev libasound2-dev pkg-config
  • macOS On macOS, you can use Homebrew:
brew install pkg-config ffmpeg
  • Windows For Windows:
Install vcpkg.
Run vcpkg install ffmpeg --triplet x64-windows.
Make sure VCPKG_ROOT is set to where vcpkg is installed.
Make sure %VCPKG_ROOT%\installed\x64-windows\bin is in your PATH.

Building the Application

To build the application, follow these steps:

  • Ensure you have installed the necessary libraries as mentioned above.
  • Navigate to the root directory of the project.
  • Run the following command:
cargo bundle --release

This command bundles the application along with its dependencies into a single distributable directory.

Project Structure

└── ffmpeg
    ├── Cargo.toml
    ├── README.md
    ├── api
    │   └── rs
    │       ├── build
    │       │   ├── Cargo.toml
    │       │   ├── LICENSES
    │       │   │   ├── GPL-3.0-only.txt -> ../../../../LICENSES/GPL-3.0-only.txt
    │       │   │   ├── LicenseRef-Slint-Royalty-free-1.1.md -> ../../../../LICENSES/LicenseRef-Slint-Royalty-free-1.1.md
    │       │   │   └── LicenseRef-Slint-commercial.md -> ../../../../LICENSES/LicenseRef-Slint-commercial.md
    │       │   └── lib.rs
    │       ├── macros
    │       │   ├── Cargo.toml
    │       │   ├── LICENSES
    │       │   │   ├── GPL-3.0-only.txt -> ../../../../LICENSES/GPL-3.0-only.txt
    │       │   │   ├── LicenseRef-Slint-Royalty-free-1.1.md -> ../../../../LICENSES/LicenseRef-Slint-Royalty-free-1.1.md
    │       │   │   └── LicenseRef-Slint-commercial.md -> ../../../../LICENSES/LicenseRef-Slint-commercial.md
    │       │   ├── README.md
    │       │   └── lib.rs
    │       └── slint
    │           ├── Cargo.toml
    │           ├── LICENSES
    │           │   ├── GPL-3.0-only.txt -> ../../../../LICENSES/GPL-3.0-only.txt
    │           │   ├── LicenseRef-Slint-Royalty-free-1.1.md -> ../../../../LICENSES/LicenseRef-Slint-Royalty-free-1.1.md
    │           │   ├── LicenseRef-Slint-commercial.md -> ../../../../LICENSES/LicenseRef-Slint-commercial.md
    │           │   └── MIT.txt -> ../../../../LICENSES/MIT.txt
    │           ├── README.md
    │           ├── android.rs
    │           ├── compile_fail_tests.rs
    │           ├── docs -> ../../../docs
    │           ├── docs.rs
    │           ├── lib.rs
    │           ├── mcu.md
    │           ├── private_unstable_api.rs
    │           ├── tests
    │           │   ├── partial_renderer.rs
    │           │   ├── show_strongref.rs
    │           │   ├── simple_macro.rs
    │           │   └── spawn_local.rs
    │           └── type-mappings.md
    ├── build.rs
    ├── main.rs
    ├── pause.svg
    ├── play.svg
    ├── player
    │   ├── audio.rs
    │   └── video.rs
    ├── player.rs
    └── scene.slint

About

This is a lightweight audio-video player built in Rust using FFmpeg libraries. It demonstrates the usage of FFmpeg with Rust to play back video files.


Languages

Language:Rust 98.4%Language:Slint 1.6%