pub struct FFmpeg;
Implementations§
Source§impl FFmpeg
impl FFmpeg
Sourcepub fn new() -> FFmpegBuilder<Normal>
pub fn new() -> FFmpegBuilder<Normal>
Uses FFmpeg::get_program
to find the FFmpeg program
Panic if doesn’t exist
Sourcepub fn new_with_program<S: AsRef<OsStr>>(program: S) -> FFmpegBuilder<Normal>
pub fn new_with_program<S: AsRef<OsStr>>(program: S) -> FFmpegBuilder<Normal>
Must provide a valid FFmpeg program path
Sourcepub fn override_downloaded_ffmpeg_path(path: PathBuf) -> Result<()>
pub fn override_downloaded_ffmpeg_path(path: PathBuf) -> Result<()>
Override the download FFmpeg directory
§Safety
This should be called before any other function is called, or there will be inconsistencies of the downloaded FFmpeg directory
Sourcepub fn is_exist_in_env() -> bool
pub fn is_exist_in_env() -> bool
Check if FFmpeg is exist in the current environment
Sourcepub fn downloaded_ffmpeg_folder() -> Result<PathBuf>
pub fn downloaded_ffmpeg_folder() -> Result<PathBuf>
Downloaded FFmpeg folder
Sourcepub fn downloaded_ffmpeg_path() -> Result<PathBuf>
pub fn downloaded_ffmpeg_path() -> Result<PathBuf>
Downloaded FFmpeg executable
Sourcepub fn is_downloaded() -> Result<bool>
pub fn is_downloaded() -> Result<bool>
Check if FFmpeg is already downloaded
Doesn’t mean that it exist in the current environmant
Sourcepub fn get_program() -> Result<Option<String>>
pub fn get_program() -> Result<Option<String>>
Get the program string that can be used for Command::new
Sourcepub fn auto_download() -> impl Future<Output = Result<Option<(JoinHandle<Result<(), Error>>, Receiver<FFmpegDownloadProgress>)>>>
pub fn auto_download() -> impl Future<Output = Result<Option<(JoinHandle<Result<(), Error>>, Receiver<FFmpegDownloadProgress>)>>>
Returns the read channel for listening the download state & the thread handle
Returns Option::None
if FFmpeg alredy exist
It is your responsibility for making sure that the download is succeed & finished!
Sourcepub async fn auto_download_with_url(
url: &str,
) -> Result<Option<(JoinHandle<Result<(), Error>>, Receiver<FFmpegDownloadProgress>)>>
pub async fn auto_download_with_url( url: &str, ) -> Result<Option<(JoinHandle<Result<(), Error>>, Receiver<FFmpegDownloadProgress>)>>
Downloaded file must be compressed in GZIP archive that contains the single FFmpeg binary
Consider looking at this https://github.com/eugeneware/ffmpeg-static/releases/tag/b6.0
Returns the read channel for listening the download state & the thread handle
Returns Option::None
if FFmpeg alredy exist
It is your responsibility for making sure that the download is succeed & finished!