Skip to content

WebRTC: Streaming playback failed on the OriginCluster Push Edge node. #4323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MrYangPan opened this issue Apr 14, 2025 · 1 comment
Open
Labels
TransByAI Translated by AI/GPT.

Comments

@MrYangPan
Copy link

MrYangPan commented Apr 14, 2025

WebRTC: Streaming playback failed on the Push Edge node within the OriginCluster.
Describe the bug
In k8s, source site cluster deployment is used, where the edge node WebRTC whip pushes the stream, and then the edge node WebRTC whop pulls the stream for playback. If the stream is pushed or pulled on the same edge node, it can be played normally. If it is not on the same edge node, it cannot be played and the stream cannot be returned to the source

Version
SRS v6.0.155

To Reproduce

origin document

vhost defaultVhost {
tcp_nodelay on;
min_latency on;

cluster {
        # Generated Coworkers DNS: srs-origin-1.socs.default.svc.cluster.local:1985 srs-origin-2.socs.default.svc.cluster.local:1985
    mode            local;
    origin_cluster  on;
    coworkers       srs-origin-1.socs.default.svc.cluster.local:1985 srs-origin-2.socs.default.svc.cluster.local:1985;
    # vhost           __defaultVhost__;
}
rtc {
    enabled     on;
    bframe      discard;
    stun_timeout    120;
    dtls_role   active;
    # nack            on;
    # twcc            on;
    # rtc_to_rtmp     on;

rtmp_to_rtc off; # Enable on demand

    # keep_bframe     on;
    # pli_for_rtmp    6;
}
# hls {
#     enabled         on;
# }
play {
    gop_cache         off;
    queue_length      10;
    mw_latency        100;
}
publish {
    mr off;
    normal_timeout 60000;
}
http_remux {
    enabled     on;
    mount       [vhost]/[app]/[stream].flv;
}

}


Edge document
rtc_server {
enabled on;
listen 8000; # UDP port for WebRTC media

=== Keep TCP enabled to support fallback, or disable as needed ===

# tcp {
#     enabled on;
#     listen 80;      # TCP port for WebRTC media fallback
# }

protocol udp; # Maintain default, allowing both UDP and TCP.

  • grep -A 4 'cluster {' /usr/local/srs/conf/srs.conf
    cluster {
    # Generated Origins: 172.23.187.209:1935 172.23.187.212:1935 172.23.187.227:1935
    mode remote;
    origin 172.23.187.209:1935 172.23.187.212:1935 172.23.187.227:1935; # Populated by the script below
    # vhost defaultVhost;
  • echo '--- End of Final srs.conf ---'
    --- End of Final srs.conf ---

TRANS_BY_GPT4

@winlinvip winlinvip changed the title WebRTC:OriginCluster Push Edge node streaming playback failed WebRTC: Streaming playback failed on the OriginCluster Push Edge node. Apr 14, 2025
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Apr 14, 2025
@MrYangPan
Copy link
Author

MrYangPan commented Apr 14, 2025

Origin Document

vhost defaultVhost {
tcp_nodelay on;
min_latency on;

    cluster {
        mode            local;
        origin_cluster  on;
        coworkers       ${COWORKERS_DNS};
    }
    rtc {
        enabled     on;
        bframe      discard;
        stun_timeout    120;
        dtls_role   active;
        nack            on;
        twcc            on;
        rtc_to_rtmp     on;

rtmp_to_rtc off; # Enable as needed
keep_bframe on;
# pli_for_rtmp 6;
}
# hls {
# enabled on;
# }
play {
gop_cache off;
queue_length 10;
mw_latency 100;
}
publish {
mr off;
normal_timeout 60000;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
dvr {
enabled on;
dvr_path /usr/local/srs/objs/nginx/html/[app]/[stream].[timestamp].flv;
dvr_plan session;
dvr_wait_keyframe on;
dvr_apply all;
time_jitter full;
}
}

Edge Document

vhost defaultVhost {
tcp_nodelay on;
min_latency on;

    cluster {
        mode        remote;
        origin      ${ORIGINS}; # Populated by the script below
        # vhost       __defaultVhost__;
    }


    rtc {
        enabled     on;
        bframe      discard;
        stun_timeout    120;
        dtls_role       passive; # Edge usually acts as passive in DTLS handshake
        # nack            on;
        # twcc            on;
        rtc_to_rtmp     on;
        # rtmp_to_rtc     on;    # Enable RTMP to RTC conversion
        keep_bframe     on;
    }


    play {
        gop_cache         off;
        queue_length      10;
        mw_latency        100;
    }


    publish {
        mr off;
        normal_timeout 60000;
    }


    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
}

TRANS_BY_GPT4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

2 participants