Skip to content

Instantly share code, notes, and snippets.

@kiview
Created May 27, 2020 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiview/6aadc6c7f734fc82018eb35f1e3746c5 to your computer and use it in GitHub Desktop.
Save kiview/6aadc6c7f734fc82018eb35f1e3746c5 to your computer and use it in GitHub Desktop.
Stream and record a webcam with gstreamer usinc NVIDIA hardware encoding for saving the recording
GST_PLUGIN_PATH=$GST_PLUGIN_PATH:/usr/local/lib/gstreamer-1.0/ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=UYVY, width=1920, height=1080, framerate=60/1 ! tee name=t ! queue ! videobalance saturation=0.0 ! videoflip method=horizontal-flip ! timeoverlay halignment=center valignment=center ! videobox top=200 bottom=200 left=355 right=355 ! videoscale! videoconvert ! autovideosink t. ! queue ! videoconvert ! nvh264enc ! h264parse ! flvmux ! filesink location=recording-gpu.flv -e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment