#!/bin/ksh
#Tag 0xFFFFFF11
#
# $Id: jcombine_audio,v 1.3 1999/09/16 10:27:45 roman Exp $
#
# Copyright (C) Comunicacion Integral, Las Palmas de Gran Canaria, 1997
#
# $Log: jcombine_audio,v $
# Revision 1.3  1999/09/16 10:27:45  roman
# bug #2152: script to merge movie with audio extended to support new quicktime formats
#
# Revision 1.2  1997/06/12 15:43:42  cm
# general_update
#
# Revision 1.1  1997/06/12  13:28:56  cm
# Initial revision
#
# Parameters:
#
# $1 is video source file
# $2 is audio source file
# $3 is format: { sgi, qt }
# $4 is compression: { jpeg, mvc1, mvc2, rle, none, ... }
# $5 is field dominance: { odd, even }: only valid if format is jpeg
# $6 is frame rate as defined in .jaleorc


# dmconvert -v -f sgimv -p audio -p video $1 $2 $1".tmp"
# /bin/mv $1".tmp" $1

orientation=""
if [ "$3" = "jpeg" ] 
then
	orientation="-t"
fi

echo makemovie -o $1".tmp" -f $3 -c $4 $orientation -i $5 -r $6 $1 $2
makemovie -o $1".tmp" -f $3 -c $4 $orientation -i $5 -r $6 $1 $2

echo /bin/mv $1".tmp" $1
/bin/mv $1".tmp" $1

