Considerations when figuring out how to create a streaming app

Let's explore the challenge of synchronization in live-streaming fitness classes and how the Stardio platform overcame it.

Table of contents

Embarking on the Journey to Create a Live Streaming App

In recent years, new streaming technologies have emerged to help overcome these challenges, such as LiveKit, which Moravio has taken advantage of during the development of Stardio.

Stardio is an online platform for live streaming fitness classes, allowing trainers to design and broadcast workouts to an audience. Members can subscribe to the lessons of their choice, follow along with the fitness moves, and interact with instructors and other participants in real-time.

Synchronization is a critical aspect of live streaming fitness classes, especially when learning how to create a streaming app. In order for the workouts to be effective, both the instructor and the participants need to be in sync with each other. Any delays or discrepancies in the live stream can cause participants to miss important cues or lose the flow of the workout, leading to a less than optimal fitness experience.

Moravio has addressed this challenge by implementing a solution that has ensured synchronization between the instructor and the participants, allowing for a seamless and effective workout session. With the ability for instructors to upload custom video and music to the workout session, it is crucial that this content is played in sync with the live stream.

Embarking on the Journey to Create a Live Streaming App

The Challenge: Custom Uploaded Content and Local Playback

When You Concider to Create a Music Streaming App or Video Streaming App...

When an instructor uploaded custom video and music to his session, the content was played locally on the participant's device rather than being streamed in order to decrease network load and improve performance. However, when custom video and music were played locally, the latency between the instructor and participant could cause a delay in the playback of the content, leading to participants being out of sync with the instructor. This is a significant problem in fitness classes where precise timing is crucial, as participants may miss out on important cues and movements.

Moreover, the different network conditions and device capabilities of each participant may cause playback quality variations, leading to inconsistencies in the fitness experience. This can result in a lack of engagement and potentially lead to a negative user experience. Therefore, Moravio had to come up with a solution to synchronize the video and music playback for all participants.

There are a number of possible solutions to the synchronization issue in general:

Timecode synchronization
With timecode synchronization, the instructor’s playback time information is forwarded to the participants in real time and their video and music playback is adjusted to equal the instructor’s playback time. This is the solution that Moravio has implemented originally, albeit with limited results. The problem is that network quality and device performance might still cause a significant delay in the playback compared to the instructor’s camera and microphone streamed tracks, again causing inconsistencies.

Delaying the stream
Another solution is to delay the stream slightly to allow for any delays in the network. This means that the instructor would stream the content slightly later than usual to allow for the network to catch up. This method ensures that all participants receive the same content at the same time and reduces the chances of delays or out-of-sync content. However, this solution is unusable for this use case, because the instructor needs to react in real-time to any inputs from the participants, which would be slightly delayed, causing confusion. Keep in mind that things like these are important to consider when learning how to create a streaming app.

Streaming the locally played content separately
Instead of letting the participants’ play the custom video and music locally, the video and music playing on the instructor’s side can be captured and streamed as separate tracks alongside the instructor’s camera and microphone tracks. This is the solution that Moravio ultimately implemented to solve the synchronization problem.

A Solution: Capturing and Streaming Custom Content

When asked about how to build a live video streaming web application and trying solve the synchronization problem, Moravio has implemented a solution where the custom video and music that was previously playing locally on both the instructor and participant side in an HTML media player is now playing locally only on the instructor side and is being captured and streamed as a separate video and audio track. This means that the participants are no longer playing the custom video and music locally, but instead, it is being streamed to them from the instructor's device. This ensures that the instructor’s workout cues are in sync with what is actually happening on the stream and all participants are following the fitness moves in real-time.

The process involved in capturing and streaming custom uploaded content as a separate track includes the following steps:

  1. The instructor uploads the custom video and music to the session using the class builder.
  2. We capture the custom video playing in the HTML media player using the captureStream()  method when it is playing
  3. We also capture the music using the createMediaStreamSource() method on the AudioContext
  4. The captured video and audio are then streamed to the participants as separate tracks.

The benefits of this approach include a seamless and synchronized fitness experience for both the instructor and the participants. This creates a more enjoyable and effective workout session and ensures that participants are following the instructor's moves accurately. The downside to this approach is that because the network load is increased, participants with poor network connectivity may experience drops in video and music quality. However, LiveKit automatically takes care of adaptively changing the video quality based on the network connection quality, which is definitely key in scenarios like this one.

How to create a video streaming app - is not trivial task

For those wondering how to create a music streaming app, or create a video streaming app, the process involves developing various types of applications, including creating a music streaming app, crafting a live streaming app, and engineering a video streaming app. If you're specifically interested in knowing how to create a live streaming app, it's essential to explore solutions like the one implemented in Stardio.

Stardio's  solution addresses the complexities of capturing and streaming customized video and music content as distinct tracks. By offering synchronized playback, this innovation enhances the overall fitness experience, catering to the needs of both instructors and participants. With this approach, the creation of a music streaming app, live streaming app, or video streaming app can greatly benefit from improved synchronization, contributing to a seamless user experience.

By eliminating the delay and out-of-sync issues that local playback can cause, the platform now provides a seamless and synchronized experience for all users. This new feature has also increased the quality of the workout experience by ensuring that participants are following the instructor's moves accurately. As a result, this creates a more effective and enjoyable workout session, leading to increased motivation and satisfaction for users.

How to create a video streaming app - is not trivial task

Furthermore, this solution highlights how technology can be used to improve the quality of live streaming applications and enhance the user experience. It is a great example of how innovative solutions can address challenging issues and ultimately lead to a better product for users. Hopefully this article will provide you with some tips on how to make a streaming app.The rise of live streaming applications has revolutionized the way we consume content, allowing people from all over the world to interact in real-time. The world of live streaming has expanded beyond just gaming and social media, with platforms like Zoom, Microsoft Teams, and Google Meet being used for remote work and online learning. Live streaming has also enabled remote fitness classes, concerts, sports events, and other activities that were previously limited to physical attendance. Live streaming applications are becoming increasingly popular, with users expecting high-quality content and a seamless experience. The success of these platforms largely depends on the ability to provide a reliable and consistent live streaming experience. This requires overcoming technical challenges, such as synchronization, quality, and latency issues, which are all relevant when figuring out how to develop a video streaming app.

Read also

Blog posts you may be interested in

10
 minutes to read
September 24, 2024

AI Integration in Business - Moravio’s AI Engineer's View

Ladislav Husty, an experienced AI engineer, shares his experience of integrating AI into business
4
 minutes to read
February 1, 2024

Unveiling the Power of dlib: A Journey into Image Processing

Explore how dlib, renowned for its facial recognition and object detection capabilities, harnesses the Histogram of Oriented Gradients (HOG) method and Support Vector Machines (SVM) to transform images into condensed vectors for advanced analysis. Learn how the dlib library handles determining which images are similar and which are not.
11
 minutes to read
March 2, 2023

JavaScript: controlling web page with gestures

Our experience in implementing remote control and experimenting with different approaches, including Computer Vision technology. In this article, we'll share the results of our experiments using Google's MEDIAPIPE library for Computer Vision.
New articles

New blog posts you may be interested in

11
 minutes to read
October 21, 2024

How We Centralized Our Data for Smarter Decision-Making Using BI

Pavel Janko, Head of Delivery at Moravio, shares how we improved decision-making and boosted our work by centralizing data using BI
7
 minutes to read
October 10, 2024

Project Management: The Key to Balancing Flexibility and Constraints

Hsinyu Ko's Key Insights on Balancing Flexibility and Constraints in Project Management
6
 minutes to read
October 7, 2024

Sourcing Remote IT Talents by Barbora Thornton, COO in Moravio

Tips, Challenges, and Why It's the Right Choice

Got a project in mind? Tell us about it.

We help startups, IT companies and corporations with digital products.

Write a Message

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We will answer as soon as possible.
Your information is safe with us.
We are happy to answer all your questions!

Book a Meeting

Jakub Bílý

Head of Business Development
Do you want to talk to us directly? Book a meeting with Jakub from business development.
Book a Meeting