Closed summm closed 1 year ago
you need flush the remaining frames from decoder, to get the latest frame or any frame for that matter, you could use Seek functionality from demuxer
@rnaskulwar Thank you very much for your reply. I am testing streaming media for live streaming. So the decoding speed is always faster than obtaining new frame image data from the network. So it is very strange that when two programs are opened on the same computer at the same time, why is the video displayed after vpf decoding always slower than the other by tens of milliseconds. In this case, the seek function should not be used, right? I have always thought that there is a cache mechanism that causes such a delay of 3-6 frames. So I tested max_delay and bufsize, but it seems that this is irrelevant.
yes, due to B frames (inter frame dependency) there is latency of 2-3 frames, Could you elaborate on the two applications being run, If my understanding is correct, you are running VPF for streaming media and a video from disk. VPF decode for streaming is slower in your case?
Hi @summm
I recommend you to build VPF with NPP support and examine timeline like it's described here: VPF-Performance-analysis.
Also, take a closer look at the "Actual decoding latency" section.
@rnaskulwar The media source for the test is live streaming media, such as links like https://www.testtest.test/test.flv. It is not reading files on the hard disk. At any time when I take a screenshot, they will have different degrees of time difference, but using PyNvCodec to decode is the slower one.The way they are displayed has been converted to rgb numpy arrays and displayed through opencv, which should be the same, but I measured the time for getframe part, VPF is much faster than the other, so I really feel very strange. Thank you @RomanArzumanyan, I am reading it, which is a bit difficult for beginners like me to understand, but I am trying my best to understand it.
@theHamsta @gedoensmax Hello guys. Please take a closer look at this PR: #332, it may be the case.
Really strange, the decoding speed is ten times faster than the other, but with this code, the final video displayed in front of me is 50-100ms later than the other, probably a 3-6 frame delay. How can I get the latest frame of the streaming media as quickly as possible?