Repository navigation
Releases
v0.6.1
Fixed
- 0.6.0 was tagged but never published: its release stopped when a new test of the Node.js and Python packages failed on FFmpeg 6.1. The test wrote MKV files, whose timestamps are rounded to the millisecond. This release publishes everything listed under 0.6.0. It's also the first npm release since 0.2.1, so the Node.js package gains everything listed under 0.3.0 to 0.6.0.
Changes in 0.6.0
Fixed
- Camera blends are read through the camera's tone curve. A camera mixes two frames in light, then records brightness through its tone curve (about light to the power 1/2.2 for a phone), but the blend fits took brightness as proportional to light. That pulled each frame's mix towards a half by up to 0.1, made measured exposures a quarter or more too long, and used up much of the fits' error allowance. The fits now model the curve as a gamma and measure it from the frame itself: modules that went from dark to light and from light to dark read differently unless brightness is proportional to light. Frames that can't show it (a mix close to one frame, or a barcode with few changed cells) use the capture's recent median. In simulation, a 25 fps camera filming 30 fps was 6.5 ms out (claiming ±2.5 ms) and is now within 0.2 ms, with its exposure measured at 33.1 ms rather than 46.5 for a true 33.3. Blended QR codes are also decoded from their own samples at half the light, so a camera's mixes near a half (which both read about 0.7) still decode. Reports gain
summary.tone_gamma, and the text summary saystone curve measured at gamma x. Stamps'blendgainsgammain the Node.js and Python packages (optional when passing stamps in; 1 if omitted). - The Node.js and Python packages read video about five times faster, and see the same pixels as the CLI. They run the
ffmpegprogram, which computed a checksum of every frame for itsshowinforeport and converted each frame to full-range grey. They now skip the checksums and take the luma plane as it is, which is what the linked decoder reads. The conversion had also clipped a camera's darkest and brightest pixels: on a sample camera clip the packages measured 40.65 ms where the CLI measured 40.15 ms (truth 40.00 ms), and both now give 40.15 ms. A 30-second 4K file takes 2.2 s to analyse rather than 11 s. Video that isn't 8-bit YUV, such as 10-bit or RGB, is converted to 8-bit YUV first.
Changed
- Faster analysis. The audio is now read on all available cores: each block of eight frames is aligned and decoded on its own, and the results are the same however many threads there are. The camera blend fits now group each candidate frame pair's modules by row and by how they changed, and fit to the group totals. That gives the same error, and the cost no longer grows with the number of modules. Each group's mean brightness, not each module's, is converted back to light, which reduces the bias from noise; timings move by under 0.01 ms in the stress cases. On a 10-core Mac, a 30-second 4K copy takes 0.8 s to analyse instead of 1.2 s, and a 12-second camera clip 1.0 s instead of 1.2 s.
- Breaking (library):
pattern::Blendhas agammafield.barcode::fit_blendandQrTemplate::fit,fit_samplesandfit_barcodetake a&mut pattern::ToneCurve, which learns the capture's curve from the fits (StampReaderkeeps one), andqr_fit::decode_samplestakes the gamma to threshold at.
The changes in 0.3.0 to 0.5.0, which have no GitHub releases, are in the changelog.
Test clips
29 ready-made 30-second test clips (H.264 and AAC, rendered by av-drift generate 0.6.1) at the most common frame sizes and rates: 4K to 360p, cinema, ultrawide, portrait, square and 4:3, and 1080p at every broadcast and web rate. Play one through the system you're testing and run av-drift analyze on the capture. manifest.json lists each clip's size, rate, length and SHA-256. To check downloads, run shasum -a 256 -c SHA256SUMS (macOS) or sha256sum -c SHA256SUMS (Linux).
Install
cargo install av-drift-detector --version 0.6.1 # the av-drift command
npm install av-drift-detector@0.6.1 # Node.js
pip install av-drift-detector==0.6.1 # PythonThe command links FFmpeg's libraries; the Node.js and Python packages run the ffmpeg and ffprobe programs (FFmpeg 5.1 or later). See Getting started.
Packages: crates.io · npm · PyPI · API docs
v0.2.1
Fixed
- 0.2.0 was tagged but never published: its release stopped when the Node.js and Python packages' checks found files still marked 0.1.0. This release publishes everything listed under 0.2.0.
Install
cargo install av-drift-detector --version 0.2.1 # the av-drift command
npm install av-drift-detector@0.2.1 # Node.js
pip install av-drift-detector==0.2.1 # PythonThe command links FFmpeg's libraries; the Node.js and Python packages run the ffmpeg and ffprobe programs (FFmpeg 5.1 or later). See Getting started.
Packages: crates.io · npm · PyPI · API docs