Search code examples
flutterdartvideo-streamingagora.io

What is the difference between agora and mux ? And what is the best way for streaming live videos in flutter?


I want to create an app for streaming live videos with flutter , so I do some research to do this and I found SDK called mux and another called agora , so the question here what is the difference between mux and agora ? What is the best way for streaming live videos in flutter ? And is there another SDK for this purpose ?


Solution

  • Mux and Agora are both video streaming services but they use two different underlying technologies to deliver the video streams.

    Mux at its core is a CDN provider, which is great for playing back pre-recorded video files. Mux uses traditional RTMP input and HLS streaming for live video. This makes it similar to using YouTube Live and you will see about 3-7 seconds of delay from the time the video frame is broadcast to the time it is viewed by the audience user.This tech is fairly common and I would recommend taking a look at these YouTube videos that explain the concept (Live Streaming Architecture: https://youtu.be/RvsaosnEHWc & What is RTMP: https://youtu.be/gL-yqay_-D4)

    Agora at its core is a global virtual network that is optimized for the live video and uses a proprietary UDP protocol. The optimizations refer to the network's smart routing, which analyzes the network traffic globally and ensures UDP packets are delivered with minimal latency. With Agora's service the delay is much lower around 250-500ms and up to 750ms to 1s depending on the users' network connections.

    Agora has a Flutter package for the core SDK, but there is also a low-code version Flutter UIKit, which uses the core SDK package, but also includes the logic for building the video view, so you don't have to worry about setting up the UI.

    Agora Flutter UIKit: https://pub.dev/packages/agora_uikit Or if you want to build your own UI, check out the Agora Flutter Quickstart Guide: https://www.agora.io/en/blog/adding-live-interactive-video-streaming-using-the-agora-flutter-sdk/

    Disclaimer I'm a Developer Evangelist for Agora and the DevRel team built and maintain the Agora Flutter UIKit.