4K UHD Experience During FIFA World Cup
Live sports streaming from SuperSport sets Showmax apart from other VoD services on the African market and offers our customers a valuable addition to general entertainment. Live sporting events are included in a subscription tier Showmax Pro. We wrote more about Sports Streaming at Showmax back in 2020 when we launched it.
This time we want to talk about how we got the opportunity to stream Qatar's FIFA World Cup (FWC) in 4K resolution. It’s one of the biggest sporting events in the world and delivering it in 4K completely exceeded our expectations.
For many engineers it was just another kind of content, because they simply see football as a game where 22 sweaty humans are chasing a ball to get it into the goal. But we have a few Brazilian colleagues, and they felt differently 🙂
Juliano Medieta said, “I was always excited about watching FiFA World Cups in general (as you might expect from a Brazilian), but this time it was really special for me working at Showmax. It is awesome when something you enjoy is mixed in your work. I wish I could go back to tell twenty-year-old me that one day I would be in the Czech Republic working in a streaming company broadcasting the World Cup to South Africa just to see my face of total confusion.”
But let’s go back to our story and focus on the technical aspect of delivering a smooth 4K live football stream to all supported devices.
The road to better sport experience
Our live streaming infrastructure shared between Showmax and DStv (live and catch-up added-value service for satellite receivers) is significantly different from our VoD encoding pipeline. First of all, unlike VoD encoded by FFmpeg, for live streaming we use specialised on-premise AWS Elemental encoders, where we run more than 500 live channels 24/7. The stream is pushed to a Unified Origin packager, which applies DRM encryption on-the-fly and transforms the streams to formats supported by our devices and applications. As a primary CDN for live streaming we use Akamai, which has a decent presence of their edges in South Africa, but in Nigeria you may end up streaming from edges located in Europe. The source of live channels comes from the inputs for the satellite broadcasting and it’s interlaced 50 frames per second. So deinterlacing into progressive is a must have. This limits max frame rates to 25 which is not ideal for sports content but it is what it is. Luckily the source from Qatar was progressive in 50 FPS, which is great for fast action scenes or slow motion as it brings smoother movements.
The 4K UHD has a resolution of 3840 × 2160 pixels. But it’s not just about more pixels, it may bring killer features like High Dynamic Range (HDR), which provides a broader range of contrast and colours. As usual in IT we don’t have just one HDR format. Devices which do not support the given format may display pictures in dull colours. Also, using HDR for lower resolutions does not make much sense – switching between Standard Dynamic Range (SDR) profiles and HDR profiles can be tricky and the switching could be visible and disruptive. Due to this and the lack of previous experience with 4K UHD live streaming before (as well as in VoD), we decided to stay with SDR for all profiles and bring our customers higher picture resolution and smoother motions with a higher frame rate.
It was the right decision, because we only had the opportunity to do production tests during several live English Premier League (EPL) matches a few weekends prior to the FWC kick-off. Not enough time and events to get sufficient samples and confidence for HDR.
Building an ABR Ladder
For 4K streaming we decided to add HEVC/H.265 codec into the live stack, where we had only used AVC/H.264 so far. So when creating an ABR ladder for 4K live streaming, we recycled our experience from VoD, where we’d already been using HEVC codec for several years. From experience, we know that HEVC requires around 66% of the bit-rate of relevant profiles in AVC/H.264. We could confirm the same for live streaming.
In order to add new resolutions into the ABR ladder, we used common rules for projecting the ladder like the Power of .75 Rule and the Power of .5 Rule for higher resolutions. It helps to estimate bit-rates proportionally across profiles. You add an additional constant into the equation to cover the increase for doubling the FPS. Compared to what you would expect it does not mean doubling the bit-rate but only a 25% increase.
The final equation could look like this:
We also added 1440p resolution to halve the gap between 1080p and 2160p.
In this section, we want to share a few issues with you which we encountered during the implementation of 4K UHD live streaming and how we mitigated them.
Shifted timestamps in DASH
This is not exactly related to 4K streaming, but we noticed that some of the live streams became delayed by 5 minutes on the Exoplayer/Shaka player. These players are using the DASH format and 5 minutes is the exact length of our DVR window. By looking further into the DASH manifest we noticed that even though publishTime="2022-11-11T11:56:23.773789Z" looked correct, timestamps of chunks were shifted by 1 day ahead <!-- 2022-11-12T11:51:15.440000Z / 1668253875 - 2022-11-12T11:56:18.800000Z -->. So when the player tried to find the closest point to real-time, it considered the oldest one based on shifted timestamps. As we found out later, this was caused by a bug in AWS Elementals, when encoding is started/restarted around midnight.
Flickering when FPS changes
The switching between profiles using different FPS on some Android TV decoders (e.g. Philips 55OLED806/12 model year using the OMX.MTK.VIDEO.DECODER.HEVC.secure decoder) was not smooth but a black frame was displayed for a fraction of a second, when switching profiles.
Unfortunately, we did not find any mitigation for this.
2160p vs 1080p streams
For the games we got 2 sources, one as usual from satellite broadcast in 1080p resolution coming from the usual flow and one ad-hoc stream in 2160p coming from the new 4K flow. It would be possible to use the 2160p source for every device, take advantage of adaptive streaming, and let players select the best quality in the given conditions. However, we decided to provide both streams and let users explicitly switch to the 4K stream. It was unclear if the 4K stream would contain studio programs during half break, which is very popular among customers. Also, the new 4K flow was not battle-proven and any outage would cause playback issues for all customers. The option to switch between fullHD and 4K UHD was displayed only on devices which we detected as capable of 4K playback.
Of course, not everything was well received. The selection of 4K streams differed during the production test and final release for the World Cup. Mainly this caused some confusion, which we realised, but the tournament was too short for any further experiments, which could cause even more confusion.
Check out the thread on Twitter
Check out the thread on Twitter.
So we officially communicated instructions and customer care was ready to navigate users having troubles.
Moment of truth
Customers were very pleased with the 4K quality and smoothness of 50FPS. Many of them just appreciated the possibility of watching the World Cup anywhere despite the struggles they have in ordinary life.
The chart below shows the users watching a 4K stream whose device and connectivity was sufficient to watch it in 4K vs. users watching a 4K stream who did not reach 4K resolution. This could be caused by either false-positive detection of 4K capability or insufficient internet connectivity.
As we explained, we had limited time to get ready for the FIFA World Cup and had a chance to conduct only a few tests during several live English Premier League matches a few weekends prior to the FWC kick-off. Nevertheless, we found a setup that worked amazingly great. There are numerous technical aspects of delivering a smooth 4K stream that we needed to consider and deal with. In this blog post, for example, we shared why we decided to go for SDR combined with a higher frame rate for all profiles instead of using HDR, or how we constructed an ABR ladder and mitigated several issues.
There is definitely more to reveal about 4K streams. If you want to hear more, come to our next WeStream meetup in Prague on April 26th in Showmax Offices on Bucharova 2657/12, 15800 Prague 5.