resetting yield generator during long run
Hi, After a long duration of streaming (15-20 minutes) , I observe that latency keeps on increasing. While latency is very good in the beginning period, I suspect due to the python generator "yield" in the while loop of the "run" function , in case there is a delay due to either network speed or something else, it adds on to the latency cumulatively. So is there any way to periodically reset the python generator to ensure stream latency does go grow out of bounds?
The only way that comes to mind is to use JavaScript to set the src attribute of the image again. This should cause the stream to end and a new stream to start immediately after.
Are you referring to "src" in index.html?
The src in the img element that is the source of the stream.
Hi, I am also facing the same issue .The latency keeps on increasing after some time. I have tried updating the img src tag (using JS)periodically but still the video gets stuck.
@Codeforglory that is not a problem you can address from this side. You have to make your frame generator work faster, at a slower frame rate or with smaller image size so that it can keep up.