Probe & Import
Importing turns a file path into a MediaItem in the project's media pool. Probing is the only step on the critical path; everything derived from the file (proxy, thumbnail, waveform) is produced later by background workers.
Flow

- Probing a video costs about 100 ms, so a multiple import runs on a pool of threads (
vv_session::import_worker) instead of the UI thread. - Results arrive in completion order but are handed to the pool in selection order, so the media pool order is stable across imports.
- Files already in the pool (same canonical path) are skipped. Each import is one undo step, which also covers follow-up commands joined to it (e.g. the timeline created for the first media).
What probe reads
| Field | How it is obtained |
|---|---|
| fps | r_frame_rate if ≤ 1000; otherwise (VFR, e.g. phone screen captures declaring 90000) the densest one-second window of packets, capped at 120, then avg_frame_rate, then 30. |
| duration_frames | duration × fps, then corrected down to the last frame the decoder really produces (demux the tail, decode the last GOP). Never raised. |
| width, height | best video stream |
| audio | rate and channels of the best stream; count of all audio streams (one clip per stream on import) |
Special cases: images are recognised by extension (jpg, png, webp, tif…) and get a fixed 25 fps and a sentinel duration; audio-only files get a nominal 30 fps so in/out points and keyframes still count in frames.
content_hash
content_fingerprint is FNV-1a over canonical path + size + mtime. It reads no file bytes, so import is instant; the trade-off is that a file rewritten with the same size and mtime reuses stale derived caches. It is stable across restarts and keys every on-disk cache (see Proxies, Thumbnails, Waveforms).
No comments to display
No comments to display