Difference between revisions of "Gst-1.0 pipelines for DM816x and DM814x"

From RidgeRun Developer Connection
Jump to: navigation, search
Line 25: Line 25:
 
== V4l2 Capture and UDP streaming ==
 
== V4l2 Capture and UDP streaming ==
  
You have to set HOST and PORT variables to your own
+
These instructions show how to do video streaming over the network, a video will be captured on the board and viewed on the host. These pipelines use the port that you configure to send the packets. To configure the port and the host ip to send the streaming you have to set the variables port=$PORT and host=$HOST to your own).
 +
 
 +
*''Server: DM81xx''
  
 
<pre>
 
<pre>
 
HOST=<Your IP address>
 
HOST=<Your IP address>
 
PORT=<Your port>
 
PORT=<Your port>
 +
 
gst-launch-1.0 v4l2src io-mode=3 device=/dev/video0 ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=(fraction)60/1' ! perf print-arm-load=true ! omxbufferalloc num-buffers=12 ! omxh264enc i-period=30 idr-period=30 ! mpegtsmux ! udpsink host=$HOST port=$PORT sync=false async=false -v
 
gst-launch-1.0 v4l2src io-mode=3 device=/dev/video0 ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=(fraction)60/1' ! perf print-arm-load=true ! omxbufferalloc num-buffers=12 ! omxh264enc i-period=30 idr-period=30 ! mpegtsmux ! udpsink host=$HOST port=$PORT sync=false async=false -v
 
</pre>
 
</pre>
  
Later you could get the stream in your host side
+
*''Client: Ubuntu PC''
  
 
<pre>
 
<pre>
 
gst-launch-1.0 udpsrc port=3001 ! tsdemux ! h264parse ! avdec_h264 ! xvimagesink sync=true async=false
 
gst-launch-1.0 udpsrc port=3001 ! tsdemux ! h264parse ! avdec_h264 ! xvimagesink sync=true async=false
 
</pre>
 
</pre>

Revision as of 10:48, 8 March 2016

Introduction

DM81xx

Encode videotest pattern in H.264 (without container)

 
gst-launch-1.0 videotestsrc num-buffers=1000 ! omxbufferalloc num-buffers=8 ! omxh264enc ! perf print-arm-load=true ! filesink location=sample.h264

Scale the QVGA video test pattern to VGA

gst-launch-1.0 videotestsrc num-buffers=1000 ! 'video/x-raw,format=(string)NV12,width=320,height=240,framerate=(fraction)60/1' ! omxbufferalloc num-buffers=8 ! omxscaler  ! 'video/x-raw,format=(string)YUY2,width=640,height=480,framerate=(fraction)60/1' ! perf print-arm-load=true ! fakesink

DM8148

V4l2 Capture and recording

gst-launch-1.0 v4l2src io-mode=3 device=/dev/video0 num-buffers=1000 ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=(fraction)60/1' ! perf print-arm-load=true ! omxbufferalloc num-buffers=12 -v ! omxh264enc i-period=30 idr-period=30 ! queue ! rrh264parser single-nalu=true ! mp4mux dts-method=0 ! filesink location=test_v4l2src_1.0.mp4

V4l2 Capture and UDP streaming

These instructions show how to do video streaming over the network, a video will be captured on the board and viewed on the host. These pipelines use the port that you configure to send the packets. To configure the port and the host ip to send the streaming you have to set the variables port=$PORT and host=$HOST to your own).

  • Server: DM81xx
HOST=<Your IP address>
PORT=<Your port>

gst-launch-1.0 v4l2src io-mode=3 device=/dev/video0 ! 'video/x-raw,format=(string)NV12,width=1280,height=720,framerate=(fraction)60/1' ! perf print-arm-load=true ! omxbufferalloc num-buffers=12 ! omxh264enc i-period=30 idr-period=30 ! mpegtsmux ! udpsink host=$HOST port=$PORT sync=false async=false -v
  • Client: Ubuntu PC
gst-launch-1.0 udpsrc port=3001 ! tsdemux ! h264parse ! avdec_h264 ! xvimagesink sync=true async=false