Skip to content

Commit

Permalink
fix logic in use of in and out times
Browse files Browse the repository at this point in the history
  • Loading branch information
dericed committed Mar 8, 2022
1 parent d3edfab commit c7312b4
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions makederiv
Original file line number Diff line number Diff line change
Expand Up @@ -242,31 +242,22 @@ while [[ "${@}" != "" ]] ; do
OUTTIME=$(_readingestlog "outtime")
fi
fi
if [[ "${INTIME}" ]] ; then
if [[ -n "${INTIME}" && "${USEACCESSTIMES}" = "Y" ]] ; then
_report -dt "Transcoding will use intime (${INTIME}) during transcoding."
INPUTOPTIONS+=(-seek_timestamp 1)
MIDDLEOPTIONS+=(-ss "${INTIME}")
METADATA_COMMENT+=("mediaid=${MEDIAID} ")
METADATA_COMMENT+=("in=${INTIME} ")
fi
if [[ "${OUTTIME}" && "${ADDSLATE}" = "Y" ]] ; then
if [[ -n "${OUTTIME}" && "${USEACCESSTIMES}" = "Y" && "${ADDSLATE}" = "Y" ]] ; then
_report -dt "Transcoding will NOT use outtime (${OUTTIME}) during transcoding, as there is a slate being created for this file."
elif [[ "${OUTTIME}" && "${ADDSLATE}" != "Y" ]] ; then
elif [[ -n "${OUTTIME}" && "${USEACCESSTIMES}" = "Y" && "${ADDSLATE}" != "Y" ]] ; then
_report -dt "Transcoding will use outtime (${OUTTIME}) during transcoding."
MIDDLEOPTIONS+=(-to "${OUTTIME}")
METADATA_COMMENT+=("out=${OUTTIME} ")
fi
if [[ "${USEACCESSTIMES}" = "N" ]]; then
_report -dt "Transcoding will NOT use outtime (${OUTTIME}) during transcoding"
elif [[ "${USEACCESSTIMES}" = "Y" ]]; then
_report -dt "Transcoding will use intime (${INTIME}) during transcoding."
INPUTOPTIONS+=(-seek_timestamp 1)
MIDDLEOPTIONS+=(-ss "${INTIME}")
METADATA_COMMENT+=("mediaid=${MEDIAID} ")
METADATA_COMMENT+=("in=${INTIME} ")
_report -dt "Transcoding will use outtime (${OUTTIME}) during transcoding."
MIDDLEOPTIONS+=(-to "${OUTTIME}")
METADATA_COMMENT+=("out=${OUTTIME} ")
_report -dt "Transcoding will NOT use intime (${INTIME}) or outtime (${OUTTIME}) during transcoding"
fi

if [[ -n "${METADATA_COMMENT}" ]] ; then
Expand Down

0 comments on commit c7312b4

Please sign in to comment.