#[non_exhaustive]pub enum VideoCodec {
H264,
H265,
Vp9,
Av1,
ProRes,
DnxHd,
Mpeg4,
}Expand description
Video codec for encoding.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
H264
H.264 / AVC (most compatible)
H265
H.265 / HEVC (high compression)
Vp9
VP9 (WebM, royalty-free)
Av1
AV1 (latest, high compression, LGPL compatible)
ProRes
ProRes (Apple, editing)
DnxHd
DNxHD/DNxHR (Avid, editing)
Mpeg4
MPEG-4
Implementations§
Source§impl VideoCodec
impl VideoCodec
Sourcepub const fn is_lgpl_compatible(self) -> bool
pub const fn is_lgpl_compatible(self) -> bool
Check if this codec specification is LGPL compatible.
Returns true for codecs that can be used without GPL licensing.
Important: This indicates the codec family’s licensing, not the actual encoder used.
H.264 and H.265 return false because their software encoders (libx264/libx265) are GPL,
but hardware encoders (NVENC, QSV, etc.) are LGPL-compatible.
Use VideoEncoder::is_lgpl_compliant() to check
the actual encoder selected at runtime.
§LGPL-Compatible Codecs
VP9- Google’s royalty-free codec (libvpx-vp9)AV1- Next-gen royalty-free codec (libaom-av1)ProRes- Apple’s professional codecDNxHD- Avid’s professional codecMPEG4- ISO MPEG-4 Part 2
§GPL Codecs (require licensing for commercial use)
H264- Requires MPEG LA license (when using libx264)H265- Requires MPEG LA license (when using libx265)
Note: Hardware H.264/H.265 encoders are LGPL-compatible and don’t require licensing fees.
Sourcepub const fn default_extension(self) -> &'static str
pub const fn default_extension(self) -> &'static str
Get default file extension for this codec.
Trait Implementations§
Source§impl Clone for VideoCodec
impl Clone for VideoCodec
Source§fn clone(&self) -> VideoCodec
fn clone(&self) -> VideoCodec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more