pub struct RenderConfig {Show 14 fields
pub input: PathBuf,
pub output: String,
pub fps: u32,
pub format: String,
pub fade_in: f32,
pub fade_out: f32,
pub bitrate: Option<String>,
pub crf: Option<u32>,
pub open: bool,
pub preview: Option<usize>,
pub file_pattern: Option<String>,
pub verbose: bool,
pub verbose_ffmpeg: bool,
pub background: Option<String>,
}Expand description
Render configuration loaded from a JSON/TOML file or CLI arguments
Fields§
§input: PathBuf§output: String§fps: u32§format: String§fade_in: f32§fade_out: f32§bitrate: Option<String>§crf: Option<u32>§open: bool§preview: Option<usize>None = full render, Some(n) = extract frame n as a PNG
file_pattern: Option<String>§verbose: bool§verbose_ffmpeg: bool§background: Option<String>Solid background color behind the frames, e.g. "#1e1e1e" or "white".
None (or "transparent") keeps transparency; mp4 cannot store it and
uses black. See parse_background.
Implementations§
Source§impl RenderConfig
impl RenderConfig
Sourcepub fn from_file(path: &str) -> Result<Self, String>
pub fn from_file(path: &str) -> Result<Self, String>
Load configuration from a .json or .toml file.
Fields that are missing fall back to defaults; when format is missing it is
taken from the output file extension.
pub fn is_preview(&self) -> bool
pub fn preview_frame_limit(&self) -> Option<usize>
Trait Implementations§
Source§impl Debug for RenderConfig
impl Debug for RenderConfig
Source§impl<'de> Deserialize<'de> for RenderConfig
impl<'de> Deserialize<'de> for RenderConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RenderConfig
impl RefUnwindSafe for RenderConfig
impl Send for RenderConfig
impl Sync for RenderConfig
impl Unpin for RenderConfig
impl UnsafeUnpin for RenderConfig
impl UnwindSafe for RenderConfig
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