pub struct ExportProfile {
pub id: ProfileId,
pub name: String,
pub width: u32,
pub height: u32,
pub fps: f64,
pub video_codec: String,
pub audio_codec: String,
pub container: String,
pub include_video: bool,
pub include_audio: bool,
pub file_suffix: String,
pub metadata: HashMap<String, String>,
}Expand description
A preset defining resolution, codec, and format for one export target.
Fields§
§id: ProfileIdUnique ID.
name: StringHuman-readable name (e.g. “YouTube 4K”, “Twitter 720p”).
width: u32Output width in pixels.
height: u32Output height in pixels.
fps: f64Frame rate.
video_codec: StringVideo codec preset label (e.g. “av1-crf28”).
audio_codec: StringAudio codec preset label (e.g. “opus-128k”).
container: StringContainer format (e.g. “webm”, “mkv”, “mp4”).
include_video: boolWhether to include video.
include_audio: boolWhether to include audio.
file_suffix: StringOutput file suffix (appended before extension).
metadata: HashMap<String, String>Custom metadata fields.
Implementations§
Source§impl ExportProfile
impl ExportProfile
Sourcepub fn with_resolution(self, width: u32, height: u32) -> Self
pub fn with_resolution(self, width: u32, height: u32) -> Self
Set resolution.
Sourcepub fn with_video_codec(self, codec: impl Into<String>) -> Self
pub fn with_video_codec(self, codec: impl Into<String>) -> Self
Set video codec.
Sourcepub fn with_audio_codec(self, codec: impl Into<String>) -> Self
pub fn with_audio_codec(self, codec: impl Into<String>) -> Self
Set audio codec.
Sourcepub fn with_container(self, container: impl Into<String>) -> Self
pub fn with_container(self, container: impl Into<String>) -> Self
Set container format.
Sourcepub fn with_suffix(self, suffix: impl Into<String>) -> Self
pub fn with_suffix(self, suffix: impl Into<String>) -> Self
Set file suffix.
Sourcepub fn aspect_ratio(&self) -> f64
pub fn aspect_ratio(&self) -> f64
Returns the aspect ratio as a float.
Sourcepub fn pixel_count(&self) -> u64
pub fn pixel_count(&self) -> u64
Returns the pixel count (width * height).
Trait Implementations§
Source§impl Clone for ExportProfile
impl Clone for ExportProfile
Source§fn clone(&self) -> ExportProfile
fn clone(&self) -> ExportProfile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExportProfile
impl RefUnwindSafe for ExportProfile
impl Send for ExportProfile
impl Sync for ExportProfile
impl Unpin for ExportProfile
impl UnsafeUnpin for ExportProfile
impl UnwindSafe for ExportProfile
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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