pub struct VideoInfo {
pub width: usize,
pub height: usize,
pub rotation: u16,
pub duration: Option<f64>,
pub frame_count: Option<u64>,
pub codec: String,
pub bit_depth: u8,
pub colour: Colour,
pub format: PixelFormat,
pub backend: Backend,
}Expand description
What the file holds, as the chosen backend reads it.
Fields§
§width: usizeSize of the decoded frames, before VideoInfo::rotation.
height: usize§rotation: u16Degrees (0, 90, 180 or 270) to turn the frames clockwise for display.
duration: Option<f64>Seconds, when the container says.
frame_count: Option<u64>Frames this backend will present (decode and output), counted before decoding: the track’s samples inside its
edit list, as the backend applies it. This can be fewer than the samples the container lists: iPhone and macOS
recordings commonly list one sample starting where the edit ends, which the backend does not present. A run
that decodes fewer frames than this has lost some. None when the backend cannot tell in advance (Media Foundation; an
AVFoundation track with several edits; ffprobe unable to list the packets).
codec: StringThe codec’s short name: h264, hevc, vp9, av1, prores …
bit_depth: u8Bits per sample of the coded stream (the frames’ format may hold them in wider samples).
colour: Colour§format: PixelFormatThe format every frame comes in.
backend: BackendThe backend that read the file (never Auto).
Implementations§
Trait Implementations§
impl StructuralPartialEq for VideoInfo
Auto Trait Implementations§
impl Freeze for VideoInfo
impl RefUnwindSafe for VideoInfo
impl Send for VideoInfo
impl Sync for VideoInfo
impl Unpin for VideoInfo
impl UnsafeUnpin for VideoInfo
impl UnwindSafe for VideoInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more