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.
- Android
- Windows
- Linux
- Mac
- (wasm32)
This example application requires the following libraries:
- 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.
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.
└── 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