diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-17 02:16:02 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-17 02:16:02 +0200 |
| commit | 3f74fcc3515cd461f9fdd8d95a9d80aee67e1e58 (patch) | |
| tree | b5ca8282ccc1fae0f63227849a26861504080529 /packages/meshbay-hub/tests/test_video_seek.py | |
| parent | f57b2f6c0c2770fe0f456128d985e29427d2432f (diff) | |
| download | meshbay-3f74fcc3515cd461f9fdd8d95a9d80aee67e1e58.tar.gz | |
feat(node): seeking, as a stream restarted somewhere else
The scrubber was drawn the length of the film — `ms.duration` has always been
the real duration — and then `onSeeking` quietly clamped every target back into
whatever happened to be buffered. The bar invited a click and refused it.
`stream_req` gains a `start`. The session's previous stream is retired by the
path that already exists for switching films, and ffmpeg is spawned again with
`-ss` **before** `-i`: an index lookup rather than decoding and discarding up to
the point, which is milliseconds on a 500 MB film instead of tens of seconds.
Measured over real MNP: 0s -> 492 MB, 600s -> 418 MB, 3000s -> 179 MB.
A seek at or past the end is pulled back, because ffmpeg would produce nothing
and the player would wait for segments that are never coming.
`stream_init` reports the position actually used. It has to: ffmpeg restarts its
output timestamps at zero however far in it seeks — `-copyts` does not change
that for this input, measured — so the client is the one that puts the fragments
back on the film's timeline, and it cannot guess by how much. The value is also
not what was asked for, since `-c copy` lands on the keyframe at or before it.
The diagnostics that found the rest of this are here too: a seek, a first init
and a re-init are each one line at INFO, which is rare enough to keep on. The
five-second client report stays at DEBUG.
Diffstat (limited to 'packages/meshbay-hub/tests/test_video_seek.py')
0 files changed, 0 insertions, 0 deletions