Advertisement
Guest User

2streams with fake device : working

a guest
Jan 17th, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.81 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. DST="/tmp/2stream_$(date "+%Y.%m.%d_%H.%M.%S").mp4"
  4.  
  5. gst-launch-1.0 -e \
  6.     videotestsrc pattern=18 \
  7.         ! "video/x-raw, width=(int)320, height=(int)240, format=(string)I420, framerate=(fraction)30/1" \
  8.         ! x264enc speed-preset=fast \
  9.         ! mux. \
  10.     videotestsrc pattern=18 \
  11.         ! "video/x-raw, width=(int)1024, height=(int)768, format=(string)YUY2, framerate=(fraction)30/1" \
  12.         ! videoconvert \
  13.         ! "video/x-raw, width=(int)1024, height=(int)768, format=(string)I420, framerate=(fraction)30/1" \
  14.         ! x264enc speed-preset=fast \
  15.         ! mux. \
  16.     pulsesrc \
  17.         ! audioconvert \
  18.         ! audio/x-raw, rate=44100, channels=2 \
  19.         ! voaacenc \
  20.         ! queue \
  21.         ! mp4mux name=mux \
  22.     mux. ! filesink location="${DST}"
  23.  
  24. # use vlc to see the mp4.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement