GStreamer
← RZ-G
<img height=100 style="float:right" src=>
Examples for RZ/G2L
Down Scaling using vspmfilter
- Below table show range of support:
Input resolution | Output scale down ratio | |
Min | 128x72 | 1 |
Max | 1920x1080 | 15 |
Following are sample commands for Up/Down Scaling with h264 Elementary Stream file.
Case of Down Scaling
gst-launch-1.0 filesrc location=./<FullHDsize_h264_file> ! h264parse ! queue ! omxh264dec ! queue ! vspmfilter outbuf-alloc=true ! video/x-raw, format=BGRA, width=1280, height=720 ! waylandsink
Case of Down Scaling (without color format conversion)
gst-launch-1.0 filesrc location=./<FullHDsize_h264_file> ! h264parse ! queue ! omxh264dec ! queue ! vspmfilter outbuf-alloc=true ! video/x-raw, width=1280, height=720 ! waylandsink
Case of Down Scaling (without color format conversion – use dmabuf)
gst-launch-1.0 filesrc location=./<FullHDsize_h264_file> ! h264parse ! queue ! omxh264dec ! queue ! vspmfilter dmabuf-use=true ! video/x-raw, width=1280, height=720 ! waylandsink
Color format conversion using vspmfilter
- Below table show color format conversion using vspmfilter:
No. | Supported color format |
1 | BGRA |
2 | BGRx |
3 | RGB16 |
4 | YUY2 |
5 | NV12 |
Following are sample commands for converting color format. Please set the output format which begin supported following “format=”.
Case of BGRA output
gst-launch-1.0 filesrc location=filename.mp4 ! qtdemux ! queue ! h264parse ! omxh264dec ! queue ! vspmfilter outbuf-alloc=true ! video/x-raw, format=BGRA ! waylandsink
Examples for RZV2L
Camera Setup
This section describes how to setup the RZV2L Camera module OV5645.
Camera Setup VGA
media-ctl -d /dev/media0 -r ;
media-ctl -d /dev/media0 -l "'rzg2l_csi2 10830400.csi2':1 -> 'CRU output':0 [1]" ;
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/640x480 field:none]" ;
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/640x480 field:none]" ;
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! waylandsink
Camera Setup 720p
media-ctl -d /dev/media0 -r ;
media-ctl -d /dev/media0 -l "'rzg2l_csi2 10830400.csi2':1 -> 'CRU output':0 [1]" ;
media-ctl -d /dev/media0 -V "'rzg2l_csi2 10830400.csi2':1 [fmt:UYVY8_2X8/1280x720 field:none]" ;
media-ctl -d /dev/media0 -V "'ov5645 0-003c':0 [fmt:UYVY8_2X8/1280x720 field:none]" ;
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! waylandsink
Down Scaling using vspmfilter
Down Scale Camera 720p video
gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! vspmfilter dmabuf-use=true ! video/x-raw, width=640, height=480 ! waylandsink
Down Scale H264 Video File
gst-launch-1.0 filesrc location=./in720p.mp4 ! qtdemux ! queue ! h264parse ! queue ! omxh264dec ! queue ! ! vspmfilter dmabuf-use=true ! video/x-raw, width=640, height=480 !
waylandsink
Create H264 Video File
This script can be run on the RZV2L
gst-launch-1.0 videotestsrc ! omxh264enc ! filesink location=./testvideo.h264
Stream H264 Video Over IP
RZV2L(Source) Device send h264 stream using RTP:
Set the IP address to the PC or device that receives the video
gst-launch-1.0 -v v4l2src device=/dev/video0 ! videoconvert ! vspmfilter dmabuf-use=true ! video/x-raw, width=640, height=480 ! queue ! omxh264enc ! queue ! rtph264pay ! queue ! udpsink host=<PC IP Address> port=5000
PC that receives h264 rtp stream:
gst-launch-1.0 -v udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosink