diff --git a/Resources/vrecord_functions b/Resources/vrecord_functions
index cb5e1ac2..8bcc492b 100644
--- a/Resources/vrecord_functions
+++ b/Resources/vrecord_functions
@@ -59,6 +59,7 @@ _update_config_file(){
echo "NTSC_169_SAR_CHOICE=\"${NTSC_169_SAR_CHOICE}\""
echo "PAL_43_SAR_CHOICE=\"${PAL_43_SAR_CHOICE}\""
echo "PAL_169_SAR_CHOICE=\"${PAL_169_SAR_CHOICE}\""
+ echo "DECK_CONTROL_CHOICE=\"${DECK_CONTROL_CHOICE}\""
echo "AUDIO_MAPPING_CHOICE=\"${AUDIO_MAPPING_CHOICE}\""
echo "TIMECODE_CHOICE=\"${TIMECODE_CHOICE}\""
echo "STANDARD_CHOICE=\"${STANDARD_CHOICE}\""
@@ -86,7 +87,6 @@ _update_config_file(){
echo "DV_RESCUE_OPTION_S=\"${DV_RESCUE_OPTION_S}\""
echo "DV_RESCUE_OPTION_D=\"${DV_RESCUE_OPTION_D}\""
echo "DV_RESCUE_OPTION_T=\"${DV_RESCUE_OPTION_T}\""
- echo "DV_RESCUE_OPTION_TC=\"${DV_RESCUE_OPTION_TC}\""
echo "MP4_CRF_VALUE=\"${MP4_CRF_VALUE}\""
echo "MP4_EXTRA_OPTS=\"${MP4_EXTRA_OPTS}\""
} > "${CONFIG_FILE}"
@@ -124,16 +124,18 @@ _validate_form(){
echo "WARNING: Option to invert phase of fourth audio channel has been selected."
fi
- if [ $(mount | grep $(df -P "${DIR}" | tail +2 | awk '{print $1}') | grep -c "(.*local,") = "0" ] && [ "${OS_TYPE}" != "linux" ] ; then
- echo "WARNING: The recording directory at ${DIR} is not a local directory. Please verify that you can write to the disk fast enough."
- fi
- if [ "${OS_TYPE}" = "linux" ] ; then
- FREE_SPACE="$(df -BG "${DIR}" | tail +2 | awk '{print $4}' | tr 'G' ' ')"
- else
- FREE_SPACE="$(df -g "${DIR}" | tail +2 | awk '{print $4}')"
- fi
- if [ "${FREE_SPACE}" -le 40 ] ; then
- echo "WARNING: The recording directory at ${DIR} only has ${FREE_SPACE} gigabytes available."
+ if [ -d "${DIR}" ] ; then
+ if [ $(mount | grep $(df -P "${DIR}" | tail +2 | awk '{print $1}') | grep -c "(.*local,") = "0" ] && [ "${OS_TYPE}" != "linux" ] ; then
+ echo "WARNING: The recording directory at ${DIR} is not a local directory. Please verify that you can write to the disk fast enough."
+ fi
+ if [ "${OS_TYPE}" = "linux" ] ; then
+ FREE_SPACE="$(df -BG "${DIR}" | tail +2 | awk '{print $4}' | tr 'G' ' ')"
+ else
+ FREE_SPACE="$(df -g "${DIR}" | tail +2 | awk '{print $4}')"
+ fi
+ if [ "${FREE_SPACE}" -le 40 ] ; then
+ echo "WARNING: The recording directory at ${DIR} only has ${FREE_SPACE} gigabytes available."
+ fi
fi
if [ "${SIGNAL_INT_CHOICE}" != "auto" ] && [ -n "${SIGNAL_INT_CHOICE}" ] ; then
echo "WARNING: The configuration ignores the interlacement of the input and forces it to ${SIGNAL_INT_CHOICE}. Set to 'auto' if you prefer to keep the interlacement as the device describes it."
diff --git a/vrecord b/vrecord
index 3ef2459c..613acf5e 100755
--- a/vrecord
+++ b/vrecord
@@ -384,9 +384,6 @@ _gtk_vbox_list() {
echo 'enable:AUDIO_MODE_SR_CHOICE
disable:AUDIO_MODE_SR_CHOICE
VRECORD_OUTPUT_NAME'
- elif [[ "${VARIABLE_NAME}" == "DV_CONTAINER_CHOICE" ]] && $DVPACKAGER_INSTALLED ; then
- echo 'disable:DV_RESCUE_OPTION_TC
- enable:DV_RESCUE_OPTION_TC'
fi
}
@@ -709,9 +706,13 @@ _set_up_edit_form() {
}
# initialize deckcontrol temp files
+if [[ -n "$(which sony9pin)" ]] ; then
+ SONY9PIN_DEVICE_ID="$( (sony9pin > /dev/null) 2>&1 | grep "A10K" | head -n 1 | cut -d ":" -f 1 | sed 's| ||g')"
+fi
FFMPEG_STATUS_TMP="$(_maketemp .ffmpeg.status.txt)"
DECKCONTROL_STATUS_TMP="$(_maketemp .deckcontrol.status.txt)"
DECKCONTROL_TIMECODE_TMP="$(_maketemp .deckcontrol.timecode.txt)"
+DECKCONTROL_TIMECODE_TMP2="$(_maketemp .deckcontrol.timecode2.txt)"
DVRESCUE_STATUS_TMP="$(_maketemp .dvrescue.status.txt)"
echo "" > "${FFMPEG_STATUS_TMP}"
echo "disabled" > "$DECKCONTROL_STATUS_TMP"
@@ -751,7 +752,7 @@ PLAYBACK_OPT_GUI="
OPTIONAL_TOOLS_GUI=$(cat << CONFIG_FORM
-
+
$(_gtk_vbox_list "WAVEFORM_SCALE_CHOICE" "100" "Select Waveform Scale" "${WAVEFORM_SCALE_OPTIONS[@]}")
@@ -789,6 +790,16 @@ OPTIONAL_TOOLS_GUI=$(cat << CONFIG_FORM
+
+
+
+
+
+
+ $(_gtk_vbox_list "DECK_CONTROL_CHOICE" "-1" "deckcontrol" "${DECK_CONTROL_OPTIONS[@]}")
+
+
+
@@ -928,6 +939,138 @@ _get_deckcontrol_button(){
fi
}
+_get_deckcontrol_interface(){
+ DECK_CONTROL_CHOICE="${1}"
+ if [[ "${DECK_CONTROL_CHOICE}" == "deckcontrol" ]] ; then
+ echo "
+
+
+
+
+
+ decklink_status
+ \"${DECKCONTROL_STATUS_TMP}\"
+
+
+
+
+
+
+
+ decklink_timecode
+ \"${DECKCONTROL_TIMECODE_TMP}\"
+
+
+
+
+ deckcontrol_timer
+ disabled
+ { deckcontrol getcurrentstate | grep \"state:\|detect\" | sed \"s/VTR control state: //g\" > \"${DECKCONTROL_STATUS_TMP}\" ; deckcontrol gettimecode | grep \"TC=\" | cut -c 4- > \"${DECKCONTROL_TIMECODE_TMP}\" ; } &
+ refresh:decklink_status
+ refresh:decklink_timecode
+
+
+
+
+ false
+ deckcontrol_toggle
+
+ if true enable:deckcontrol_timer
+ if true enable:decklink_status
+ if true enable:decklink_timecode
+ if true enable:deckcontrol_rewind
+ if true enable:deckcontrol_prev
+ if true enable:deckcontrol_play
+ if true enable:deckcontrol_stop
+ if true enable:deckcontrol_next
+ if true enable:deckcontrol_ff
+ if true enable:deckcontrol_eject
+ if false disable:deckcontrol_timer
+ if false disable:decklink_status
+ if false disable:decklink_timecode
+ if false disable:deckcontrol_rewind
+ if false disable:deckcontrol_prev
+ if false disable:deckcontrol_play
+ if false disable:deckcontrol_stop
+ if false disable:deckcontrol_next
+ if false disable:deckcontrol_ff
+ if false disable:deckcontrol_eject
+
+ $(_get_deckcontrol_button "deckcontrol_rewind" "gtk-media-rewind" "Rewind" "deckcontrol rewind")
+ $(_get_deckcontrol_button "deckcontrol_prev" "gtk-media-previous" "Step Back" "deckcontrol stepback")
+ $(_get_deckcontrol_button "deckcontrol_play" "gtk-media-play" "Play" "deckcontrol play")
+ $(_get_deckcontrol_button "deckcontrol_stop" "gtk-media-stop" "Stop" "deckcontrol stop")
+ $(_get_deckcontrol_button "deckcontrol_next" "gtk-media-next" "Step Fwd" "deckcontrol stepforward")
+ $(_get_deckcontrol_button "deckcontrol_ff" "gtk-media-forward" "FF" "deckcontrol fastforward")
+ $(_get_deckcontrol_button "deckcontrol_eject" "" "Eject" "deckcontrol eject")
+ "
+ elif [[ "${DECK_CONTROL_CHOICE}" == "sony9pin" && -n "${SONY9PIN_DEVICE_ID}" ]] ; then
+ echo "
+
+
+
+
+
+ decklink_timecode
+ \"${DECKCONTROL_TIMECODE_TMP}\"
+
+
+
+
+ deckcontrol_timer2
+ disabled
+ { (sony9pin \"${SONY9PIN_DEVICE_ID}\" 2 > /dev/null) 2>&1 | awk '{print \$2}' > \"${DECKCONTROL_TIMECODE_TMP}\" ; } &
+ refresh:decklink_timecode
+
+
+
+
+
+ false
+ deckcontrol_toggle
+
+ if true enable:rewind_report
+ if true enable:deckcontrol_timer
+ if true enable:deckcontrol_timer2
+ if true enable:decklink_status
+ if true enable:decklink_timecode
+ if true enable:deckcontrol_rewind
+ if true enable:deckcontrol_prev
+ if true enable:deckcontrol_play
+ if true enable:deckcontrol_stop
+ if true enable:deckcontrol_next
+ if true enable:deckcontrol_ff
+ if true enable:deckcontrol_eject
+ if false disable:rewind_report
+ if false disable:deckcontrol_timer
+ if false disable:deckcontrol_timer2
+ if false disable:decklink_status
+ if false disable:decklink_timecode
+ if false disable:deckcontrol_rewind
+ if false disable:deckcontrol_prev
+ if false disable:deckcontrol_play
+ if false disable:deckcontrol_stop
+ if false disable:deckcontrol_next
+ if false disable:deckcontrol_ff
+ if false disable:deckcontrol_eject
+
+ $(_get_deckcontrol_button "deckcontrol_rewind" "gtk-media-rewind" "Rewind" "sony9pin ${SONY9PIN_DEVICE_ID} r")
+ $(_get_deckcontrol_button "deckcontrol_prev" "gtk-media-previous" "Step Back" "sony9pin ${SONY9PIN_DEVICE_ID} w")
+ $(_get_deckcontrol_button "deckcontrol_play" "gtk-media-play" "Play" "sony9pin ${SONY9PIN_DEVICE_ID} p")
+ $(_get_deckcontrol_button "deckcontrol_stop" "gtk-media-stop" "Stop" "sony9pin ${SONY9PIN_DEVICE_ID} s")
+ $(_get_deckcontrol_button "deckcontrol_next" "gtk-media-next" "Step Fwd" "sony9pin ${SONY9PIN_DEVICE_ID} x")
+ $(_get_deckcontrol_button "deckcontrol_ff" "gtk-media-forward" "FF" "sony9pin ${SONY9PIN_DEVICE_ID} f")
+ $(_get_deckcontrol_button "deckcontrol_eject" "" "Eject" "sony9pin ${SONY9PIN_DEVICE_ID} e")
+ "
+ fi
+}
+
DECKLINK_INPUT_GUI=$(cat << DECKLINK_FORM
@@ -954,70 +1097,10 @@ DECKLINK_INPUT_GUI=$(cat << DECKLINK_FORM
${PLAYBACK_OPT_GUI}
${SIDECAR_FILES_GUI}
-
-
-
-
-
-
- decklink_status
- "${DECKCONTROL_STATUS_TMP}"
-
-
-
-
-
-
-
- decklink_timecode
- "${DECKCONTROL_TIMECODE_TMP}"
-
-
-
- deckcontrol_timer
- disabled
- { deckcontrol getcurrentstate | grep "state:\|detect" | sed "s/VTR control state: //g" > "${DECKCONTROL_STATUS_TMP}" ; deckcontrol gettimecode | grep "TC=" | cut -c 4- > "${DECKCONTROL_TIMECODE_TMP}" ; } &
- refresh:decklink_status
- refresh:decklink_timecode
-
-
-
-
-
- false
- deckcontrol_toggle
-
- if true enable:deckcontrol_timer
- if true enable:decklink_status
- if true enable:decklink_timecode
- if true enable:deckcontrol_rewind
- if true enable:deckcontrol_prev
- if true enable:deckcontrol_play
- if true enable:deckcontrol_stop
- if true enable:deckcontrol_next
- if true enable:deckcontrol_ff
- if true enable:deckcontrol_eject
- if false disable:deckcontrol_timer
- if false disable:decklink_status
- if false disable:decklink_timecode
- if false disable:deckcontrol_rewind
- if false disable:deckcontrol_prev
- if false disable:deckcontrol_play
- if false disable:deckcontrol_stop
- if false disable:deckcontrol_next
- if false disable:deckcontrol_ff
- if false disable:deckcontrol_eject
-
-
- $(_get_deckcontrol_button "deckcontrol_rewind" "gtk-media-rewind" "Rewind" "deckcontrol rewind")
- $(_get_deckcontrol_button "deckcontrol_prev" "gtk-media-previous" "Step Back" "deckcontrol stepback")
- $(_get_deckcontrol_button "deckcontrol_play" "gtk-media-play" "Play" "deckcontrol play")
- $(_get_deckcontrol_button "deckcontrol_stop" "gtk-media-stop" "Stop" "deckcontrol stop")
- $(_get_deckcontrol_button "deckcontrol_next" "gtk-media-next" "Step Fwd" "deckcontrol stepforward")
- $(_get_deckcontrol_button "deckcontrol_ff" "gtk-media-forward" "FF" "deckcontrol fastforward")
- $(_get_deckcontrol_button "deckcontrol_eject" "" "Eject" "deckcontrol eject")
-
-
+
+
+
+ $(_get_deckcontrol_interface "${DECK_CONTROL_CHOICE}")
@@ -1079,12 +1162,6 @@ DVRESCUE_INPUT_GUI=$(cat << DVRESCUE_FORM
-
- $(if [[ ${DVPACKAGER_INSTALLED} != "true" ]] ; then echo "false" ; fi)
-
- "${DV_RESCUE_OPTION_TC}"
- DV_RESCUE_OPTION_TC
-
$(_gtk_vbox_list "DV_CONTAINER_CHOICE" "100" "Select File Format" "${DV_CONTAINER_OPTIONS[@]}")
@@ -1484,6 +1561,12 @@ _edit_mode(){
RUNTYPE="audiopassthrough"
elif [[ "${EXIT}" = "refresh" ]] ; then
RUNTYPE="edit"
+ elif [[ "${EXIT}" = "rewind_report" ]] ; then
+ _report -dt "Gathering a rewind report. We'll rewind it while reporting on what the deck is saying."
+ _review_all_options
+ sony9pin -c ${SONY9PIN_DEVICE_ID} r
+ _report -dt "End of rewind report"
+ RUNTYPE="edit"
elif [[ "${EXIT}" = "timecode_scan" ]] ; then
_report -dt "Scanning each supported type of timecode."
_review_all_options
@@ -2230,9 +2313,6 @@ _review_all_options(){
DV_RESCUE_OPTS+=(-t)
fi
- if [[ "${DV_RESCUE_OPTION_TC}" = 'true' ]] ; then
- DV_RESCUE_OPTS+=(-S)
- fi
elif [[ "${DEVICE_INPUT_CHOICE}" = "2" ]] ; then
_review_option "AUDIO_CHANNEL_CHOICE" "${AUDIO_CHANNEL_CHOICE_OPTIONS[@]}"
if [[ "${AUDIO_DEV_CHOICE}" != *"Blackmagic"* ]] ; then
@@ -2338,6 +2418,7 @@ NTSC_43_SAR_OPTIONS=("10/11" "8/9" "9/10" "4320/4739")
NTSC_169_SAR_OPTIONS=("40/33" "32/27" "6/5" "5760/4739")
PAL_43_SAR_OPTIONS=("12/11" "16/15" "128/117")
PAL_169_SAR_OPTIONS=("16/11" "64/45" "512/351")
+DECK_CONTROL_OPTIONS=("deckcontrol" "sony9pin")
CHANNEL_MAPPING_OPTIONS=("2 Stereo Tracks (Channels 1 & 2 -> 1st Track Stereo, Channels 3 & 4 -> 2nd Track Stereo)" "1 Stereo Track (From Channels 1 & 2)" "1 Stereo Track (From Channels 3 & 4)" "Channel 1 -> 1st Track Mono, Channel 2 -> 2nd Track Mono" "Channel 2 -> 1st Track Mono, Channel 1 -> 2nd Track Mono" "Channel 1 -> Single Track Mono" "Channel 2 -> Single Track Mono")
TIMECODE_OPTIONS=("none" "rp188vitc" "rp188vitc2" "rp188ltc" "rp188any" "vitc" "vitc2" "serial")
STANDARD_OPTIONS=("NTSC" "PAL")
@@ -2527,22 +2608,24 @@ _writeingestlog "operating_system_VERSION" "$(uname -v)"
_writeingestlog "vrecord version" "${VERSION}"
_writeingestlog "datetime_start" "$(_get_iso8601)"
-MOUNT_PATH="$(df -Ph "${DIR}" 2>/dev/null | tail -n 1 | awk '{print $6}')"
-if [[ "${OS_TYPE}" = "macOS" ]] ; then
- VOLUME_INFO="$(diskutil info "${MOUNT_PATH}")"
- PART_OF_WHOLE="/dev/$(_parse_report "Part of Whole" "${VOLUME_INFO}")"
- CAPTURE_DEVICE_INFO="$(diskutil info "${PART_OF_WHOLE}")"
-
- _writeingestlog "capture_device_node" "$(_parse_report "Device Node" "${CAPTURE_DEVICE_INFO}")"
- _writeingestlog "capture_device_protocol" "$(_parse_report "Protocol" "${CAPTURE_DEVICE_INFO}")"
- _writeingestlog "capture_device_name" "$(_parse_report "Device / Media Name" "${CAPTURE_DEVICE_INFO}")"
- _writeingestlog "capture_device_block_size" "$(_parse_report "Device Block Size" "${CAPTURE_DEVICE_INFO}")"
- _writeingestlog "capture_device_location" "$(_parse_report "Device Location" "${CAPTURE_DEVICE_INFO}")"
- _writeingestlog "capture_device_partition_type" "$(_parse_report "Partition Type" "${VOLUME_INFO}")"
- _writeingestlog "capture_device_partition_name" "$(_parse_report "Name (User Visible)" "${VOLUME_INFO}")"
- _writeingestlog "capture_device_volume_uuid" "$(_parse_report "Volume UUID" "${VOLUME_INFO}")"
- _writeingestlog "capture_device_volume_available" "$(_parse_report "Volume Available Space" "${VOLUME_INFO}")"
- _writeingestlog "capture_device_volume_total" "$(_parse_report "Volume Total Space" "${VOLUME_INFO}")"
+if [[ -d "${DIR}" ]] ; then
+ MOUNT_PATH="$(df -Ph "${DIR}" 2>/dev/null | tail -n 1 | awk '{print $6}')"
+ if [[ "${OS_TYPE}" = "macOS" ]] ; then
+ VOLUME_INFO="$(diskutil info "${MOUNT_PATH}")"
+ PART_OF_WHOLE="/dev/$(_parse_report "Part of Whole" "${VOLUME_INFO}")"
+ CAPTURE_DEVICE_INFO="$(diskutil info "${PART_OF_WHOLE}")"
+
+ _writeingestlog "capture_device_node" "$(_parse_report "Device Node" "${CAPTURE_DEVICE_INFO}")"
+ _writeingestlog "capture_device_protocol" "$(_parse_report "Protocol" "${CAPTURE_DEVICE_INFO}")"
+ _writeingestlog "capture_device_name" "$(_parse_report "Device / Media Name" "${CAPTURE_DEVICE_INFO}")"
+ _writeingestlog "capture_device_block_size" "$(_parse_report "Device Block Size" "${CAPTURE_DEVICE_INFO}")"
+ _writeingestlog "capture_device_location" "$(_parse_report "Device Location" "${CAPTURE_DEVICE_INFO}")"
+ _writeingestlog "capture_device_partition_type" "$(_parse_report "Partition Type" "${VOLUME_INFO}")"
+ _writeingestlog "capture_device_partition_name" "$(_parse_report "Name (User Visible)" "${VOLUME_INFO}")"
+ _writeingestlog "capture_device_volume_uuid" "$(_parse_report "Volume UUID" "${VOLUME_INFO}")"
+ _writeingestlog "capture_device_volume_available" "$(_parse_report "Volume Available Space" "${VOLUME_INFO}")"
+ _writeingestlog "capture_device_volume_total" "$(_parse_report "Volume Total Space" "${VOLUME_INFO}")"
+ fi
fi
_writeingestlog "FILE_PATH" "${VRECORD_OUTPUT}"