unosquare / ffmediaelement

FFME: The Advanced WPF MediaElement (based on FFmpeg)
https://unosquare.github.io/ffmediaelement/
Other
1.18k stars 244 forks source link

Reduce latency for live streams enhancement #478

Closed cdslily closed 4 years ago

cdslily commented 4 years ago

Reduce latency for live streams enhancement

Issue Categories

Version Information

Steps to Reproduce

1、build solution and run sample ,input my rtsp server address. 2、it load slowly about 5s,and it is show delay of about 2 seconds。 3、compare with vlc,vlc just delay adout 700ms。(default delay about 1.7s,but i reduce the network cache (100ms)and other cache 0。 source is not probleam as i use other sample (https://github.com/greenjim301/rtsp) test it,It's doing great delay about 200 ms and loading quickly。

Expected Results

grab bag data。

OPTIONS rtsp://192.168.88.83:8554/channel=0 RTSP/1.0 CSeq: 1 User-Agent: Lavf58.29.100

RTSP/1.0 200 OK CSeq: 1 Date: Mon, Jan 13 2020 03:27:09 GMT Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER

DESCRIBE rtsp://192.168.88.83:8554/channel=0 RTSP/1.0 Accept: application/sdp CSeq: 2 User-Agent: Lavf58.29.100

RTSP/1.0 200 OK CSeq: 2 Date: Mon, Jan 13 2020 03:27:09 GMT Content-Base: rtsp://192.168.88.83:8554/channel=0/ Content-Type: application/sdp Content-Length: 533

v=0 o=- 1578886029027988 1 IN IP4 192.168.88.83 s=H.264 Video, streamed by the EasyIPCamera v1.3.16.1206 i=channel=0 t=0 0 a=tool:LIVE555 Streaming Media v2016.04.01 a=type:broadcast a=control:* a=range:npt=0- a=x-qt-text-nam:H.264 Video, streamed by the EasyIPCamera v1.3.16.1206 a=x-qt-text-inf:channel=0 m=video 0 RTP/AVP 96 c=IN IP4 0.0.0.0 b=AS:1048576 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=640028;sprop-parameter-sets=Z2QAKKy0A8ARPywgAAADACAAAAUR4wZU,aO88sA== a=control:track1 SETUP rtsp://192.168.88.83:8554/channel=0/track1 RTSP/1.0 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 CSeq: 3 User-Agent: Lavf58.29.100

RTSP/1.0 200 OK CSeq: 3 Date: Mon, Jan 13 2020 03:27:09 GMT Transport: RTP/AVP/TCP;unicast;destination=192.168.88.88;source=192.168.88.83;interleaved=0-1 Session: 6CC52252;timeout=65

PLAY rtsp://192.168.88.83:8554/channel=0/ RTSP/1.0 Range: npt=0.000- CSeq: 4 User-Agent: Lavf58.29.100 Session: 6CC52252

RTSP/1.0 200 OK CSeq: 4 Date: Mon, Jan 13 2020 03:27:09 GMT Range: npt=0.000- Session: 6CC52252

Best Regards!