Created
October 17, 2014 04:14
-
-
Save jetsonhacks/3e4bcbd8212cff1091dc to your computer and use it in GitHub Desktop.
Use GStreamer to preview webcams
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Show a webcam that delivers video 1920x1080 MJPG on screen | |
VELEM="v4l2src device=/dev/video0" | |
VCAPS="image/jpeg, width=1920, height=1080, framerate=30/1" | |
VSOURCE="$VELEM ! $VCAPS" | |
VIDEO_SINK="videoconvert ! videoscale ! xvimagesink sync=false" | |
VIDEO_DECODE="jpegparse ! jpegdec" | |
# echo is just for debugging purposes | |
echo gst-launch-1.0 -vvv \ | |
$VSOURCE \ | |
! $VIDEO_DECODE \ | |
! $VIDEO_SINK | |
gst-launch-1.0 -vvv \ | |
$VSOURCE \ | |
! $VIDEO_DECODE \ | |
! $VIDEO_SINK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment