Gstreamer pipelines for DM81xx using Ridgerun OMX 0.10 plugins

From RidgeRun Developer Connection
Jump to: navigation, search

PAGE UNDER CONSTRUCTION

Introduction

On this page you are going to find a set of pipelines used on the DM8168 (EVM and Z3 boards). These pipelines are distinguished by color, blue pipelines are for the Z3 board, yellow for EVM board and green pipelines have to be run in your PC.

DM816x

Display videotest pattern

gst-launch videotestsrc peer-alloc=false ! 'video/x-raw-yuv,format=(fourcc)NV12,width=1920,height=1080' ! omx_scaler peer-alloc=false input-buffers=4 ! gstperf  ! v4l2sink sync=false device=/dev/video1 -v -e

Live Preview 1080p@60

v4l2:

gst-launch v4l2src device=/dev/video0 always-copy=false queue-size=8  ! 'video/x-raw-yuv,format=(fourcc)NV12,width=1920,height=1080,framerate=(fraction)60/1' !  omxbufferalloc numBuffers=8 ! gstperf ! omx_scaler peer-alloc=false  ! v4l2sink device=/dev/video1

Stream a H.264 encoded video file over RTP

Here you can use any QuickTime file encoded in H.264.

  • Server: DM81xx
CLIENT_IP=<Your IP address>

FILE=<filename.mp4>

gst-launch filesrc location=$FILE  ! qtdemux  ! queue ! h264parse !  gstperf ! rtph264pay ! udpsink host=$CLIENT_IP -v

As before, you need the udpsink:sink capabilities for the client pipeline.

  • Client: Ubuntu PC

Copy the udpsink caps given by the server pipeline, erase the spaces and the (uint) cast.

CAPS=application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,\sprop-parameter-sets=(string)\"Z2QAMqw05gHgCJ+WEAAAAwAQAAADAwDxgxmg\\,aOl4TLIs\",payload=(int)96,\ssrc=2152503956,clock-base=4043051310,seqnum-base=10306

PORT=4951

gst-launch udpsrc port=$PORT ! $CAPS ! rtph264depay ! queue ! ffdec_h264 ! xvimagesink sync=false -v
  • Client: DM81xx

Copy the udpsink caps given by the server pipeline, erase the spaces and the (uint) cast.

CAPS=application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,sprop-parameter-sets=(string)"J01AKakYDwBE/LgDUBAQG2wrXvfAQA\=\=\,KN4JyA\=\=",payload=(int)96,ssrc=(uint)1030753584,clock-base=(uint)3691979712,seqnum-base=(uint)15661

PORT=4951
FRAMERATE=24

gst-launch udpsrc port=$PORT ! $CAPS ! rtph264depay ! h264parse ! 'video/x-h264,stream-format=byte-stream,alignment=au,framerate=$FRAMERATE/1' ! omx_h264dec input-buffers=4  ! omx_scaler peer-alloc=false ! gstperf ! v4l2sink -v -e

Stream a H.264 encoded video file over RTSP

  • Server: DM81xx
FILE=<filename.mp4>
PORT=5001
PATH=stream1

gst-launch filesrc location= $FILE ! qtdemux  ! queue ! h264parse !  gstperf ! video/x-h264, mapping=/$PATH ! rtspsink service=$PORT -v
  • Client: Ubuntu PC
SERVER_IP=<RTSP server IP address>
PORT=5001
PATH=stream1

gst-launch rtspsrc location=rtsp://$SERVER_IP:$PORT/$PATH ! rtph264depay ! queue ! ffdec_h264 ! xvimagesink sync=false -v
  • Client: DM81xx
SERVER_IP=<RTSP server IP address>
PORT=5001
PATH=stream1

gst-launch rtspsrc location=rtsp://$SERVER_IP:$PORT/$PATH ! rtph264depay ! h264parse ! 'video/x-h264,stream-format=byte-stream,alignment=au' ! omx_h264dec input-buffers=4  ! omx_scaler peer-alloc=false ! gstperf ! v4l2sink -v -e

Decoding: Audio + Video, H.264 Interlaced Video, Transport Stream, 59.94 fps, MPEG Audio

gst-launch filesrc location= <FILENAME> ! tsdemux name=mux mux. ! queue ! h264parse ! 'video/x-h264,stream-format=byte-stream,alignment=au,framerate=60000/1001' ! omx_h264dec peer-alloc=false input-buffers=4 ! omx_hdeiscaler peer-alloc=false name=hd hd.src_00 ! gstperf ! v4l2sink device=/dev/video1 sync=true async=false qos=false mux. ! queue ! ffdec_mp2float ! audioconvert ! alsasink sync=true async=false -v -e

Decoding: Audio + Video, MPEG2 Interlaced Video, Program Stream, MPEG Audio

gst-launch filesrc location= <FILENAME> ! mpegpsdemux name=mux mux.video_e0 ! queue ! legacympegvideoparse ! omx_mpeg2dec input-buffers=4 peer-alloc=false ! omx_hdeiscaler peer-alloc=false name=d d.src_00 ! 'video/x-raw-yuv,width=1440,height=1080' ! gstperf ! v4l2sink device=/dev/video1 sync=true async=false qos=false mux.audio_c0 ! queue ! ffdec_mp2float ! audioconvert ! alsasink sync=true async=false -v -e

Decoding: H.264 Progressive Video, QuickTime Stream, 24 fps

gst-launch filesrc location= <FILENAME> ! qtdemux ! queue ! h264parse ! 'video/x-h264,stream-format=byte-stream,alignment=au,framerate=24/1' ! omx_h264dec peer-alloc=false input-buffers=4 ! omx_scaler peer-alloc=false ! gstperf ! v4l2sink device=/dev/video1 sync=true async=false qos=false -v -e