Skip to content
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

webrtc live streaming, rtmp playback, video buffering is noticeable #2720

Closed
jamken opened this issue Nov 7, 2021 · 2 comments
Closed

webrtc live streaming, rtmp playback, video buffering is noticeable #2720

jamken opened this issue Nov 7, 2021 · 2 comments
Assignees
Labels
TransByAI Translated by AI/GPT.

Comments

@jamken
Copy link
Contributor

jamken commented Nov 7, 2021

Description'

Please ensure that the markdown structure is maintained.

Currently, the rtc2rtmp function is being used, but during actual testing, there is a consistent issue of stuttering in rtmp playback. Analyzing the timestamps of the rtmp stream's audio and video frames, it is observed that SRS (Streaming Relay Server) periodically loses a portion of video frames, resulting in a period of time where only audio frames are present without any video frames. After 1 to 2 seconds, the video frames reappear.

Additional information:

  1. If rtc playback is used, the video is continuous.
  2. The audio frames are consistently continuous without any stuttering.

Please ensure that the markdown structure is maintained.

  1. SRS version: xxxxxx

Please ensure that the markdown structure is maintained.

4.0.161

  1. The log of SRS is as follows:

Please ensure that the markdown structure is maintained.

The log is in the attachment.

Please ensure that the markdown structure is maintained.

  1. The configuration of SRS is as follows (Config):

Please ensure that the markdown structure is maintained.

listen 1935;
pid srs.pid;
srs_log_tank file;
srs_log_level trace;
srs_log_file ./logs/srs.log;
max_connections 1000;
da
[srs.txt](https://github.com/ossrs/srs/files/7491698/srs.txt)
emon off;
asprocess on;
[srs.txt](https://github.com/ossrs/srs/files/7491591/srs.txt)

http_server {
    enabled         on;
    listen          0.0.0.0:1936;
    dir             ./html;
}

http_api {
    enabled         on;
    listen          0.0.0.0:1985;
    crossdomain     on;
}

rtc_server {
    enabled on;
    listen 8000;
    candidate *;
}

vhost __defaultVhost__ {
    rtc {
        enabled on;
        nack on;
        twcc on;
        rtc_to_rtmp on;
        pli_for_rtmp 2.0;
    }

    hls {
        enabled on;
        hls_fragment 1.5;
        hls_window 20;
        hls_td_ratio 1.5;
        hls_path /opensight/nginx/html/hls_srs/hls_srs;
        hls_m3u8_file   [app]/[stream].m3u8;
        hls_ts_file     [app]/[stream]-[seq].ts;
        hls_wait_keyframe on;
        hls_dispose     20;
    }

    http_hooks {
        enabled on;
        on_publish http://127.0.0.1:1938/api/srsproxy/v1/srscbk;
        on_unpublish http://127.0.0.1:1938/api/srsproxy/v1/srscbk;
        on_play http://127.0.0.1:1938/api/srsproxy/v1/srscbk;
    }

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

    play{
        gop_cache       on;
        queue_length    10;
        mw_latency      20;
        reduce_sequence_header  on;
        time_jitter     off;
        mix_correct     off;
    }
        
    min_latency     on;
    tcp_nodelay     on;
}

Replay

Please ensure that the markdown structure is maintained.

How to replay bug?

Please ensure that the markdown structure is maintained.

Steps to reproduce the bug:

  1. Start WebRTC streaming with Chrome, using 1080P video.
  2. Use RTMP to pull the stream (e.g., using VLC).
  3. Observe continuous audio but video stuttering and jumping.

Expected behavior:

The video and audio should both stream smoothly without any stuttering or jumping.

RTMP pulling stream, both audio and video should be relatively smooth.

TRANS_BY_GPT3

@jamken
Copy link
Contributor Author

jamken commented Nov 7, 2021

srs.txt

@winlinvip
Copy link
Member

Fixed by #2721

@winlinvip winlinvip changed the title webrtc推流,rtmp播放,视频卡顿明显 webrtc live streaming, rtmp playback, video buffering is noticeable Jul 29, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
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

3 participants