Table of Contents
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

- 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 Range | Video Start Time | Rebuffering Ratio | Exit Before Video Start | Streaming Performance Index | High Rebuffering | High Startup Time |
| 5th September to 4th October | 0.75 seconds | 1.31% | 24.4% | 96.6 | 0.908% | 0.632% |
| 6th August to 4th September | 0.935 seconds | 1.41% | 25.6% | 95.1 | 1.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.