GStreamer Examples using Software Filters¶
The examples/gstreamer/filters/
folder contains different examples showing how to use GStreamer combining both Xilinx accelerated functions and software filters.
Environment Setup¶
The Xilinx Video SDK examples can be found in the
/opt/xilinx/examples/u30
folder of your system. If this folder is not present, first make sure your package management client points to the remote package repository for the Xilinx Video SDK. Then install thexilinx-alveo-u30-examples
package:Ubuntu
sudo apt-get install xilinx-alveo-u30-example
RHEL and Amazon Linux 2
sudo yum install xilinx-alveo-u30-example
Configure the environment to use the Xilinx Video SDK:
source /opt/xilinx/xcdr/setup.sh
Video Rotation¶
Example script: examples/u30/gstreamer/filters/01_rotate_video.sh
This example accepts an 8-bit, YUV420, pre-encoded h264 file and will send the rotated, encoded h.264 output to /tmp/xil_rotate_<N>.mp4 at a rate of 8Mbps.
Logo Overlay¶
Example script: examples/u30/gstreamer/filters/02_logo_overlay.sh
This example accepts an 8-bit, YUV420, pre-encoded h264 file and an image file (“logo”). It will scale the logo to 500x100, place it 16 pixels right and 16 pixels down from the top-left corner of the output video file, which will be an encoded h.264 output saved to /tmp/xil_logo_overlay.mp4 at a rate of 8Mbps.
Crop and Zoom¶
Example script: examples/u30/gstreamer/filters/03_crop_zoom.sh
This example accepts an 8-bit, YUV420, pre-encoded h264 file and will crop a 300x200 sized section of the original video. The section’s top left corner begins at 20 pixels to the right, and 10 pixels down from the top-left corner of the original video. The output video is encoded in 8Mbps, and is saved to /tmp/xil_crop_zoom.mp4
Video Composition¶
Example script: examples/u30/gstreamer/filters/04_multi_comp.sh
This example accepts 4x 8-bit, YUV420, pre-encoded h264 files of equal dimensions, and will create an output 2x2 composite video which will be an encoded h.264 output saved to /tmp/xil_2x2_composite.mp4 at a rate of 8Mbps. The output resolution will be equal to the original input.