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

how to improve the latency sourcing video with rtsp? #56

Closed
D7823 opened this issue Dec 28, 2019 · 7 comments
Closed

how to improve the latency sourcing video with rtsp? #56

D7823 opened this issue Dec 28, 2019 · 7 comments

Comments

@D7823
Copy link

D7823 commented Dec 28, 2019

Hi all,

I try to use this driver to stream video through rtsp for a SLAM task. But when I run the testing python script to test the video source, I find the video has a big latency, like about 10 seconds which is intolerable to my project. Is there any method to narrow the latency?

Thanks in advance.
Duncan

@furushchev
Copy link
Collaborator

Could you please check where the latency comes from?
If the latency comes from the node from this repository, then you can check by writing plain opencv code and estimate the time to decode the received video.
I guess the latency comes from encoding and decoding video stream.

@D7823
Copy link
Author

D7823 commented Dec 29, 2019

I think it might do with the python test script so I directly run a launch file modified to my rtsp source, but the latency has no improvement.
Then, I switch to another tool called MPlayer to source the rtsp livestream and this time, the latency is greatly improved to <0.5s. So it might do with this repository or the image-view package?

Also, there pops out an error message "(image_raw: 15196) g_object_unref: assertion 'G_IS_OBJECT (object)' failed".
Would it be related?

@machinekoder
Copy link
Contributor

I'm also experiencing significant lag with this node. I'm not sure how I can determine if it comes from the camera or the OpenCV decoding. Any ideas on how to troubleshoot this problem?

@awesomebytes
Copy link
Member

awesomebytes commented Jan 28, 2020 via email

@awesomebytes
Copy link
Member

Hey @machinekoder or @D7823 , did you find a way to get less latency on the rtsp stream? Either with this node or a different one?

Someone else may be having a similar issue in #64 so it would be nice to see how to deal with this situation (and maybe improve it in this project if there is a way).

@D7823
Copy link
Author

D7823 commented Apr 26, 2020

My case may be a bit different. Still using this node, I directly connected two machines through the ethernet cable and setting up the static IP addresses. With this setting, I didn't measure the actual latency but at least no obvious latency observed by bare eyes.
Hope it helps.

@awesomebytes
Copy link
Member

@D7823 Thanks for the update. It makes a lot of sense that just reducing network delay will make things work more smoothly.

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

4 participants