ff-encode 0.16.0

Video and audio encoding - the Rust way
Documentation
[package]
name = "ff-encode"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
description = "Video and audio encoding - the Rust way"
license.workspace = true
readme = "README.md"
repository.workspace = true
keywords = ["video", "audio", "ffmpeg", "encode", "async"]
categories = ["multimedia::video", "multimedia::audio", "multimedia::images", "api-bindings", "asynchronous"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
ff-format = { workspace = true }
ff-sys = { workspace = true }
thiserror = { workspace = true }
log = { workspace = true }
tokio = { version = "1.50.0", features = ["rt", "sync"], optional = true }

[features]
# Default: LGPL-compatible only (safe for commercial use without licensing fees)
default = ["hwaccel"]

# Hardware acceleration support (NVENC, QSV, AMF, VideoToolbox, VA-API)
# All hardware encoders are LGPL-compatible
hwaccel = []

# Enable GPL codecs (libx264, libx265)
# WARNING: Enabling this feature requires GPL compliance
# Commercial use requires licensing fees from MPEG LA
# Only enable if you have appropriate licenses or for non-commercial use
gpl = []

# Async encoding API backed by tokio::task::spawn_blocking
tokio = ["dep:tokio"]

# Preview-image generation (sprite sheet + animated GIF). Off by default: it is a
# compose-decode+filter+encode convenience, not part of the core encoder.
preview-image = []

[dev-dependencies]
criterion = { workspace = true }
ff-probe  = { workspace = true }
tokio = { version = "1.50.0", features = ["macros", "rt", "rt-multi-thread", "time"] }

# Benchmark configuration
[[bench]]
name = "encode_bench"
harness = false

[[test]]
name = "gif_preview_tests"
required-features = ["preview-image"]

[[test]]
name = "preview_tests"
required-features = ["preview-image"]

[[test]]
name = "sprite_sheet_tests"
required-features = ["preview-image"]

[lints]
workspace = true