#!/bin/bash
# 12-14-2005
# fedora-av-splice.sh
# Simple shellscript to mix theora video+audio using gstreamer pipeline
# Takes 3 arguments wavfile theoravideo output-theora-video

if [ "$1" == "" ] ; then
  echo "Usage: $0 wavfile theora-video  output-video"
  echo "Ex: $0 english-audio.wav desktop-recording.ogg english-desktop-video.ogg"
else
   gst-launch-0.10 \
     filesrc location=$2 \! decodebin name="video" \
     filesrc location=$1 \! decodebin name="audio" \
     audio. \! queue \! audioconvert \! vorbisenc \! queue \! mux. \
     video. \! queue \! ffmpegcolorspace \! theoraenc quality=32 \! oggmux name=mux \! filesink location="test.ogg"

fi

