v0.4.0 — Time-range filtering
New features
- Time-range filtering with
--startand--endtimestamps forextractandstreamcommands. AcceptsHH:MM:SS.ms,MM:SS.ms,SS.ms, or plain seconds. - Per-format seeking skips directly to the target position — no scanning of data before the start point:
- MKV with Cues — exact seeking via cue point filtering
- MKV sequential / M2TS — binary search refinement with timestamp probing (up to 20 iterations) to converge on the correct byte offset despite variable bitrate
- SUP — bitrate estimation from first/last PTS in segment headers
- Library API:
Extractor::with_time_range(start_ms, end_ms)for programmatic time-range filtering (chainable builder pattern)
If no display sets fall within the requested range, zero results are reported with no error.
Usage
libpgs extract movie.mkv -o out.sup --start 0:05:00 # From 5 minutes to end
libpgs stream movie.mkv --start 0:05:00 --end 0:10:00 # 5-minute window only
libpgs stream movie.m2ts --start 1:30:00 --end 1:35:00 -t 4768 # M2TS with track filterlet extractor = Extractor::open("movie.mkv")?
.with_time_range(Some(300_000.0), Some(600_000.0)); // 5:00 to 10:00