Guest User

2streams with real device not working

a guest
Jan 17th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.03 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. GRABBER_DEVICE=/dev/video1 ; # this a DataPath-E1S
  4. WEBCAM_DEVICE=/dev/video0
  5. LOGO_PATH=/home/briner/test.png
  6. DST="/tmp/2stream_$(date "+%Y.%m.%d_%H.%M.%S").mp4"
  7.  
  8. gst-launch-1.0 -e \
  9.     v4l2src device=${WEBCAM_DEVICE} \
  10.         ! "video/x-raw, width=(int)320, height=(int)240, format=(string)I420, framerate=(fraction)30/1" \
  11.         ! x264enc speed-preset=fast \
  12.         ! mux. \
  13.     v4l2src device=${GRABBER_DEVICE} \
  14.         ! "video/x-raw, width=(int)1024, height=(int)768, format=(string)YUY2, framerate=(fraction)30/1" \
  15.         ! videoconvert \
  16.         ! "video/x-raw, width=(int)1024, height=(int)768, format=(string)I420, framerate=(fraction)30/1" \
  17.         ! x264enc speed-preset=fast \
  18.         ! mux. \
  19.     pulsesrc \
  20.         ! audioconvert \
  21.         ! audio/x-raw, rate=44100, channels=2 \
  22.         ! voaacenc \
  23.         ! queue \
  24.         ! mp4mux name=mux \
  25.     mux. ! filesink location="${DST}"
  26.  
  27. # use vlc to see the mp4.
  28. # you will see that their is either the first stream which are moving
  29. # or the second stream
Add Comment
Please, Sign In to add comment