I was currently trying to work with variable streaming speed with deepstream. I was able to set drop-frame-interval per source and when I ran on the recorded video. The app ran as expected. One stream getting processed early and the other a bit late. However when running the same on the nano causes the display to be stuck. Any idea as to how to fix this issue?
The log I get on the terminal,
WARNING from element nvvideo-renderer: A lot of buffers are being dropped.
Warning: A lot of buffers are being dropped.
But when running the same on a Jetson nano this happens with a pre recorded video also. Any idea as to how to fix this?
Here I am setting the drop-frame-interval param to streams other than 0, i.e if I run 3 streams, I get I’m dropping frames on 1 and 2 by checking the boolean src_res.
And I faced the same issue when I ran the test3 app with 3 sources, I see the video getting stuck in between but on two video sources it works fine. The same when run on three streams was causing the same issue
And on rtsp, immediately as the display opens up I can see the frame number getting displayed on the logs but it was always stuck.
Hi @Danell, I tried the above patch and it didn’t seem to fix the issue, here are the steps I followed,
cd Linux_for_Tegra/source/public/gst-v4l2/
patch < ~/Downloads/0001-gstv4l2dec-Fix-high-CPU-usage-in-drop-frame.patch
make
sudo make install
I had removed the older .so file and when I ran the above it generated a new so file in the gst-plugins folder. And compiled and ran the test3 app with drop-frame-interval (same code changes as listed above) and I see the video stutter. Any idea as to how to proceed?
@Danell, I’m not adding dynamic sources on runtime. Yes I did replace the libgstnvvideo4linux2.so file. So far I’m testing on a dgpu machine not a nano. Hence I replaced the file in
But that didn’t change anything. Could you please give it a try on your end and see if it works?
Apart from this, regarding the drop-frame-interval, I also did give another thing a try, I modified few lines in deepstream_test3_app.c, Here’s the modified segment,
I made the above change and I did not see the video rendering stutter on either nano or the dgpu device. But with this I did come across another thing on the nano, usually on a nano a single stream processes at 24-30(or higher) fps. But with 4 streams, out of which 3 streams were set to drop 20 frames on them and the other at full fps, when I ran it I saw a lag which was getting accumulated. But mathematically in terms of processing, it should ideally be processing 24(stream-0) + 1 or 2 fps on other sources accumulating to 30fps. But the processing wasn’t that much causing a lag. Any idea on this?
So far I’ve tried two different solutions for the drop-frame-interval. It would really help if either one works.
Hi @Danell, when the same modifications were done on the nano, I was expecting the the source0 to process more number of frames and run smoothly and the other 3 streams to process as though the frames were missing. While the latter scenario of the frames missing (due to drop-frame-interval is true) but the source 0 is still running slower. Or is it different on your end?
Hi,
It looks to be expected since nvstreammux collects frames from each source and make into surface list. If the sources are not in identical frame rate, you will see some sources end and the other sources are running still.
@DaneLLL, I had a doubt regarding this. So According to this fix, the first source shouldn’t the first source run smoothly and process a lot of frames and there there shouldn’t be any lag which should build up right??