ossrs / srs

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

obs whip streaming does not work, dvr does not take effect, and enabling rtc_to_rtmp on cannot play flv. #3586

Closed linkewei0580 closed 1 year ago

linkewei0580 commented 1 year ago

Description

obs whip streaming

  1. dvr does not take effect, file size is 13 bytes.

  2. Enabling rtc_to_rtmp on cannot play flv.

    -rw-r--r-- 1 root root 13 Jun 16 11:01 livestream2.1686884488030.flv
  3. SRS Version: SRS/6.0.51(Bee), MIT

  4. conf

    
    dvr {
     enabled      on;
     dvr_path     /home/install/vidoes/[app]/[stream].[timestamp].flv;
     dvr_plan     session;
     #dvr_plan            segment;
     #dvr_duration        300;
     #dvr_wait_keyframe   on;
    }
    rtc_server {
    enabled on;
    listen 8000; # UDP port
    # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#config-candidate
    candidate  183.193.74.238; #$CANDIDATE;
    }

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;
nack on;
twcc on;

}


3. SRS Log:

[2023-06-16 11:01:28.031][INFO][30727][31a7l155] dvr stream livestream2 to file /home/install/vidoes/live/livestream2.1686884488030.flv [2023-06-16 11:01:28.031][INFO][30727][31a7l155] ignore disabled exec for vhost=defaultVhost [2023-06-16 11:01:28.031][INFO][30727][7813w9kq] RTC: Need PLI ssrc=5000, play=[7813w9kq], publish=[31a7l155], count=1/1 [2023-06-16 11:01:28.031][INFO][30727][7813w9kq] RTC: Need PLI ssrc=5002, play=[7813w9kq], publish=[31a7l155], count=1/2 [2023-06-16 11:01:28.031][INFO][30727][31a7l155] RTC: Request PLI ssrc=5000, play=[7813w9kq], count=1/1, bytes=12B [2023-06-16 11:01:28.031][INFO][30727][31a7l155] RTC: Request PLI ssrc=5002, play=[7813w9kq], count=1/2, bytes=12B [2023-06-16 11:01:29.058][INFO][30727][7813w9kq] update source_id=31a7l155/f0a340p2 [2023-06-16 11:01:29.059][INFO][30727][7813w9kq] RTC: Jitter rebase value=0, last=3242, distance=3242, pkt-base=0/0, correct-base=53523/56765 [2023-06-16 11:01:29.061][INFO][30727][7813w9kq] RTC: Jitter rebase value=0, last=3012418652, distance=-1282548644, pkt-base=2525107968/0, correct-base=222625516/709936200



`TRANS_BY_GPT3`
duiniuluantanqin commented 1 year ago

The rtc_to_rtmp function relies on the SR (Sender Report) in the RTCP protocol. Could you capture packets to check if OBS is sending RTCP?

linkewei0580 commented 1 year ago

Could you help me take a look? Client address: 192.168.1.107, SRS address: 192.168.1.123

whip.zip

TRANS_BY_GPT3

winlinvip commented 1 year ago

Dup to https://github.com/ossrs/srs/issues/3582