#!/bin/sh
gst-launch-0.10 -v \
    filesrc location="$1".avi ! avidemux name=demux \
    filesrc location="$1".srt ! subparse ! txt. \
    mpegtsmux name=mux ! filesink location="$1".mpg \
    demux. ! queue ! mux. \
    demux. ! queue ! xviddec ! \
             textoverlay name=txt font-desc="Droid Sans 30" ! \
             x264enc pass=cbr bitrate=1024 me=umh subme=6 ref=2 threads=0 ! \
             queue ! progressreport update-freq=60 ! mux.
