Video streaming test

Hello,

We have a video streaming infrastructure at our company. Currently I use JMeter for load tests of our web infrastructure that has to support +10000 simultaneous users.
Yet one thing I can’t test with JMeter is the video stream itself. I need a way to read the video stream, mesure if the stream is flowing in a stable way. The video stream is sent to a url like:

https://ourserver.com/player/stream.webm

AFAIK JMeter isn’t able to do this.
This test need to be for 10000 simultaneous users.

I never used K6. But I’m willing to learn it if it has the ability to do this. Does it ?

Hi @nelson777 Welcome k6 Comunity.

Can you share more details which type scenario you want performance loading testing or stress testing.
But you can start with loading testing as scripted below

import http from 'k6/http';
import {check} from 'k6';

export const options = {
    scenarios: {
        peak_load: {
            executor: 'ramping-vus',
            stages: [
                {target: 10, duration: '5m'},
                {target: 1000, duration: '10m'},
            ]
        }
    }
};

export default function () {
    const videoStream = http.get('https://ourserver.com/player/stream.webm');
    check(videoStream, {
        'is stream okay 200': res => res.status === 200
    });
}

Cheers.

1 Like

I don’t think I fully understand what you mean by “type scenario” but let me explain better our situation.

We have a system that integrates Jitsi and and big server infrastructure (28 servers and a load balancer) to transmit the stream to a reasonably large corporative audience (at least 5000 users seeing it). Yet during large audience streams we are experiencing some instability in our servers. So we need

1-A way to create around at least 5000 clients for the stream that can stay receiving the stream from at least some minutes, being 15000 a perfect number, but it got to be at least 5000.
2-Mesuring the stability of the stream while playing by client.

Actually part 2 would be desirable, but what we really need is creating the load on the stream in order to test our servers.

2 questions:

-I’m deducting that that configuration “peak-load” is how many users the test is loading and the ramup time for them right ?

-I took a look a check function. It looks like it gets a page a checks for the HTTP code return value. Are you sure it works for streams ? Because it’s the same problem we have with JMeter: a ‘normal’ page load returns an http code. Reading a stream is a continued operation. It doesn’t return any http code or even returns from the request. The request is continuous. You have to operate with the data while it’s being read because there won’t be any return code. The data will only stop flowing. That’s my main point with this forum post: is K6 able to do this ?

Hi @nelson777
Streaming video can be accessed by which PROTOCOL?

  1. I have created smaple video streaming service which accessable by URL an return response code 200 for successful streaming.
import http from 'k6/http';
import {check} from 'k6';

export const options = {
    scenarios: {
        peak_load: {
            executor: 'ramping-vus',
            stages: [
                {target: 5000, duration: '15m'},
                {target: 15000, duration: '30m'},
                {target: 15000, duration: '10m'},
                {target: 0, duration: '5m'},
            ]
        }
    }
};

export default function () {
    const videoStreamResponse = http.get('https://dl6.webmfiles.org/big-buck-bunny_trailer.webm');
    console.log(videoStreamResponse);
    check(videoStreamResponse, {
        'is stream okay 200': res => res.status === 200
    });
}

Yes… but that’s not a real live stream. You have a fixed full-length video (https://dl6.webmfiles.org/big-buck-bunny_trailer.webm) which is read by http.get. That video has the possibility of transmitting the length, so you know how many of it you have already loaded and the request returns with 200 OK. With a live video stream you don’t have that possibility and the request doesn’t return.
I’m trying to find a live webm stream like the ones we use for you to test. I’ll post it here ASAI find it.

Hi @nelson777 :wave:

Welcome to the forum :tada:

A couple questions to be able to address your question: what is the video stream consisting of? Or rather, what is the requirement to consume that stream in a programatic manner? I assume some UDP socket reading incoming frames of data? Maybe some specific technology/protocol that I’m not aware of (I’m rather unfamiliar with that domain).

2 Likes

Creating and launching your own video streaming platform requires careful consideration of various factors to ensure success in a competitive market. With the global video streaming industry projected to reach a revenue of $932.29 billion by 2028, it’s crucial to develop an appealing website and app using cutting-edge technology that meets the expectations of your target audience. Additionally, selecting the right monetization strategy and prioritizing user experience are key elements to retain users and prevent them from migrating to competitors.