| Goal | Metric | Target | |------|--------|--------| | Size reduction | Avg. percentage reduction vs. baseline | ≥ 45 % | | Quality retention | PSNR / VMAF drop vs. original | PSNR loss ≤ 1 dB or VMAF ≥ 92 | | Throughput | Files/hour processed on reference hardware (2 × 12‑core, 64 GB RAM) | ≥ 25 | | Automation | % of repacks triggered automatically from CI pipeline | 100 % | | User satisfaction | Survey NPS from ops team after 30 days | ≥ 8 |
| # | Requirement | Acceptance Criteria |
|---|-------------|---------------------|
| FR‑13 | Output must be CMAF‑compatible (fragment duration 2 s, moof/mdat alignment). | MP4Box validation passes; playback on Safari & Chrome works. |
| FR‑14 | Inject ATID‑260 metadata block (custom udta atom) with fields: ATID, RM, HD, TODAY, MIN, REPACK. | ffprobe shows custom atom with correct values. |
| FR‑15 | Generate a SHA‑256 checksum of the final file and store it in the metadata DB. | Checksum matches after copy to another bucket. |
| FR‑16 | Preserve time‑code continuity (no timestamp jumps). | Playback shows monotonic PTS; ffprobe timestamps are sequential. |
| FR‑17 | Optionally create HLS/DASH manifests as side‑car files. | Manifest lists a single rendition; test playback via Shaka Player succeeds. |
| # | Requirement | Acceptance Criteria |
|---|-------------|---------------------|
| FR‑09 | Determine the minimum CRF (or target bitrate) that achieves VMAF ≥ 92 while meeting the size goal. | Unit test with known sample shows CRF 28 yields VMAF = 93 and size = 55 % of original. |
| FR‑10 | Support 2‑pass encoding for VBR when size reduction > 30 % is needed. | Log shows two pass timestamps; final size matches target within ±2 %. |
| FR‑11 | Provide an override option for power users to set explicit CRF/bitrate. | CLI flag --crf 24 respected; UI shows overridden value. |
| FR‑12 | When hardware encoder is available, prefer it; fall back to software (libx264/libx265). | nvidia-smi detection toggles encoder path; performance benchmark shows > 2× speedup. |