sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo apt-get update
sudo apt-get install gstreamer1.0-tools gstreamer1.0-alsa \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-libav
sudo apt-get install libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-good1.0-dev \
libgstreamer-plugins-bad1.0-dev
Check installed Show usb camera with FPS overlay
gst-launch-1.0 v4l2src device=/dev/video0 \
! queue \
! autovideoconvert \
! fpsdisplaysink
raw video with framerate
gst-launch-1.0 v4l2src device=/dev/video0 \
! 'video/x-raw, width=640,height=480, framerate=(fraction)30/1' \
! queue ! autovideoconvert ! fpsdisplaysink
Stream usb camera over UDP
gst-launch-1.0 v4l2src device=/dev/video0 \
! videoconvert \
! queue max-size-time=0 max-size-bytes=0 max-size-buffers=0 \
! x264enc byte-stream=true tune=zerolatency speed-preset=ultrafast bitrate=3000 \
! h264parse \
! rtph264pay config-interval=-1 pt=96 \
! queue max-size-time=0 max-size-bytes=0 max-size-buffers=0 \
! udpsink clients=127.0.0.1:5000 max-bitrate=3000000 sync=false async=false
gst-launch-1.0 udpsrc port=5000 \
! application/x-rtp,clock-rate=90000,payload=96 \
! queue \
! rtph264depay \
! h264parse \
! avdec_h264 \
! queue \
! autovideoconvert \
! fpsdisplaysink