From 1eda5b676f3d0391389ea388c0be8a524a803864 Mon Sep 17 00:00:00 2001 From: Esa Kataja Date: Sat, 4 Oct 2025 18:12:08 +0300 Subject: [PATCH] docs: document encoding setting versions --- docs/encoding_versions.md | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/encoding_versions.md diff --git a/docs/encoding_versions.md b/docs/encoding_versions.md new file mode 100644 index 0000000..7deb03b --- /dev/null +++ b/docs/encoding_versions.md @@ -0,0 +1,58 @@ +# Encoding Settings Version 1.0 + +This document describes the encoding settings used by videnc version 1.0 for all video encodings. + +## Universal Settings + +These settings are applied to all videos regardless of source material: + +- **Video Codec**: libsvtav1 (AV1) +- **Pixel Format**: yuv420p10le +- **Preset**: 4 (universal setting) +- **enable-overlays**: 1 (enabled for all encodings) +- **enable-qm**: 1 (enabled for all encodings) +- **qm-min**: 0 +- **qm-max**: 15 +- **scd**: 1 (scene change detection enabled) +- **film-grain-denoise**: 1 (enabled for all encodings) +- **tune**: 0 (default tuning) + +## Variable Settings + +These settings vary based on video characteristics: + +### Resolution-Based Settings +- **CRF**: 30 for videos < 1 MPixel, 28 for videos >= 1 MPixel +- **film-grain**: 10 for videos < 1 MPixel, 5 for videos >= 1 MPixel + +## Source Material Dependent Settings + +These settings are conditionally applied based on the characteristics of the source video: + +- **Deinterlacing**: Applied when `isInterlaced` is detected + - Filter: `bwdif=mode=0` + +- **Anamorphic Correction**: Applied when `isAnamorphic` is detected + - Filter chain: `scale=iw*sar:ih:lanczos,setsar=1,scale=-2:ih:lanczos` + +- **Keyframe Interval**: Dynamically calculated based on video FPS + - Value: `Math.round(videoInfo.fps * 5)` + +## Audio Settings + +- **Audio Codec**: libopus for all audio streams +- **Channel Layout**: Preserved from source (with special handling for sideloaded audio) +- **Language Metadata**: Preserved for each stream +- **Disposition**: English audio tracks set as default + +## Subtitle Settings + +- **Subtitle Handling**: Copy (no re-encoding) +- **Language Metadata**: Preserved for each stream +- **Disposition**: Finnish subtitle tracks set as default + +## Metadata Handling + +- **Metadata Stripping**: Original metadata is stripped (`-map_metadata -1`) +- **Custom Metadata**: Added from OMDB API or user input +- **Encoding Version**: Added as `ENCODING_VERSION=1.0`