Feel free to contact !

Contact us: +91-965-065-8000 and +91-999-906-5650
Mail us: info@phando.com
Title Image

Blog

Home  /  Blog   /  How to Test Video Streams

How to Test Video Streams

There are a lot of domains that are and will be booming in 2019 and beyond including AI, Devops and Machine Learning but we have decided to enlighten you all on how to test video streaming. The decision to zero-in on this topic was not hard enough because we all have seen an evident slide of people switching to video platforms from traditional televisions. We spend most of our entertainment time nowadays watching movies, web series and even live matches on platforms like Netflix, Hotstar & Youtube. And we can only see the number of such users increase exponentially in the coming days. We don’t even know how many videos we watch on a daily basis, intentionally or unintentionally, while sticking our eyes on mobile screens. So, when videos are becoming an important part of our daily lives then why not think about testing them.

So what is video stream testing?

If i could put this explanation in pure layman terms, it means to make sure that the videos that are being offered to the users gives them the best viewing experience. Which technically includes best possible video quality, least buffering time, device independency and network independency.

Accordingly, I have shortlisted four Key Performance Indicators (KPIs) that play integral part when we talk about video streaming. These are:

  1. Transcoding
  2. Bitrate and Flavours
  3. Timings
  4. Network

Now, first of all, let me brief you all on what these terms are.

  1. Transcoding: It basically consists of two steps. First, to convert the video file of a particular format into different file formats and then converting each of those file formats into multiple quality levels or resolutions (technically called as flavours).
    Now, why do we do it? So different file formats are generated because the market, nowadays, is flooded with thousands of different devices and it is not necessary that all devices would support a common file format to play the video. And why different quality levels is because we don’t want that a user is unable to watch the video just because his region has slow internet connection. So, even if the video is streaming at lower quality, user is at least able to watch it.
  2. Bitrates and Flavours: We all have read about bitrates in our engineering. We hear kbps or mbps a lot these days and these are actually bitrates i.e. amount of data transferred per seconds. So we have to be prepared for different network speeds for streaming of our video. And for that we create multiple video flavours for different bitrates and deliver the appropriate video by detecting user’s bandwidth. This is also called adaptive streaming.
  3. Timings: No matter how robust your code is, timing is always an important factor for video streaming. This basically tells us about the video chunk transfer details i.e. Time of first byte transfer from server to the browser, Request sent time, chunk download time etc.
  4. Network: In video streaming, network plays a very important role. An important factor of increasing video demand is also a growing infrastructure of internet in last few years. Now we all have access to 4Gs and 5Gs which deliver good speed. But the problem is how our video stream performs when our network suddenly goes offline or switch to 2G or 3G. This is very practical situation in a country like India.

Now, how you can start testing?

You don’t need any third party tools to perform basic tests on video streams. The F12 developer tools panel in your browser is good enough.

To start with, you can launch any URL where you would find a video player integrated on that webpage and open F12 developer tools & switch to ‘Network’ tab.

You would see that a particular flavour (video quality) chunks are getting downloaded, like 360p or 480p, one after the other. This is because the players has detected your network speed and found that flavour suitable for streaming the video. Now, if you manually change the flavour to say 720p, then chunks should start downloading for 720p only. This way you can test whether appropriate flavour is being fetched from the server or not.

For the timings part, you can click on any particular video chunk in Network tab and click on the ‘Timings’ tab in it’s right side section. There you will see two important timing parameters at the very bottom, i.e., Waiting (TTFB) and Content Download. Ideally TTFB should be less than 400 ms as it tells you the server response timing which should be as fast as possible. But we can live with content download timing even if it’s a little bit on the higher side since it depends on the network speed of the user.

Another thing which we can include in the basic tests is video performance while we manually fluctuate the network speed. Before starting this, let’s set the video quality from player to ‘Auto’ so that we can have a better view of what all is happening. Now, take your mouse cursor to just below the close (x) button of developer tools console where you will see a drop down button with ‘online’ written on it. This is called the ‘Throttling’ feature. And while the video is playing, expand the throttling menu to select ‘offline’. You will see that video chunks that were getting downloaded earlier have stopped downloading now and are being shown in red color. You will also see that player is automatically trying to fetch lower quality chunks as well but in vain. Now, if you re-select ‘online’ from throttling tab or even ‘Fast 3G/ Slow 3G’, you will see that chunks will restart downloading and video will resume streaming.

So, this was a small insight on what actually is video stream testing and how can we start doing it. We, at Phando, do all this and a lot more on a regular basis. We now have our sights set on how we can supply better quality to videos streaming on Smart TVs and even make Set Top Boxes perform at the highest level.

Talk to us
info@phando.com/ +91-120-6101800
www.phando.in