Skip to content

Instantly share code, notes, and snippets.

@i-v-s
Created October 26, 2019 23:16
Show Gist options
  • Save i-v-s/4ac5675cb588fb52983c2998631e6330 to your computer and use it in GitHub Desktop.
Save i-v-s/4ac5675cb588fb52983c2998631e6330 to your computer and use it in GitHub Desktop.
YUYV camera + Raspberry Pi
#!/bin/sh
# Make RTSP stream
src/gst-rtsp-server-1.16.1/examples/test-launch "( v4l2src ! video/x-raw,format=YUY2,width=640,height=480 ! videoconvert ! video/x-raw,format=I420 ! videoconvert ! x264enc qp-min=18 speed-preset=superfast ! h264parse ! rtph264pay name=pay0 pt=96 config-interval=1 )"
# Write to file
gst-launch-1.0 -e v4l2src ! video/x-raw,format=YUY2,width=640,height=480 ! \
videoconvert ! queue ! x264enc qp-min=18 ! h264parse ! video/x-h264,stream-format="avc",alignment="au" ! mp4mux fragment-duration=10 ! filesink location=test.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment