Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. #!/bin/sh
  2. # Run two video webcam feeds in two different windows
  3. # Script assumes that:
  4. # Microsoft LifeCam Studio is video0
  5. # Logitech c920 is video1
  6. # Both cameras run max 1920x1080 MJPG, but two have both on a USB bus they can run @ 1280x720 max
  7. # MS is made a little smaller
  8. # text overlay and clockoverlay may be added to the pipeline, but render poorly
  9. VELEM="v4l2src device=/dev/video0 do-timestamp=true"
  10. VCAPS="image/jpeg, width=640, height=480, framerate=30/1"
  11. VSOURCE="$VELEM ! $VCAPS"
  12. VIDEO_SINK="videoconvert ! videoscale ! xvimagesink sync=false"
  13. VIDEO_DECODE="jpegparse ! jpegdec"
  14.  
  15. VELEM1="v4l2src device=/dev/video1 do-timestamp=true"
  16. VCAPS1="image/jpeg, width=1280, height=720, framerate=30/1"
  17. VSOURCE1="$VELEM1 ! $VCAPS1"
  18.  
  19. TEXT_OVERLAY_MS="textoverlay text=\"MS LifeCam Studio\" shaded-background=true"
  20. TEXT_OVERLAY_LT="textoverlay text=Logitech c920"
  21.  
  22. CLOCK_OVERLAY="clockoverlay shaded-background=true valignment=bottom time-format=\"%Y/%m/%d %H:%M:%S\""
  23.  
  24. #echo is just for debugging purposes
  25. echo gst-launch-1.0 -vvv \
  26. tee name=splitter \
  27. $VSOURCE \
  28. ! $VIDEO_DECODE \
  29. ! $VIDEO_SINK splitter. \
  30. $VSOURCE1 \
  31. ! $VIDEO_DECODE \
  32. ! $VIDEO_SINK splitter.
  33.  
  34. gst-launch-1.0 -vvv \
  35. tee name=splitter \
  36. $VSOURCE \
  37. ! $VIDEO_DECODE \
  38. ! $VIDEO_SINK splitter. \
  39. $VSOURCE1 \
  40. ! $VIDEO_DECODE \
  41. ! $VIDEO_SINK splitter.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement