Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
T4
• DeepStream Version
5.0
• JetPack Version (valid for Jetson only)
NA
• TensorRT Version
7.0.0.11
• NVIDIA GPU Driver Version (valid for GPU only)
440.64.00
• Issue Type( questions, new requirements, bugs)
I have the following code:-
nvvidconv = Gst.ElementFactory.make("nvvideoconvert", "nvvideoconvert")
nvvidconv.set_property('src-crop', "473:172:179:208")
print(nvvidconv.get_property('src-crop'))
This strangely prints: 473:208:179:208
nvvidconv = Gst.ElementFactory.make("nvvideoconvert", "nvvideoconvert")
nvvidconv.set_property('src-crop', "448:273:243:172")
print(nvvidconv.get_property('src-crop'))
This also strangely prints 448:172:243:172
.
- Why does this happen?
- Another strange thing is – if I add a capsfilter with a width and height specification of 224x224 right after the nvvideoconvert, it does not throw any errors even though the output width&height of nvvideoconvert are obviously not 224x224. Why is that?
- Also is there some documentation of what dst-crop does exactly?
Yes, there is a bug with get_property for nvvideoconvert src-crop property, but set_property is correct. We will fix the bug later.
What does this mean?
No. There is no document, but the meaning is clear, it is to do the crop on the output video or image.
I mean to say: the width and height as expressed in src-crop are clearly 243 and 172. Now if I add a capsfilter after the nvvideoconvert and set the caps property to 224x224, I was assuming that there should be an error in pipeline setup (not negotiated or similar error). But there is no error. Does that mean that nvvideoconvert will first do the crop, take the 243x172 image and convert it to a 224x224 image so that the caps does not fail negotiation? Or caps is only enforced approximately and a 224x224 caps allows images that are close to that range but if it gets a 1280x720 image from nvvideoconvert it will throw an error.
No. There is no document, but the meaning is clear, it is to do the crop on the output video or image.
nvvideoconvert receives a frame, and it crops that frame using the src-crop value and sends it out. Say it receives a 1280x720 frame, uses a src-crop value of “448:273:243:172” to generate an image of 243x172. Now what does dst-crop actually do? Does it take this 243x172 image and further crop it? That does not make much sense because the same could have been directly expressed in the src-crop itself. So my question is what is the input to the dst-crop operation? Is it the original image or the src-cropped image or something else?
You can refer to the latest document of DS5.1. Gst-nvvideoconvert — DeepStream 6.1.1 Release documentation
The output video resolution is decided by downstream element in the pipeline, dst-crop does not decide the output resolution.
Thanks @Fiona.Chen. This helps.