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.7k stars 5.38k forks source link

vlc obtains the stream from srs, initially with a delay of 5 seconds, which then decreases. I want to reduce the delay from the beginning. #1306

Closed FreshLuoBoGan closed 5 years ago

FreshLuoBoGan commented 5 years ago

TRANS_BY_GPT3

FreshLuoBoGan commented 5 years ago

Currently, I am using RTMFP to stream from my camera to SRS and I am retrieving the SRS video through VLC. I have configured the minimum latency settings in the conf file, which results in a 5-second delay in the first 5 minutes. Within the next 5 minutes, the delay gradually decreases, and after 5 minutes, the delay is reduced to 1 second. How should I go about troubleshooting this issue? (I am using the min.delay.com configuration)

TRANS_BY_GPT3

FreshLuoBoGan commented 5 years ago

The server is set up in the intranet, with a coding delay of less than 1 second. This is because after 5 minutes, the delay is less than 1 second.

TRANS_BY_GPT3

FreshLuoBoGan commented 5 years ago

Hehe, self-answer, with the help of people in the group, played through SRSplayer, and completed within a delay of 1 second.

TRANS_BY_GPT3

redknotmiaoyuqiao commented 5 years ago

This should be the reason why VLC initially has a higher frame buffering. You can try watching it on the website.

http://www.ossrs.net/srs.release/trunk/research/players/srs_player.html?server=192.168.1.170&vhost=192.168.1.170

TRANS_BY_GPT3

stylite1024 commented 5 years ago

Hello, may I ask how you push RTMP to SRSr? I am also working on this and have been trying for a long time, but still haven't figured it out.

TRANS_BY_GPT3

lidedongsn commented 5 years ago

Player has cache

TRANS_BY_GPT3

FreshLuoBoGan commented 5 years ago

Hello, may I ask how you push RTMP to SRSr? I have been working on this for a long time, but I still haven't figured it out.

I am using the librtmp library for pushing the stream. You can first download OBS software and try streaming to SRS to see if it works, and then you can try with your own code.

TRANS_BY_GPT3

FreshLuoBoGan commented 5 years ago

The player has a cache. I tried reducing the VLC cache, but it didn't work. Any suggestions on how to use VLC?

TRANS_BY_GPT3

FreshLuoBoGan commented 5 years ago

I think the reason for VLC initially buffering more frames is because of the cache. You can try watching it on a webpage.

http://www.ossrs.net/srs.release/trunk/research/players/srs_player.html?server=192.168.1.170&vhost=192.168.1.170

I tried reducing the VLC cache, but it didn't work. Do you have any suggestions for using VLC?

TRANS_BY_GPT3

lidedongsn commented 5 years ago

Hello, may I ask how you push RTMP to SRSr? I have been working on this for a long time, but I still can't figure it out.

I used the librtmp library for pushing the stream. You can first try using OBS software to see if you can push the stream to SRS, and then try your own code. It is better to use srs-librtmp directly.

TRANS_BY_GPT3

FreshLuoBoGan commented 5 years ago

I didn't know about SRS at first, but later I researched about it and only then did I know about SRS.

TRANS_BY_GPT3

winlinvip commented 5 years ago

VLC player has a delay, please switch to another player.

TRANS_BY_GPT3

winlinvip commented 5 years ago

@lidedongsn 👍

FreshLuoBoGan commented 5 years ago

Where can I find the source code for @lidedongsn's srs-librtmp?

TRANS_BY_GPT3

lidedongsn commented 5 years ago

Where can I find the source code for srs-librtmp?

https://github.com/ossrs/srs/blob/master/trunk/src/libs/srs_librtmp.hpp

TRANS_BY_GPT3

winlinvip commented 3 years ago

srs-librtmp is no longer supported. Please use FFmpeg or WebRTC for client libraries.

TRANS_BY_GPT3