Skip to content

shlegelal/AndroidStreamComparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AndroidStreamComparison

Codacy Badge

Server Known Vulnerabilities
Player Known Vulnerabilities

Comparison of streaming libraries for Android with low latency.

Goal

Give an overview of existing protocols for live-streaming and libraries for android. Design a system of two smartphones, one of which transmits live video from its camera and the other receives it.

Overview

Review protocols

The following protocols for stream transmission over the network are considered:

  • Protocols work on TCP:

    • RTMP
    • HTTP and related HLS, DASH и MPEG-DASH
  • Protocols work on UDP

    • Implementing TCP reliability at the application layer:

      • SRT
      • RTMFP
    • Protocol works on RTP:

      • RTSP
  • Protocol works on SCTP:

    • WebRTC
  • Protocols not included in the list:

    • FTL - the server-side implementation of Mixer’s FTL protocol is proprietary and closed-source as of this writing.

Protocols

Secure and reliable protocols (RTMP, HTTP, SRT, RTMFP, WebRTC) will have inherently higher latency than UDP-based protocols. Therefore, we will only consider RTSP.

Review RTSP servers

The following libraries were found:

Excluded from consideration:

Review RTSP players

Players base on ffmpeg:

Players base on libvlc

Excluded from consideration:

Comparison method

Devices

  1. Monitor with centi seconds clock (i.e. clock)
  2. Android phone with RTSP server installed (Server)
  3. Android phone with RTSP player installed (Player)
  4. Camera (for measurements)

Processing video recordings

Run the script to take out the frames. This script takes frames exponentially. Then we process the images and make graphs.

Error calculation

For my experiments I took the following devices

  • Monitor with a fps equal to 60
  • Android Samsung Galaxy S10e as Server
  • Android Galaxy S10 Lite as Player
  • Samsung Galaxy Tab S6 Lite camera with fps equal to 30

Stand

The error of the Server and of the Player with a fps of 30 will be up to 4 centi seconds, 8 centi seconds in total. And given the fps of the camera, the latency counting error should not be more than 12 centi seconds.

Results

The following VLC commands affect the latency:

  • network-caching network-caching
  • rtsp-caching rtsp-caching
  • clock-jitter clock-jitter
  • clock-synchro clock-synchro

We managed to reach a latency of less than 0.4 second Result

About

Comparison of streaming libraries for Android with low latency

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published