Audio, video and vision

From docs/media.md at 947399f View on GitHub

Three routes, never mixed silently (D12):

RouteLocalOpenAIAnthropic
nativemtmd + audio/vision mmprojinput_audio on audio-capable modelsnot available
asrwhisper.cpp (whisper-rs) → text in the prompttranscript in the prompttranscript in the prompt
autonative if mmproj (audio) / VL mmproj (vision); else ASRinput_audio if capable, else transcripttranscript

Audio (--audio, --audio-route)

Preference: CLI --audio-route > RUNA_AUDIO_ROUTE > [audio] route > auto.

  • native without an audio mmproj (or on Anthropic / non-audio OpenAI) errors.
  • asr always transcribes (runa media transcribe uses the same engine).
  • PCM is 16 kHz mono f32 (runa-media). OpenAI native wraps WAV base64.

Sibling *mmproj*.gguf is picked only when native audio or --image/--video needs it. --mmproj wins if set.

Vision (--image, --video)

Local only, mtmd feature + vision mmproj:

  • --image PATH (repeatable) — stills, media markers, no timestamps.
  • --video PATH — runa-media samples ≤ 32 frames; each is an mtmd bitmap with a [t=12.0s] marker in the prompt.

Cloud --image/--video on runa run openai:… is an explicit error (use a local VL model, or the P4.7 adapters from serve).

Video sampling

Uniform + scene-change (histogram L1), cap 32, resize. ffmpeg on PATH or ffmpeg-sidecar. See P4.5.

Fit

Frames × tokens-per-frame + audio seconds count as context; mmproj bytes sit on GPU. Overflow → NO FIT exit 2 (docs/fit.md).