ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.72k stars 5.28k forks source link

How to increase latency to ensure video transmission? #4010

Closed Arjen10 closed 2 months ago

Arjen10 commented 2 months ago

now I have a DJI drone pushing to SRS via RTMP, I'm sure the signal of the DJI drone is not particularly good.

With the original docker configuration, the browser client cannot play smoothly using the FLV protocol, but the VLC player can.

I have read the official website of SRS about the configuration related to GOP-Cache, but it seems that the configuration I made is not taking effect.

srs_version:  v5.0.208

I want to know if SRS has any support for increasing latency to ensure video transmission.

My configuration file, I only modified the RTMP listening port.

# docker config for srs.
# @see full.conf for detail config.

listen              9035;
max_connections     1000;
# For docker, please use docker logs to manage the logs of SRS.
# See https://docs.docker.com/config/containers/logging/
srs_log_tank        console;
daemon              off;
http_api {
    enabled         on;
    listen          1985;
}
http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}
rtc_server {
    enabled on;
    listen 8000;
    # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate
    candidate $CANDIDATE;
}
vhost __defaultVhost__ {
    hls {
        enabled         on;
    }
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
    rtc {
        enabled     on;
        # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc
        rtmp_to_rtc on;
        # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp
        rtc_to_rtmp on;
    }
}