- HLS keyframe index: gomedia.KeyframeTimes / KeyframeTimesWithin read the
first video stream's keyframes from the MP4/MOV/M4V stss/stts/ctts tables
or Matroska/WebM Cues/block headers (go-media media.KeyframeTimes), with
go-ffmpeg's 1 ms dedupe and a dev-mode shadow diff against ffprobe.
probeKeyframesCached tries go-media first and falls back to the existing
ffprobe pre-flight. A go-media timeline with a gap past the copy cap is
confirmed by ffprobe before transcoding is forced, because go-media can
only miss keyframes (parser-flagged IDRs, partial Cues), never add them.
- HEIC/AVIF rotation: ffmpeg.CorrectHEICJPEGOrientation gets the display
rotation from go-media's HEIFTransform (installed by gomedia as
ffmpeg.SetHEICDisplayRotationReader). The "ffmpeg -f null" stderr probe
only runs when go-media is off or cannot read the item properties.
- Containers: AVIF routes through the HEIC preview path and heifImageExts.
ASF/WMV thumbnails go to go-media (WMV3); WMV1/WMV2 fall back to ffmpeg.
AVI, TS/M2TS/MTS and MPEG-PS/VOB stay on ffmpeg (go-media's probe does
not match ffprobe yet; documented in videoContainerExts). Stale comments
in gomedia.go and preview/video.go are fixed.
- Shared cache: new internal/mediacache replaces ffmpeg's MediaCache,
SubtitleContentCache and MetadataCache and gomedia's probe and subtitle
caches. Probe, duration, subtitle list and subtitle content are keyed by
path, size and mtime (ns) and shared by both backends. ffmpeg ProbeFile
results are now cached too. Shadow runs use mediacache.WithoutCache so
they compare fresh ffmpeg output; toggling "Always use ffmpeg" clears it.