Difference between revisions of "Coral from Google/GStreamer/Example Pipelines"

From RidgeRun Developer Connection
Jump to: navigation, search
m
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
{{Coral from Google/Head|next=GstInference|previous=GStreamer|keywords=}}
+
{{Coral from Google/Head|next=GstInference/Introduction|previous=GStreamer|metakeywords=}}
 
</noinclude>
 
</noinclude>
  
Line 8: Line 8:
 
==Introduction==
 
==Introduction==
  
This section demonstrates how to use GStreamer elements for Coral hardware. Contains example pipelines showing how to capture from camera, display into the screen, encode, decode, and stream.
+
This section demonstrates how to use GStreamer elements for Coral hardware. Contains example pipelines showing how to capture from the camera, display into the screen, encode, decode, and stream.
  
 
==Pipelines==
 
==Pipelines==
Line 64: Line 64:
  
 
<noinclude>
 
<noinclude>
{{Coral from Google/Foot|GStreamer|GstInference}}
+
{{Coral from Google/Foot|GStreamer|GstInference/Introduction}}
 
</noinclude>
 
</noinclude>

Latest revision as of 06:45, 6 March 2023



Previous: GStreamer Index Next: GstInference/Introduction





Introduction

This section demonstrates how to use GStreamer elements for Coral hardware. Contains example pipelines showing how to capture from the camera, display into the screen, encode, decode, and stream.

Pipelines

Display Output

CAMERA='/dev/video1'
gst-launch-1.0 v4l2src device=$CAMERA ! "video/x-raw, width=1280, height=720" ! videoconvert ! autovideosink

Video Recording Output with H264 Encodification

CAMERA='/dev/video1'
OUTPUT_FILE='my_video.mp4'
gst-launch-1.0 v4l2src device=$CAMERA ! "video/x-raw, width=1280, height=720" ! videoconvert ! \
x264enc tune=zerolatency speed-preset=ultrafast ! h264parse ! qtmux ! filesink location=$OUTPUT_FILE -e

Streaming Output with H264 Encodification

  • Processing side
CAMERA='/dev/video1'
HOST='192.168.0.13'
PORT='5000'
gst-launch-1.0 v4l2src device=$CAMERA ! "video/x-raw, width=1280, height=720" ! videoconvert ! \
x264enc tune=zerolatency speed-preset=ultrafast ! h264parse ! mpegtsmux ! udpsink host=$HOST port=$PORT sync=false
  • Client-side
PORT='5000'
gst-launch-1.0 udpsrc port=$PORT ! queue  ! tsdemux ! h264parse ! avdec_h264 ! queue ! videoconvert ! autovideosink

JPEG Image Output

CAMERA='/dev/video1'
OUTPUT_FILE='my_image.jpg'
gst-launch-1.0 v4l2src device=$CAMERA num-buffers=1 ! "video/x-raw, width=1280, height=720" ! videoconvert ! \
jpegenc ! filesink location=$OUTPUT_FILE


Previous: GStreamer Index Next: GstInference/Introduction