Changes

Jump to navigation Jump to search
Line 97: Line 97:  
<br />
 
<br />
   −
=== Gstreamer usage Demo ===
+
=== Gstreamer usage sample ===
 
<code>export DISPLAY=:0</code>
 
<code>export DISPLAY=:0</code>
   Line 163: Line 163:     
<code>gst-launch-1.0 -e v4l2src device=/dev/video0  num-buffers=300  ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080,framerate=(fraction)30/1" ! v4l2h264enc extra-controls="controls, h264_profile=4, video_bitrate=6200000" ! 'video/x-h264, profile=high, level=(string)4' ! h264parse ! mp4mux ! filesink location=video.mp4</code>
 
<code>gst-launch-1.0 -e v4l2src device=/dev/video0  num-buffers=300  ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080,framerate=(fraction)30/1" ! v4l2h264enc extra-controls="controls, h264_profile=4, video_bitrate=6200000" ! 'video/x-h264, profile=high, level=(string)4' ! h264parse ! mp4mux ! filesink location=video.mp4</code>
 +
==== TCP streaming====
 +
'''''raspberrypi(sender)'''''
 +
 +
<code>gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=-1 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080,framerate=(fraction)30/1" ! v4l2h264enc extra-controls="controls, h264_profile=4, video_bitrate=4000000" ! 'video/x-h264, profile=high, level=(string)4' ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink  host=x.x.x.x port=5000</code>
 +
 +
The bandwidth of the stream is 4Mbps, continuous transmission, and the listening port is 5000.
 +
 +
'''''Client'''''
 +
 +
<code>gst-launch-1.0 -v tcpclientsrc host=x.x.x.x port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! autovideosink sync=false</code>
 +
 +
Where x.x.x.x is the IP address of the Raspberry Pi (Server).
 +
 +
It is recommended to use powershell if client is a windows system. '''''gstreamer''''' windows version download [https://gstreamer.freedesktop.org/documentation/installing/on-windows.html?gi-language=c here].
 
=== Video Control Toolkits Manual ===
 
=== Video Control Toolkits Manual ===
 
Because of the high flexibility of our camera parameters, we do not use V4L2 parameters to control, but use scripts to configure parameters.
 
Because of the high flexibility of our camera parameters, we do not use V4L2 parameters to control, but use scripts to configure parameters.

Navigation menu