Transcoding Vertical Videos With Inhouse Developed Transcoder

Background

Short content in vertical (9:16 aspect ratio) format is gaining popularity steadily over time. One can find huge number of people enjoying these content on various social media platforms. These videos are typically of short duration (less than 2 minutes), thus user can get a sense of completion over very short time. These videos being of aspect ratio 9:16 (Vertical) fits very well with natural aspect ratio of phone devices. As the screen size grows, importance of good quality for reels content is becoming more important.

Among multitude of ways Zee entertains people, vertical video plays an important part.

With a big user base to be entertained, amount of content to be processed and published are huge. All these content transcoding prior to September 2024 was done by managed transcoding solution from a leading corporate in this field. While the quality of transcoded content was quite good, cost to transcode such volume of content was quite significant.

As a company last year (2024) Zee5 migrated it’s cloud based infrastructure to use Google Cloud Platform (GCP), and plan was reels content production also to migrate it’s cloud based infrastructure to use GCP.

The aforementioned managed transcoder service does not work on GCP. While there are commercial alternatives, idea was to come up with a scalable transcoding solution, that would generate better quality (than content generated by existing solution) at same speed (as existing solution) at much lower cost (and while we are at it, why not make generated content more compressed)!

Only an in house built transcoding solution could make all of these to happen!

Requirements

  • Generated content shall have AVC video and AAC audio, encased within MP4 container format.
  • For a single source of content, 5 different renditions to be generated, all with same resolution (720×1280), but at different bit rates. Some of the aforementioned renditions need to have multiple logos (non-overlapping) embedded to it.
  • Some of the aforementioned renditions need to be stitched with a short (of few seconds duration) advertisement video.
  • Extracting audio from source content and extracting thumbnail from any point of source content also need to be supported.
  • Source content can be of any frame rate, encoding type but typically up to 1080×1920 resolution.
  • Solution need to be able to scale based on volume of content to be transcoded, typically volume of content to be transcoded is much higher during day and evening time (Indian Standard Time) vis-à-vis late evening to early morning period (IST).
  • Time taken to complete transcoding (to generate all required rendition and other operations like logo insertion, slate addition et al) must be less than source content duration, and lower the better. Time to publish these content being as low as possible is must have requirement, and transcoding time is one of bigger contributor for time taken to publish content.

Architecture

Transcoding solution developed in house is deployed on cloud native cluster of nodes, which would scale up/down based on CPU usage of cluster. Since transcoding is compute intensive activity, appropriate CPU type was chosen to maximise compute efficiency at most cost effective and fault tolerant manner.

Transcoder works on message driven manner, following diagram depicts flow of data and control to and from transcoder

Vertical video Transcoder Architecture
  • Once a content gets uploaded to source bucket, a pre existing service (named as Transcoding Input service on diagram) creates a message depicting path to content to be transcoded, operation to be performed and destination path, and posts to message queue (depicted as Transcoding Input Message Queue on diagram).
  • Message format is carefully crafted to meet current and future requirements.
  • Pods pertaining to Transcoder picks up messages from queue and ensures the operation is completed.
  • Once a given transcoder pod completes requested operation, it notifies status of operation and other relevant details by writing a message per predefined spec to another message queue (depicted as Transcoding Status Message Queue in above diagram)., and then reads next available message from queue.
  • Publishing service then takes care of publishing completed transcoded content per existing flow.

Message driven well defined architecture and crafty implementation ensured that integration of transcoder with existing services worked quite seamlessly and got deployed exactly as per planned date. There was not a single bug reported on transcoding solution during integration. More importantly there was absolutely no user complaints about any playback failures about content generated from in house built transcoder.

Result

When transcoder got deployed and started taking 100% workload on production, next obvious focus was to see how it performing.

Following sections depict how transcoder did with respect to stated objectives at start of project, that is:

  • Create better user experience at lower infrastructure cost.
  • At lower storage/CDN cost vis-a-vis existing solution.

User Experience

This is the proverbial test of pudding (i.e. transcoder). Team took it as challenge to deliver better user experience than the previous solution (which was already quite good).

Within Zee ecosystem, metrics from Conviva are used as an objective analytical mechanism to measure user experience. Content generated with in house built transcoder showed impressive improvements on most important user experience metrics.

The following table depicts relevant user experience related metrics form Conviva over one month period (starting from 5th of September, 2024) post in house developed transcoder started transcoding 100% content to be published on this UGC platform vis-a-vis previous month.

Date RangeVideo Start TimeRebuffering RatioExit Before Video StartStreaming Performance IndexHigh RebufferingHigh Startup Time
5th September to 4th October0.75 seconds1.31%24.4%96.60.908%0.632%
6th August to 4th September0.935 seconds1.41%25.6%95.11.05%0.836%

In a nutshell, the user experience improved as

  • Video starts much faster (as seen by Video Start time and High start up time metrics)
  • Buffering has reduced (as seen by Rebuffering ratio and High Rebuffering metrics)
  • More engaging (as depicted by lower Exit before video start)
  • Overall experience is better (As seen by Streaming Performance Index)

The custom in-house transcoder ticks all right boxes as far as user experience is concerned!

More details about definition of these aforementioned metrics can be found here.

Cost

For the amount of UGC content to be transcoded for this UGC platform, the cost of the in-house transcoder came around 8% of what previous solution would have cost (so, this is a saving of 92% of cost!).

Impact on Storage and CDN Cost

On average, content generated by in house built transcoder is around 10-15% smaller in size vis-a-vis content generated by it’s predecessor.

Transcoding Speed

There is no distinguishable difference on publish time of a given content post switching to in house built transcoder vis-a-vis prior to it.

Sanchari Ganguly
Sanchari Ganguly
Tech Lead at Zee5

Highly motivated Technical Leader/Team Leader with 19 years of experience in the OTT and broadcasting industry, working with major players like Zee5, Vodafone, Sky Italia, UPC, and Canal Digital. Proven expertise in delivering video transcoding solutions and full-stack development for cloud-based EPG, third-party app integrations, and video streaming platforms.

Rahul Banerjee
Rahul Banerjee
Principal Architect at Zee5

Rahul Banerjee is a Principal Architect at Zee5. In his current role, he is spearheading continuous AV experience improvement for end users. Prior to working at Zee5, Rahul filed a patent on optimizing I-frame delivery in ABR content and is the author of multiple published papers.

Previously, Rahul worked at Synamedia/CISCO/NDS, Marvell Semiconductor, and LSI Logic.

Suneel photo 1
Suneel Khare
Senior Vice President at Zee5

Suneel is a seasoned technology leader with 24 years of experience in media technologies, spanning roles in India and the USA. He has played a pivotal role in shaping the evolution of video and OTT platforms, contributing to both industry standards and technological advancements. He has been a driving force behind platforms offering 4K, Dolby Vision, Dolby Atmos, and HEVC, creating best-in-class viewing experiences.

He has led initiatives such as transitioning to CMAF technology, optimizing engineering costs, building scalable live sports infrastructure and passionate about leveraging Generative AI to rejuvenate content libraries and solve business problems with simplicity and impact. His leadership is defined by collaboration, innovation, and delivering measurable business outcomes.

Leave a Comment

Your email address will not be published. Required fields are marked *