Skip to content

Architecture

Salem874 edited this page Apr 3, 2026 · 1 revision

πŸ—οΈ Architecture

Copyright Β© 2026 MWBM Partners Ltd. All rights reserved.

Modular Design

MeedyaConverter uses a three-layer architecture with a shared cross-platform core:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    MeedyaConverter                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  macOS App    β”‚  β”‚  Windows App  β”‚  β”‚  Linux App    β”‚  β”‚
β”‚  β”‚  (SwiftUI)    β”‚  β”‚  (WinUI 3)   β”‚  β”‚  (GTK4)       β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚         β”‚                  β”‚                  β”‚           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                 meedya-convert (CLI)                 β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                         β”‚                                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                ConverterEngine                       β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚ β”‚
β”‚  β”‚  β”‚         EncodingBackend (Protocol)            β”‚    β”‚ β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚    β”‚ β”‚
β”‚  β”‚  β”‚  β”‚ FFmpeg Subprocessβ”‚ β”‚ AVFoundation/       β”‚ β”‚    β”‚ β”‚
β”‚  β”‚  β”‚  β”‚ (Direct Dist.)  β”‚ β”‚ FFmpegKit Hybrid    β”‚ β”‚    β”‚ β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚    β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Internal Targets

Target Type Purpose
ConverterEngine Library Cross-platform core β€” encoding, probing, manifests, disc reading
meedya-convert Executable CLI tool for automation and scripting
MeedyaConverter Executable macOS SwiftUI application

Names are deliberately distinct from the Meedya product family (MeedyaDL, MeedyaManager, MeedyaDB).

Hybrid Encoding Engine

The encoding backend is selected at build time via build configuration:

Direct Distribution (DIRECT)

  • FFmpeg invoked as subprocess with full GPL codecs (libx264, libx265)
  • dovi_tool as subprocess for Dolby Vision
  • No sandbox restrictions
  • Sparkle 2 auto-updates

App Store (APP_STORE)

  • AVFoundation / VideoToolbox for H.264, HEVC, ProRes (hardware-accelerated)
  • FFmpegKit (LGPL linked) for codecs AVFoundation doesn't support
  • dovi_tool bundled as signed helper (MIT license)
  • Apple-managed updates
  • Three-tier sandbox file access

Three-Tier File Access (App Store Sandbox)

  1. Tier 1 β€” User-selected access via NSOpenPanel/NSSavePanel (default)
  2. Tier 2 β€” Security-scoped bookmarks for persistent folder access (recommended)
  3. Tier 3 β€” Full Disk Access via System Settings (optional, user-granted)

Directory Structure

Sources/
β”œβ”€β”€ ConverterEngine/        # Cross-platform core
β”‚   β”œβ”€β”€ Backend/            # EncodingBackend protocol + implementations
β”‚   β”œβ”€β”€ FFmpeg/             # FFmpeg subprocess integration
β”‚   β”œβ”€β”€ Native/             # AVFoundation/VideoToolbox integration
β”‚   β”œβ”€β”€ Encoding/           # Profiles, jobs, queue
β”‚   β”œβ”€β”€ Manifest/           # HLS/DASH manifest generation
β”‚   β”œβ”€β”€ Audio/              # Normalization, ReplayGain
β”‚   β”œβ”€β”€ Subtitles/          # Format conversion, CC handling, OCR
β”‚   β”œβ”€β”€ HDR/                # HDR10/DV/dovi_tool/DDVT
β”‚   β”œβ”€β”€ Crypto/             # AES-128, key management
β”‚   β”œβ”€β”€ Cloud/              # Upload providers
β”‚   β”œβ”€β”€ Disc/               # Optical disc reading/authoring
β”‚   β”œβ”€β”€ Models/             # Shared data models
β”‚   β”œβ”€β”€ Reports/            # Post-encoding reports
β”‚   └── Utilities/          # Logging, process runner
β”œβ”€β”€ meedya-convert/         # CLI executable
β”‚   └── Commands/           # ArgumentParser commands
└── MeedyaConverter/        # macOS SwiftUI app
    β”œβ”€β”€ Views/
    β”œβ”€β”€ ViewModels/
    └── Components/