NVIDIA VPI GStreamer Plug-in/Examples/Videoscale: Difference between revisions
Line 38: | Line 38: | ||
The following example pipe will help you rescale the input video stream from 1080P to 720P. You may modify the properties values according to the information above. | The following example pipe will help you rescale the input video stream from 1080P to 720P. You may modify the properties values according to the information above. | ||
*Unified memory | |||
<source lang=bash> | <source lang=bash> | ||
gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,width=1920,height=1080 ! vpiupload ! vpivideoscale ! "video/x-raw(memory:VPIImage),width=1280,height=720" ! vpidownload ! fakesink | gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,width=1920,height=1080 ! vpiupload ! vpivideoscale ! "video/x-raw(memory:VPIImage),width=1280,height=720" ! vpidownload ! fakesink | ||
</source> | |||
*NVMM memory | |||
<source lang=bash> | |||
gst-launch-1.0 videotestsrc is-live=true ! nvvidconv bl-output=false ! video/x-raw(memory:NVMM),width=1920,height=1080 ! vpiupload ! vpivideoscale ! "video/x-raw(memory:VPIImage),width=1280,height=720" ! vpidownload ! fakesink | |||
</source> | </source> | ||
Revision as of 16:32, 5 May 2022
GstVPI |
---|
GstVPI Basics |
Getting Started |
Examples |
Performance |
Contact Us |
Introduction
The vpivideoscale element applies the Rescale algorithm in order to rescale video from one resolution to another using VPI.
Element properties
- backend
Backend to use to execute VPI algorithms. Available options:
- cpu: CPU backend
- cuda: CUDA backend
- pva: PVA backend (Xavier only)
- vic: VIC backend
Flags: readable, writable
Default: "cuda"
- interpolator
Interpolation method to be used. Available options:
- nearest: Nearest neighbor interpolation
- linear: Fast linear interpolation
- catmull: Fast Catmull-Ron cubic interpolation
Flags: readable, writable
Default: linear
- boundary
How pixel values outside of the image domain should be treated. Available options:
- zero: All pixels outside the image are considered 0
- clamp: Border pixels are repeated indefinitely
- reflect: Pixels are reflected like this edcba|abcde|edcba
- mirror: Pixels are mirrored like this dedcb|abcde|dcbab
Flags: readable, writable
Default: "zero"
Example
The following example pipe will help you rescale the input video stream from 1080P to 720P. You may modify the properties values according to the information above.
- Unified memory
gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,width=1920,height=1080 ! vpiupload ! vpivideoscale ! "video/x-raw(memory:VPIImage),width=1280,height=720" ! vpidownload ! fakesink
- NVMM memory
gst-launch-1.0 videotestsrc is-live=true ! nvvidconv bl-output=false ! video/x-raw(memory:NVMM),width=1920,height=1080 ! vpiupload ! vpivideoscale ! "video/x-raw(memory:VPIImage),width=1280,height=720" ! vpidownload ! fakesink