Rootconf 2025 Annual Conference CfP

Rootconf 2025 Annual Conference CfP

Speak at Rootconf 2025 Annual Conference

Tickets

Loading…

Shantanu

Building realtime video transcoding and recording platform for livestreams

Submitted Apr 17, 2025

Session description

ShareChat’s Livestream platform connects millions of users and creators, requiring a high-performance media infrastructure. To gain greater control, reduce operational costs previously associated with vendor RTMP generation for HLS, we built our own in-house media processing pipeline. This session details our journey leveraging the open-source GStreamer framework to ingest raw audio/video frames directly from multiple WebRTC vendors and transform them into standardized RTMP streams, while also enabling parallel recording capabilities.

We’ll explore the vendor-agnostic and extensible architecture designed to consume raw YUV/PCM frames from upstream WebRTC providers. The core of the talk focuses on the rtmp-gstreamer-pipeline, explaining how we use GStreamer elements like compositor to merge multiple participant video streams, handle synchronization using latency buffering, and dynamically display profile pictures (uridecodebin, imagefreeze) when video is off. We will also cover how this pipeline supports both composite (merged scene) and individual stream recording.

Furthermore, we’ll share practical insights into optimizing the video encoding stage to RTMP using x264enc, detailing our tuning of parameters like speed-preset, quantizer, key-int-max for efficient downstream processing and better user playback. We’ll discuss the challenges faced, including GStreamer’s complexities, debugging dynamic pipelines, and ensuring high availability using the Temporal workflow engine. Finally, we’ll touch upon how this unified pipeline serves as a foundation for future enhancements, including integrated real-time moderation of livestreams.

Key takeaways

Understand the architecture and implementation of building a custom, scalable GStreamer pipeline for processing raw WebRTC frames, generating composite RTMP streams, and enabling simultaneous recording functionalities.

Gain practical insights into optimizing GStreamer elements (compositor, x264enc) for performance and synchronization, and learn how Temporal workflow orchestration ensures pipeline high availability, minimizing recording disruptions through automated retries and fault tolerance.

Target audience

This session is beneficial for Media Engineers, Backend Engineers, System Architects involved in building, managing, or scaling real-time video streaming infrastructure, particularly those processing WebRTC streams or using GStreamer for complex media workflows.

Speakers

  1. Shantanu Sharma - Software Development Engineer at ShareChat, with four years of experience in the development and optimization of large-scale systems. Focused on livestreaming products for the last two years.
  2. Geetish Nayak - Principal Engineer at ShareChat with 12+ years of experience in platform infrastructure, focusing on realtime communication and database systems. For the past 2 years, he has primarily worked on building platform frameworks for live-streaming.
    Before joining ShareChat, Geetish worked in platform teams at Intuit and Lucidworks (Enterprise Search). He also has entrepreneurial experience, having founded a startup focused on data cataloging.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hybrid access (members only)

Hosted by

We care about site reliability, cloud costs, security and data privacy