MyVid – Seamless Video Streaming and Recording

MyVid is an innovative video streaming application that empowers users to stream video content to HLS or RTMP servers seamlessly. Users can log in via their Google account and, if necessary, select their YouTube channel to enable live streaming. With a user-friendly interface and robust functionality, MyVid simplifies streaming while providing advanced controls and flexibility for diverse use cases.

Key Features

  • Login with Google, with options to select a YouTube channel for creating live streams.
  • Flexible streaming options:
    • YouTube: Automatically creates a live stream and provides a recording panel.
    • HLS: Generates an HTTP URL containing HLS server code, shareable with anyone.
  • Stream controls: Switch camera/audio on or off, or share your screen with dynamic placement of your image.

Upcoming Features

  • Invite other users to join streams (one at a time via WebRTC).
  • Display live YouTube comments during streams.
  • AI-based comment filtering to highlight the most relevant discussions, ensuring focus on the topic.

How It Works

MyVid records video directly in the browser and sends recorded chunks to an FFmpeg server for processing. The backend uses Kubernetes to dynamically create FFmpeg pods, ensuring load balancing across multiple users. Each user can create only one stream at a time, guaranteeing one FFmpeg server per user.

Depending on the user’s selection, the FFmpeg server streams the processed chunks to either YouTube or an HLS server. For security, a proxy server manages communication between the browser and the FFmpeg server, hiding the server’s identity from external sources. The FFmpeg server is automatically destroyed after the stream ends, ensuring resource optimization.

If a user does not close the stream and logs in again, the system reconnects them to their existing FFmpeg server, adhering to the single server per user policy.

Technologies Used

Nextjs
ExpressJS
Redis
Redis
NGINX
FFMPEG
WebRTC

Challenges and Solutions

  • Challenge: Managing multiple user streams without exposing FFmpeg servers.
    Solution: Implemented a proxy server to route traffic securely while concealing the FFmpeg server’s identity.
  • Challenge: Ensuring resource efficiency with dynamic workloads.
    Solution: Used Kubernetes to dynamically spawn and destroy FFmpeg pods, optimizing resource allocation.
  • Challenge: Maintaining seamless user experience during screen sharing.
    Solution: Developed front-end logic to resize and reposition user images dynamically during screen sharing.

Project Outcome

MyVid bridges the gap between simplicity and advanced video streaming capabilities. It offers a user-friendly platform for seamless streaming while maintaining robust backend operations. With its dynamic resource management and upcoming features, MyVid aims to redefine live video streaming experiences.

Home