Skip to content

Instantly share code, notes, and snippets.

@jetsonhacks
Created November 2, 2014 20:42
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 jetsonhacks/29b33257980d0c342cbc to your computer and use it in GitHub Desktop.
Save jetsonhacks/29b33257980d0c342cbc to your computer and use it in GitHub Desktop.
#!/bin/sh
# Video Mixer example
# 3 MPEG IPCAMS and local webcam
# Webcam is MJPEG 1280x720
JPEG_DEC="jpegparse ! queue ! jpegdec"
VID_SPEC="videorate ! videoscale ! video/x-raw-yuv,framerate=30/1,width=960,height=540"
NVVIDCONV="queue ! nvvidconv"
VELEM="v4l2src device=/dev/video0" #video0 is a Logitech c920 webcam with built-in H.264 compression & MJPEG
VCAPS="image/jpeg, width=1280, height=720, framerate=30/1"
# Video Source
VSOURCE="$VELEM ! $VCAPS"
gst-launch-0.10 -e -v \
souphttpsrc location="http://194.168.163.96/axis-cgi/mjpg/video.cgi?resolution=320x240" timeout=5 do-timestamp=true is-live=true \
! $JPEG_DEC \
! $VID_SPEC \
! videobox left=-960 top=-540 border-alpha=0 \
! $NVVIDCONV \
! vmix. \
souphttpsrc location="http://64.122.208.241:8000/axis-cgi/mjpg/video.cgi?resolution=320x240" timeout=5 do-timestamp=true is-live=true \
! $JPEG_DEC \
! $VID_SPEC \
! videobox top=-540 border-alpha=0 \
! $NVVIDCONV \
! vmix. \
souphttpsrc location="http://plazacam.studentaffairs.duke.edu/axis-cgi/mjpg/video.cgi?resolution=1280x720" timeout=5 do-timestamp=true is-live=true \
! $JPEG_DEC \
! $VID_SPEC \
! videobox left=-960 border-alpha=0 \
! $NVVIDCONV \
! vmix. \
$VSOURCE \
! $JPEG_DEC \
! $VID_SPEC \
! $NVVIDCONV \
! vmix. \
videomixer name=vmix \
! videoscale \
! video/x-raw-yuv,framerate=30/1,width=1920,height=1080 \
! xvimagesink sync=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment