#!/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-to-encode  outputvideo"
  echo "Ex: $0 english-audio.wav desktop-recording.ogg english-video.ogg"
else
  gst-launch-0.8 \{ oggmux name=mux \! filesink location=$3 \} \{ filesrc location=$2 \! decodebin name=v \} \{ filesrc location=$1 \! decodebin name=a \} \{ v. \! queue \! ffmpegcolorspace \! theoraenc \! queue name=theora-q \! mux. \} \{ a. \! queue \! audioconvert \! rawvorbisenc \! queue name=vorbis-q \! mux. \}
fi

