GStreamer pipelines for i.MX6 and i.MX8 with GstQtOverlay

From RidgeRun Developer Wiki


Previous: Examples/PC Index Next: Examples/Qualcomm






i.MX6 Platform

Before running the examples below, make sure you have set up the environment correctly.

export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
export QT_QPA_PLATFORM=eglfs
export DISPLAY=:0.0

Now, you are able to run the following examples:

Display a text overlay

gst-launch-1.0 videotestsrc is-live=true ! 'video/x-raw, width=640, height=480, framerate=30/1' ! queue ! imxg2dvideotransform ! \
queue ! qtoverlay qml=/main.qml ! queue ! imxeglvivsink qos=false sync=false enable-last-sample=false

Saving a video with a text overlay

gst-launch-1.0 videotestsrc is-live=true ! 'video/x-raw, width=640, height=480, framerate=30/1' ! queue ! imxg2dvideotransform ! \
queue ! qtoverlay qml=/main.qml ! queue ! imxipuvideotransform input-crop=false ! \
capsfilter caps=video/x-raw,width=640,height=480,format=NV12 ! imxvpuenc_h264 bitrate=4000 gop-size=15 idr-interval=15  ! \
capsfilter caps=video/x-h264 ! mpegtsmux alignment=7 ! queue ! filesink location=test.mp4 -e

Network streaming with a text overlay

Send stream to a host with IP address $IP

On the IMX6: video source

gst-launch-1.0 videotestsrc is-live=true ! 'video/x-raw, width=640, height=480, framerate=30/1' ! queue ! imxg2dvideotransform ! \
queue ! qtoverlay qml=/main.qml ! queue ! imxipuvideotransform input-crop=false ! \
capsfilter caps=video/x-raw,width=640,height=480,format=NV12 ! imxvpuenc_h264 bitrate=4000 gop-size=15 idr-interval=15  ! \
capsfilter caps=video/x-h264 ! mpegtsmux alignment=7 ! queue ! udpsink async=false sync=false host=$IP port=5012

On the host: video receptor

gst-launch-1.0 udpsrc address=$IP port=5012 ! queue ! tsdemux ! identity single-segment=true ! queue ! decodebin ! \
queue ! fpsdisplaysink sync=false -v

i.MX8 Platform

IMX8 examples

Before running the examples below, make sure you have set up the environment correctly.

export QT_QPA_PLATFORM=wayland
export DISPLAY=:0.0

It may be possible that you require a screen connected to your i.MX 8. It can be put completely in headless mode when enabling the framebuffer device in the kernel.

Now, you are able to run the following examples:

Save a video overlay using a video test source

gst-launch-1.0 videotestsrc is-live=1 ! "video/x-raw,width=1920,height=1080,format=RGBA" ! qtoverlay qml=main.qml ! vpuenc_h264 ! avimux ! filesink location=video.avi -e

Save a video overlay using a camera source

gst-launch-1.0 v4l2src device=/dev/video1 ! imxvideoconvert_g2d ! "video/x-raw,format=RGBA" ! qtoverlay qml=gst-libs/gst/qt/main.qml ! perf ! vpuenc_h264 ! avimux ! filesink location=video.avi -e 


Previous: Examples/PC Index Next: Examples/Qualcomm