Skip to main content

Crate easy_ffprobe

Crate easy_ffprobe 

Source
Expand description

Simple wrapper for the ffprobe CLI utility, which is part of the ffmpeg tool suite.

This crate allows retrieving typed information about media files (images and videos) by invoking ffprobe with JSON output options and deserializing the data into convenient Rust types.

match ffprobe::ffprobe("path/to/video.mp4") {
   Ok(info) => {
       dbg!(info);
   },
   Err(err) => {
       eprintln!("Could not analyze file with ffprobe: {:?}", err);
    },
}

§Features

  • streams
  • format
  • chapters
  • async

Modules§

error

Structs§

AttachmentStream
Stream of type attachment
AttachmentTags
Tags specific for attachments
AudioStream
Stream of type audio
AudioTags
Tags specific for audio
Chapter
Chapter parsed
ChapterTags
Tags for chapter
Config
ffprobe configuration.
DataStream
Stream of type data
DataTags
Tags for the type data
Disposition
FfProbe
FfProbe parsed
Format
Parsed Format
FormatTags
Metadata Tags of format
Ratio
Ratio eg. 1/1000
SideData
Stream
Stream parsed
StreamTags
Stream tags for video, audio, subtitle
SubtititleTags
Tags specific for subtitles
SubtitleStream
Stream of type subtitle
VideoStream
Stream of type video
VideoTags
Tags specific for video

Enums§

StreamKinds
codec_type as enum

Traits§

IntoFfprobeArg

Functions§

ffprobe
Execute ffprobe with default settings and return the extracted data.
ffprobe_config
Run ffprobe with a custom config. See [ConfigBuilder] for more details.
option_string_to_duration