I want to crop video frame by using nvvideoconvert-pligin，i had test it by set “src-crop”，but what it got was the source data.How to crop video-frame by using nvvideoconvert-pligin?
gst-launch-1.0 nvarguscamerasrc sensor-id=0 num-buffers=1 ! ‘video/x-raw(memory:NVMM), width=4032, height=3040, format=(string)NV12, framerate=21/1’ ! nvvidconv ! ‘video/x-raw, width=4032, height=3040, format=(string)NV12’ ! nvvideoconvert src-crop=“0:0:1920:1080” ! filesink location=a.YUV -e
It does seem to have been cut out,but it output the sourcedata buffer size.How can it directly output the actual size of the buffer of the cropped image?
You may try:
gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 bufapi-version=1 num-buffers=1 ! 'video/x-raw(memory:NVMM),format=NV12,width=4032,height=3040,framerate=21/1' ! nvvideoconvert src-crop="0:0:640:480" ! 'video/x-raw,width=640,height=480,pixel-aspect-ratio=1/1' ! filesink location=test.NV12
Thank you very much,you solved my problem!
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.