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

关于MDK拉取RTSP码流延迟大的问题 #79

Open
ShenYuan-sean opened this issue Dec 5, 2022 · 3 comments
Open

关于MDK拉取RTSP码流延迟大的问题 #79

ShenYuan-sean opened this issue Dec 5, 2022 · 3 comments

Comments

@ShenYuan-sean
Copy link

我在QT环境下面测试了MDK RTSP的延迟,对比了VLC/FFMPEG/QGC 框架。VLC的延迟大概在4秒左右,QGC可以低至0.9s,但是MDK设置FFMPEG作为解码器的延迟大概在2.5s左右。我设置了如下参数:
setVideoDecoders({"FFmpeg"})
SetGlobalOption("avformat", "fflags=+nobuffer:analyzeduration=10000:probesize=1000:fpsprobesize=0:avioflags=direct");
setBufferRange(0, 1000, true);

不知道还有没有其他设置选项可以进一步降低延迟?

@wang-bin
Copy link
Owner

wang-bin commented Dec 5, 2022

还没有。QGC是什么?

@ShenYuan-sean
Copy link
Author

ShenYuan-sean commented Dec 5, 2022 via email

@wang-bin
Copy link
Owner

wang-bin commented Jun 1, 2024

https://github.com/wang-bin/mdk-sdk/wiki/Typical-Usages#low-latency-live-stream

需要提供带时间的日志判断哪里耗时了。./glfwplay -logfile rtsp.log -log all -ffmpeg.log debug -buffer 0+10000 -avformat.fflags nobuffer -avformat.fpsprobesize 0 -avformat.analyzeduration 100000 -avformat.rtsp_transport tcp

我局域网里测一台电脑ffmpeg+zlmediakit推流一台播放延迟在1s内

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants