Video Maker

Create MP4 videos from instantaneous PIV data with customisable colormaps, resolution, and encoding quality.

GUI Usage

The Video Maker tab provides controls for data selection, colour limits, and encoding settings. A test mode renders the first 50 frames for quick preview.

StepAction
1Select base path, camera, data source, and variable.
2Set colour limits (leave blank for auto 5th-95th percentile scaling).
3Choose colormap, resolution (1080p / 4K), and FPS.
4Click "Test Video" (50 frames) to preview, or "Create Video" for all frames.
5Use the Browse Videos tab to play back or manage existing videos.

Browse Videos

The Browse tab lists all MP4/AVI/MOV/MKV files in the base path'svideos/ directory, sorted newest-first with in-browser playback.

CLI Usage

Command-line flags override values from config.yaml.

Video CLI
# Create video with config.yaml defaults pivtools-cli video # Specify variable and data source pivtools-cli video --variable mag --data-source calibrated # Custom resolution, quality, and colormap pivtools-cli video --resolution 4k --crf 10 --cmap viridis # Set colour limits pivtools-cli video --variable vorticity --lower -100 --upper 100 # Test mode (50 frames) pivtools-cli video --test # Process specific paths pivtools-cli video -p 0,1
FlagDescription
--camera, -cCamera number (1-based)
--variable, -vux, uy, uz, mag, vorticity, etc.
--run, -rPass number (default: 1)
--data-source, -dcalibrated, uncalibrated, merged, stereo, inst_stats
--fpsFrame rate 1-120 (default: 30)
--crfQuality 0-51 (default: 15, lower = better)
--resolution1080p or 4k
--cmapColormap name (default: bwr)
--lower / --upperColour limits (blank = auto)
--testRender first 50 frames only
--active-paths, -pComma-separated path indices

Data Sources

Only instantaneous (per-frame) data can be used for videos. Ensemble data produces a single field with no temporal sequence.

SourceDescriptionPath
calibratedPhysical-unit velocity fieldscalibrated_piv/{n}/Cam{c}/instantaneous/
uncalibratedRaw pixel displacementsuncalibrated_piv/{n}/Cam{c}/instantaneous/
mergedMulti-camera Hanning-blended fieldscalibrated_piv/{n}/merged/Cam1/instantaneous/
stereo3D velocity (ux, uy, uz)stereo_calibrated/{n}/Cam1_Cam2/instantaneous/
inst_statsPer-frame computed statisticsstatistics/{n}/Cam{c}/.../instantaneous_stats/

Available Variables

Variables are auto-detected from the first frame file. Statistics variables (vorticity, stresses, gamma) require the statistics module to have been run first.

VariableDescriptionSource
uxVelocity in xPIV
uyVelocity in yPIV
uzVelocity in z (stereo only)PIV
magVelocity magnitude sqrt(ux^2 + uy^2 [+ uz^2])Computed
u_primeFluctuating velocity in xStatistics
v_primeFluctuating velocity in yStatistics
uu_instReynolds normal stress (x)Statistics
vv_instReynolds normal stress (y)Statistics
uv_instReynolds shear stressStatistics
vorticityOut-of-plane vorticityStatistics
divergenceVelocity divergenceStatistics
gamma1Swirling strength criterionStatistics
gamma2Vortex core identificationStatistics

Colormaps

Default colormap is bwr (blue-white-red), which auto-adjusts: symmetric around zero for diverging data, half-map for all-positive or all-negative ranges.

ColormapStyle
default (bwr)Diverging blue-white-red (auto)
viridisPerceptually uniform
plasmaWarm perceptually uniform
infernoDark perceptually uniform
cividisColourblind-friendly
jetClassic rainbow
hotBlack-red-yellow-white
twilightCyclic
grayGreyscale

YAML Configuration

video: base_path_idx: 0 # Index into paths.base_paths camera: 1 # Camera number (1-based) data_source: calibrated # calibrated, uncalibrated, merged, stereo, inst_stats variable: ux # Variable to visualise run: 1 # Pass number (1-based) piv_type: instantaneous # Must be instantaneous cmap: default # Colormap name or "default" lower: "" # Lower colour limit ("" for auto) upper: "" # Upper colour limit ("" for auto) fps: 30 # Frame rate (1-120) crf: 15 # Quality 0-51 (lower = better) resolution: 1080p # "1080p" or "4k"

Output

Videos are saved under videos/ with filenames encoding the pass, camera, variable, and data source.

Output Directory
base_path/ videos/{num_frame_pairs}/ Cam1/ run1_Cam1_ux.mp4 run1_Cam1_mag.mp4 run1_Cam1_ux_test.mp4 # Test video (50 frames) stats/ run1_Cam1_vorticity_inst_stats.mp4 merged/ run1_Cam1_ux_merged.mp4 stereo/ run1_Cam1_Cam2_uz_stereo.mp4

Filename Pattern

run{pass}_Cam{camera}_{variable}[_{source}][_test].mp4— suffixes added for uncalibrated, merged, stereo, inst_stats, and test mode.

Video Quality

H.264 encoding with FFmpeg, optimised for scientific visualisation.

SettingValue
Codeclibx264
Pixel formatyuv420p
Presetslow
Tunestillimage (optimised for smooth gradients)
Default CRF15 (near-lossless)
LUT resolution4096 levels (reduces colour banding)
FaststartEnabled (streaming playback)
CRF RangeQuality
0-15Near-lossless (large files)
15-23High quality (recommended)
23-28Medium quality
28+Lower quality (small files)

Back to Results Viewer

Return to the Results Viewer to explore all viewing and post-processing options.

Results Viewer