#[non_exhaustive]pub enum HardwareEncoder {
Auto,
None,
Nvenc,
Qsv,
Amf,
VideoToolbox,
Vaapi,
}Expand description
Hardware encoder type.
Specifies which hardware acceleration to use for encoding. Hardware encoding is generally faster and more power-efficient than software encoding, but may have slightly lower quality at the same bitrate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auto
Auto-detect available hardware encoder
None
Software encoding only (no hardware acceleration)
Nvenc
NVIDIA NVENC
Qsv
Intel Quick Sync Video
Amf
AMD Advanced Media Framework (AMF, formerly VCE)
VideoToolbox
Apple VideoToolbox
Vaapi
VA-API (Linux)
Implementations§
Source§impl HardwareEncoder
impl HardwareEncoder
Sourcepub fn available() -> &'static [Self]
pub fn available() -> &'static [Self]
Get the list of available hardware encoders.
Queries FFmpeg for available hardware encoders on the system. This is useful for UI to show which hardware acceleration options the user can select.
The result is cached on first call for performance.
§Examples
use ff_encode::HardwareEncoder;
let available = HardwareEncoder::available();
for hw in available {
println!("Available: {:?}", hw);
}Sourcepub fn is_available(self) -> bool
pub fn is_available(self) -> bool
Check if this hardware encoder is available.
Queries FFmpeg to determine if the hardware encoder is available on the current system. This checks for both H.264 and H.265 support.
§Examples
use ff_encode::HardwareEncoder;
if HardwareEncoder::Nvenc.is_available() {
println!("NVENC is available on this system");
}Trait Implementations§
Source§impl Clone for HardwareEncoder
impl Clone for HardwareEncoder
Source§fn clone(&self) -> HardwareEncoder
fn clone(&self) -> HardwareEncoder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more