Spherical Video PTZ/Examples/Page1

From RidgeRun Developer Wiki

Using CPU

This command generates a video test pattern, applies PTZ transformations, and resizes the output video to 1280x720 pixels for display.

gst-launch-1.0 videotestsrc pattern=0 ! "video/x-raw,width=1920,height=1080" ! rrpanoramaptz zoom=2.2 tilt=40 pan=80 ! "video/x-raw,width=1280,height=720" ! queue ! videoconvert ! autovideosink sync=false

This pipeline reads an image, applies a 2x zoom transformation, and displays the result:

gst-launch-1.0 filesrc location=sample.jpg ! jpegdec ! videoscale ! video/x-raw,width=500,height=500 ! imagefreeze ! videoconvert ! video/x-raw,format=RGBA ! rrpanoramaptz zoom=2 ! videoconvert ! autovideosink sync=false

Using cam:

gst-launch-1.0 autovideosrc ! "video/x-raw,width=1920,height=1080" ! videoconvert ! "video/x-raw,format=(string)RGBA" ! rrpanoramaptz pan=80 tilt=40 zoom=2.2 ! "video/x-raw,width=1280,height=720" ! videoconvert ! autovideosink sync=false

Using GPU

gst-launch-1.0 videotestsrc pattern=0 ! nvvidconv ! "video/x-raw(memory:NVMM),format=RGBA,width=1920,height=1080" ! rrpanoramaptz ! nvvidconv ! nvv4l2h264enc idrinterval=30 insert-aud=true insert-sps-pps=true insert-vui=true ! h264parse ! mpegtsmux ! udpsink port=1234 host=192.168.0.10