-
Notifications
You must be signed in to change notification settings - Fork 27
/
makebroadcast
executable file
·38 lines (35 loc) · 1.58 KB
/
makebroadcast
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# makebroadcast
# v 1.1 change from mov output to mxf output, force all output to hd
# v 1.2 revert to mov and ffmbc
# v 1.3 revert back to ffmpeg
# v 1.4 adjust handling volume adjustment argument
# v 2.0 integrate with new microservice makederiv to streamline derivative creation
VERSION="2.0"
SCRIPTDIR=$(dirname $(which "${0}"))
. "${SCRIPTDIR}/mmfunctions" || { echo "Missing '${SCRIPTDIR}/mmfunctions'. Exiting." ; exit 1 ;};
_usage(){
echo
echo
_report -d "makebroadcast is an alias for the updated function makederiv (options below)."
_report -d "You can create a derivative file suitable for broadcast with makederiv by typing: 'makederiv -T broadcast [options] [input]'."
_report -d "Or continue to use makebroadcast using the valid options below."
_report -d " -c This flag will cause makebroadcast to simply copy audiovisual data from the input to output. For instance"
_report -d " makebroadcast -c -I 00:00:05.000 -O 00:00:10.000 file.mov"
_report -d " will copy from teh 5th to 10th second of file.mov to a new file called file_copy.mov"
"${SCRIPTDIR}/makederiv" -h
exit
}
[ "${#}" = 0 ] && _usage
while getopts ":ch" OPT ; do
case "${OPT}" in
c) CUT="Y" ;;
h) _usage ;;
:) echo "Option -${OPTARG} requires an argument" ; _writeerrorlog "makederiv" "The option selected required an argument and none was provided. The script had to exit." ; exit 1 ;;
esac
done
if [[ "${CUT}" == "Y" ]] ; then
"${SCRIPTDIR}/makederiv" -T broadcast_copy "${@}"
else
"${SCRIPTDIR}/makederiv" -T broadcast "${@}"
fi