Media import & color pipeline
Normalize MP4, MOV, WebM, MKV, VFR, interlaced, and HDR10 sources into single-track CFR QLX streams with qualix encode or the standalone importer bundle.
Offline asset pipelines feed containers or raw planar captures to qualix encode. The lean CLI locates ffprobe and ffmpeg on PATH (validated with FFmpeg 9.0.2), whereas standalone desktop importer zips built with tools/bundle-importer.py bundle a sibling media-tools/ directory containing FFmpeg 9.1 and ffprobe.
Common import invocations
Shell# 1. Default bit-exact lossless (ideal for UI sprites & transparent overlays)qualix encode opening.mp4 opening.qlx# 2. Automated perceptual mastering with verification report JSONqualix encode cutscene.mov cutscene.qlx --quality perceptual --profile dense > selection.json# 3. Shot-adaptive VBR (default for game openings & cutscenes in Quack)qualix encode opening.mp4 opening-vbr.qlx --vbr 2.5M# 4. Strict CBR with constant physical packet pacingqualix encode capture.mov capture-cbr.qlx --cbr 800k --key-interval 24# 5. Explicit track selection, rational fps, field order, and color tagsqualix encode pal.mpg pal.qlx --stream 2 --fps 60000/1001 \ --field-order tff --input-matrix bt470bg --input-primaries bt470bg --input-transfer bt709 --input-range limited
Bitrates use decimal bits/sec (800k = 800,000 bit/s, 2.5M = 2,500,000 bit/s). Pass at most one of --quality, --vbr, or --cbr. When an entire lossless stream fits within a VBR budget, VBR emits exact lossless output automatically.
Timeline & geometry normalization
| Input Characteristic | Normalization Behavior |
|---|---|
| Constant frame rate | Preserves exact frame sequence and rational fps_num / fps_den (24000/1001, 30000/1001, 120000/1001); override rounded containers via --fps |
| Variable frame rate | Samples onto a constant grid starting at first PTS, retaining final frame hold duration |
| Interlaced / mixed fields | Applies bwdif deinterlacing (25i → 50p, 30000/1001i → 60000/1001p); override via --field-order progressive|tff|bff |
| Non-square SAR & rotation | Scales to square display pixels, applies display rotation/mirroring, leaves transparent borders for arbitrary angles |
| Existing QLX input | Decodes directly to re-quantize, change --key-interval, or resample frame rate |
Color & straight alpha
- SDR: Full-range sRGB
R8G8B8A8. BT.709 transfer inputs undergo channel linearization and re-encoding to the exact sRGB curve before quantization. - HDR10 (
PQ10/HLG10): Full-range BT.2020R10G10B10A2with 1024 RGB code values and 2-bit nearest-level alpha. - Missing tag defaults: Unlabeled RGB defaults to full-range sRGB; unlabeled YUV defaults to limited-range BT.601 (SD) / BT.709 (HD); PQ/HLG infer BT.2020 primaries. Override explicitly with
--input-range,--input-matrix,--input-primaries, and--input-transfer. - Straight alpha: QLX always stores non-premultiplied alpha (
--input-alpha premultipliedun-premultiplies untagged sources; WebM alpha useslibvpx).
Raw pixels & standalone desktop importer bundles
Ingest raw camera/engine captures without container headers (--raw PIXEL_FORMAT WIDTHxHEIGHT INPUT_FPS) or packed RGBA8/R10G10B10A2 sequences (pack10 + encode-raw):
Shellqualix encode capture.p010 capture.qlx --raw p010le 3840x2160 60000/1001 \ --input-transfer smpte2084 --input-matrix bt2020nc --input-primaries bt2020 --input-range limitedqualix pack10 frames.gbrap10le frames.raw 3840 2160 gbrap10lequalix encode-raw frames.raw hdr.qlx 3840 2160 120 pq10 30 0 dense
Package a relocatable desktop bundle with LGPLv2.1+ FFmpeg 9.1 (dav1d, libvpx, zlib; GPL/nonfree disabled) plus mirrored upstream sources:
Shellpython3 tools/bundle-importer.pypython3 tools/bundle-importer.py --target x86_64-pc-windows-gnu