Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qcli fixes #860

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions vrecord
Original file line number Diff line number Diff line change
Expand Up @@ -2525,7 +2525,7 @@ fi

if [[ "${DEVICE_INPUT_CHOICE}" = "0" ]] ; then
_review_option "QCTOOLSXML_CHOICE" "${QCTOOLSXML_OPTIONS[@]}"
if [[ "${QCTOOLSXML_CHOICE}" != "No" && ! "$(command -v qcli)" ]] ; then
if [[ "${QCTOOLSXML_CHOICE}" != "No" && "${QCLI_INSTALLED}" != "true" ]]; then
_report -w "Please install qcli to use the qctools reporting option."
_report -w "Such as \`brew install qcli\`."
exit 1
Expand Down Expand Up @@ -2587,8 +2587,8 @@ read
INGESTLOG="${LOGDIR}/${FULL_OUTPUT_ID}_capture_options.log"
QCTOOLS_REPORT="${LOGDIR}/${FULL_OUTPUT_ID}.${EXTENSION}.qctools.mkv"
QCXML="$(_maketemp)"
QCLI_COMMAND_PIPE=(qcli -f signalstats+aphasemeter+astats+ssim -i - -o "${QCTOOLS_REPORT}")
QCLI_COMMAND_FILE=(qcli -f signalstats+aphasemeter+astats+ssim -i "${VRECORD_OUTPUT}" -o "${QCTOOLS_REPORT}")
QCLI_COMMAND_PIPE=(qcli -audio all -f signalstats+aphasemeter+astats+ssim -i - -o "${QCTOOLS_REPORT}")
QCLI_COMMAND_FILE=(qcli -audio all -f signalstats+aphasemeter+astats+ssim -i "${VRECORD_OUTPUT}" -o "${QCTOOLS_REPORT}")
touch "${INGESTLOG}"
_writeingestlog "computer_name" "$(uname -n)"
_writeingestlog "computer_model_name" "${COMPUTER_MODEL_NAME}"
Expand Down Expand Up @@ -2797,6 +2797,8 @@ if [[ "${DEVICE_INPUT_CHOICE}" = 0 ]] ; then
_report -wt "File did not pass vrecord policy check for uncompressed video and may not conform to digital preservation standards. Try another file?"
mediaconch -fx -p "${RESOURCE_PATH}/vrecord_policy_uncompressed.xml" "${VRECORD_OUTPUT}" | xmlstarlet fo > "${DIR}/${FULL_OUTPUT_ID}_mediaconchreport.xml"
_report -wt "See ${DIR}/${FULL_OUTPUT_ID}_mediaconchreport.xml for a full MediaConch policy report."
_report -wt "Or review this attempt to summarize the issue:"
xmlstarlet edit -N "mc=https://mediaarea.net/mediaconch" -d "//*[@outcome='pass']" "${DIR}/${FULL_OUTPUT_ID}_mediaconchreport.xml"
else
mediaconch -p "${RESOURCE_PATH}/vrecord_policy_uncompressed.xml" "${VRECORD_OUTPUT}"
fi
Expand All @@ -2805,11 +2807,14 @@ if [[ "${DEVICE_INPUT_CHOICE}" = 0 ]] ; then
STATUS=$(mediaconch -fx -p "${RESOURCE_PATH}/vrecord_policy_ffv1.xml" "${VRECORD_OUTPUT}" | xmlstarlet sel -N mc="https://mediaarea.net/mediaconch" -t -v mc:MediaConch/mc:media/mc:policy/@outcome -n)
if [[ "${STATUS}" = "pass" ]] ; then
_report -dt "File passed policy check for FFV1 video."
elif [[ "$STATUS" = "fail" ]] ; then
elif [[ "${STATUS}" = "fail" ]] ; then
_report -wt "File did not pass vrecord policy check for FFV1 video and may not conform to digital preservation standards. Try another file?"
mediaconch -fx -p "${RESOURCE_PATH}/vrecord_policy_ffv1.xml" "${VRECORD_OUTPUT}" | xmlstarlet fo > "${DIR}/${FULL_OUTPUT_ID}_mediaconchreport.xml"
_report -wt "See ${DIR}/${FULL_OUTPUT_ID}_mediaconchreport.xml for a full MediaConch policy report."
_report -wt "Or review this attempt to summarize the issue:"
xmlstarlet edit -N "mc=https://mediaarea.net/mediaconch" -d "//*[@outcome='pass']" "${DIR}/${FULL_OUTPUT_ID}_mediaconchreport.xml"
else
_report -wt "Mediaconch ended in an unexpected way (${STATUS}). Here is its output."
mediaconch -p "${RESOURCE_PATH}/vrecord_policy_ffv1.xml" "${VRECORD_OUTPUT}"
fi
fi
Expand Down