Results 1 to 8 of 8

Thread: Minimizing RTMP latency

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Moderator VJ's Avatar
    Join Date
    Mar 2001
    Location
    Belgium/Poland
    Posts
    9,556

    Default Minimizing RTMP latency

    Hello,

    Ok, strange question (but you are used to such questions from me).

    I have an app on the phone that provides an RTMP stream (but no settings available). I would like to receive this stream on my computer, so I have been looking at different RTMP servers. I tried MistServer and OSSRS (in docker).

    Both work fine, but there is quite some latency. Even in low-latency mode in OSSRS, I cannot seem to get it below 4 seconds (with MistServer, it seems like 15-20 seconsd)... theoretically it should be possible I think to get it downto 0.8.

    There are no settings on the phone app, apart from the rtmp server url to which it pushes the stream. But perhaps there are better softwares that can be used to ingest the stream? Any thoughts?

    Thanks!
    Last edited by VJ; 29th June 2020 at 01:52.
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

  2. #2
    Super MURCer UtwigMU's Avatar
    Join Date
    Jul 2002
    Location
    Sin City
    Posts
    5,182

    Default

    Are they on same network? What is the network like?

    What DNS do both use? Is there DNS on network?

  3. #3
    Moderator VJ's Avatar
    Join Date
    Mar 2001
    Location
    Belgium/Poland
    Posts
    9,556

    Default

    Everything is on my lan (1 GBit, phone on fast wifi).

    In the phone I specify the target as rtmp://myserver/live/livestream. In OSSRS (on Docker) I receive this stream - connections happens instantaneously) and in the OSSRS webinterface I can preview the stream. By setting the configuration of OSSRS to realtime, I managed to get the latency to around 0.5 s... Not sure if the protocol allows me to push it down further though. I tried MistServer natively on the computer, but that one has even bigger latencies.

    I though that an RTMP server on the phone might be interesting (then I could have the app push to localhost), but haven't found any yet...
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

  4. #4
    Super MURCer UtwigMU's Avatar
    Join Date
    Jul 2002
    Location
    Sin City
    Posts
    5,182

    Default

    First google result for RTMTP showed developed by Macromedia, so it seems maybe dated protocol.

  5. #5
    Moderator VJ's Avatar
    Join Date
    Mar 2001
    Location
    Belgium/Poland
    Posts
    9,556

    Default

    It is quite an old protocol, but still commonly used to send livestreams to servers (usable e.g. on Facebook or Google to go live). As I gather, it should be possible to get the latency lower than 0.5s, and some (corporate) rtmp servers advertise that they can, but I have not found a free solution that gives me a lower latency. One issue may be that the app on the phone has no settings at all, which may prevent some settings on the phone-side that would improve it.
    So far, the best I've found is OSSRS, which nicely runs on Docker (don't have a native Linux machine to test if that would be better), and that one gives me a solid stream without interruptions but with approx. 0.5s latency. Not bad if you want to livestream something, but still too much if that were to be used as the video side of a 2-way communication...
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

  6. #6
    Super MURCer UtwigMU's Avatar
    Join Date
    Jul 2002
    Location
    Sin City
    Posts
    5,182

    Default

    Quote Originally Posted by VJ View Post
    It is quite an old protocol, but still commonly used to send livestreams to servers (usable e.g. on Facebook or Google to go live). As I gather, it should be possible to get the latency lower than 0.5s, and some (corporate) rtmp servers advertise that they can, but I have not found a free solution that gives me a lower latency. One issue may be that the app on the phone has no settings at all, which may prevent some settings on the phone-side that would improve it.
    So far, the best I've found is OSSRS, which nicely runs on Docker (don't have a native Linux machine to test if that would be better), and that one gives me a solid stream without interruptions but with approx. 0.5s latency. Not bad if you want to livestream something, but still too much if that were to be used as the video side of a 2-way communication...
    Docker shouldn't have that much overhead though trying natively is beneficial.

  7. #7
    Moderator VJ's Avatar
    Join Date
    Mar 2001
    Location
    Belgium/Poland
    Posts
    9,556

    Default

    It does not seem cpu limited, so I guess it is rather due to the protocol than to hardware limits...

    Just un case you're curious: the software is the app for the gimbal I got.. The software is not bad and has interesting features such as tracking and subject following. And it can push an rtmp stream to any server. So I thought it could be useful as a webcam feed (esp. the tracking feature), but with 0.5s latency, it is not so good. May still be suitable for teaching though, as it is more of a one way connection.

    But the gimbal does not need other software so it works fine with other software, but of course that software cannot control the gimbal for following a subject. Still, just had my first Google Meet with it and it is very comfortable (good position).
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

  8. #8
    Moderator VJ's Avatar
    Join Date
    Mar 2001
    Location
    Belgium/Poland
    Posts
    9,556

    Default

    I will still try with Antmedia ( https://antmedia.io ) as they advertise "ultra-low latency". For the community version, they claim 8-12s, and for the paid enterprise version below 0.5s. But they are end-to-end latencies, maybe the community version will not do too bad on a lan either...
    Yesterday I did not manage to reach my previous 0.5s latency using OSSRS and it was again around 15s (everything in same settings).

    But I guess I'll leave it for now as I have other more urgent things.
    pixar
    Dream as if you'll live forever. Live as if you'll die tomorrow. (James Dean)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •