Found out can be done without the "mediainfo" program:
!/bin/sh
VIDEODIR=$1
FILENAME=$2
TEMPDIR="/home/mythtv/tmp/"
WORKDIR=`mktemp -d --tmpdir="$TEMPDIR"` || exit 4
DISPLAY=""
if [ -z "$VIDEODIR" -o -z "$FILENAME" ]; then
echo "Usage: $0 <VideoDirectory> <FileName>"
exit 1
fi
if [ ! -f "$VIDEODIR/$FILENAME" ]; then
echo "File does not exist: $VIDEODIR/$FILENAME"
exit 1
fi
projectx -tom2p -out "${WORKDIR}" -name projectx \
-set ExportPanel.Streamtype.Ac3Audio=0 \
-set ExportPanel.Streamtype.PcmAudio=0 \
-set ExportPanel.Streamtype.Teletext=0 \
-set ExportPanel.Streamtype.Subpicture=0 \
-set ExportPanel.Streamtype.Vbi=0 \
"$VIDEODIR/$FILENAME"
NEWFILE=`find "$WORKDIR" -type f -name "projectx*mpg"`
if [ ! -s "$NEWFILE" ]; then
echo "Expected result file $NEWFILE not found"
exit 1
fi
mv "$NEWFILE" "$VIDEODIR/$FILENAME" && rm -r "${WORKDIR}"
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Mvpmc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mvpmc-users
mvpmc wiki: http://mvpmc.wikispaces.com/