DEV Community

AsyncMonk
AsyncMonk

Posted on

Before adding a streaming stack I tested startup and seeking separately

Before replacing a small site’s video delivery with a streaming stack, I would want to know which interaction is actually failing. A slow first picture and a slow jump halfway through the clip can look like the same complaint, but they produced different results in my test. Improving one did not settle the other. For an independent project, that difference is useful before adding another system to build and maintain.

I tested two public waves clips through a local HTTP player. Both comparison clips were eight-second, silent H.264 MP4 files at 960×540. Each had a version with movie metadata toward the front and a version with it at the end. The paired files retained identical encoded media payloads. I then changed whether the server honored Range requests. This let me change file delivery without also changing the encoded pictures.

All active responses within a test shared a 256 KiB/s write budget, with an 80 ms initial delay per request. Each ordinary MP4 condition ran twice in Chromium 149, Firefox 151, and a WebKit 26.5 test build. I measured the first video-frame callback separately from a later jump to six seconds, requested 500 ms after the first frame. This was a controlled local setup, not a test of commercial hosting or mobile networks.

One result would have looked reassuring if I had stopped at the first picture. In Firefox, the smaller clip with front metadata and Range support started after a median 0.607 seconds. Reaching the six-second target then took a median 3.919 seconds. The request record showed only one range request beginning at byte zero; playback continued reading that response. Support for fetching byte ranges did not oblige this browser to make a new request for every jump.

The same distinction appeared from the opposite direction. For that clip’s end-metadata version without Range support, Firefox waited a median 5.786 seconds for the first frame. Once the early seek test began, reaching six seconds took only 0.023 seconds at the median. Much of the waiting had already happened. Calling the latter “fast seeking” without the startup cost would give a misleading picture of what a visitor experienced.

The end-metadata comparison file is still waiting during an early load

This illustration shows a separate Chromium load 1,250 ms after starting the same end-metadata, no-Range comparison file. It is a native player view from the local reproduction. It demonstrates the visible waiting state at that instant, not the Firefox timing quoted above. The file later produced a picture. An empty player screenshot alone does not establish that the video is corrupt.

I also exported the original clips with ImgIng, using the Chinese compression workbench for the actual operation. Those completed outputs had fragmented MP4 structures, so I kept their playback results separate from the ordinary comparison files. Their full durations and audio tracks also differed. A file extension was not enough to make them interchangeable test inputs, and the ordinary comparison should not be read as an ImgIng speed ranking.

For a short product demo, I would therefore define the interaction I need before choosing a delivery change. If visitors mostly start at the beginning, I need a defensible first-picture check. If they frequently jump to a specific moment, that destination needs its own acceptance test. A single MP4 that starts before its full transfer completes demonstrates progressive playback; this experiment did not build or evaluate an adaptive streaming service. It also provides no hosting-cost comparison.

The illustrated Iceland footage is Alexander Grebenkov’s Ocean waves at Lækjavik beach, Iceland, under CC BY 3.0, trimmed, resized, stripped of audio, and transcoded for the comparison. The WebKit build was not released Safari. I would keep the original file, test the final delivery URL, and record first-frame and target-frame waits in separate fields. That gives me a concrete interaction to improve before I decide whether a larger delivery stack is justified.

Top comments (0)