About The Project
This crate provides a simple way to merge video and audio files into a single output file. It uses the rsmpeg library, which is a Rust binding for FFmpeg, to handle the underlying media processing.
Built With
Getting Started
Prerequisites
- Install FFmpeg and its development libraries
- install pkg-config
See an example GitHub workflow.
Importing the Crate
To use this crate in your Rust project, add the following to your Cargo.toml:
[]
# if you want to mux audio and video and re-encode, try version 0.2
= { = "0.2", = ["aac", "hevc"] }
# if you just want to mux audio and video without re-encode, try version 0.1
= { = "0.1" }
NOTICE: version 0.2 hard-coded nvenc hwaccel as the encoder, which is non-free in FFmpeg's LICENSE.
(You cannot distribute the FFmpeg binary or library with nvenc enabled for commertial usage. If you need, feel free to fork and modify this crate.)
Features
- ffmpeg8/ffmpeg7/ffmpeg6/link_system_ffmpeg/link_vcpkg_ffmpeg: same as it is in rsmpeg
Usage
use *;
let video_file = new;
let audio_file = new;
let output_file = new;
.mux.unwrap;
let file1 = new;
let file2 = new;
let output = new;
.mux
.unwrap;
For more examples, please refer to the Documentation
Roadmap
- Feature
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt for more information.
Contact
Louis - 836250617@qq.com
Project Link: https://github.com/kingwingfly/avmux