From 3229ec871cca93a513cac26d7111b9480d8c1d98 Mon Sep 17 00:00:00 2001 From: Dave Rice Date: Mon, 1 Dec 2025 14:23:12 -0500 Subject: [PATCH 1/4] add post-process to make a timecode vtt file --- Resources/vrecord_functions | 2 ++ vrecord | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/Resources/vrecord_functions b/Resources/vrecord_functions index 7494c006..abfc524d 100644 --- a/Resources/vrecord_functions +++ b/Resources/vrecord_functions @@ -65,6 +65,7 @@ _update_config_file(){ echo "QCTOOLSXML_CHOICE=\"${QCTOOLSXML_CHOICE}\"" echo "MP4_CHOICE=\"${MP4_CHOICE}\"" echo "FRAMEMD5_CHOICE=\"${FRAMEMD5_CHOICE}\"" + echo "TIMECODEVTT_CHOICE=\"${TIMECODEVTT_CHOICE}\"" echo "EMBED_LOGS_CHOICE=\"${EMBED_LOGS_CHOICE}\"" echo "PLAYBACKVIEW_CHOICE=\"${PLAYBACKVIEW_CHOICE}\"" echo "PLAYBACKVIEW_CHOICE_PASS=\"${PLAYBACKVIEW_CHOICE_PASS}\"" @@ -268,6 +269,7 @@ _get_summary(){ echo "Auxiliary files created in ${LOGDIR}" echo "Access MP4: ${MP4_CHOICE}" echo "Frame MD5s: ${FRAMEMD5_CHOICE}" + echo "Timecode VTT: ${TIMECODEVTT_CHOICE}" echo "QCTools XML: ${QCTOOLSXML_CHOICE}" echo "Playback: ${PLAYBACKVIEW_CHOICE} view (for recording) and ${PLAYBACKVIEW_CHOICE_PASS} view (for passthrough)" elif [ "${DEVICE_INPUT_CHOICE}" = "1" ] ; then diff --git a/vrecord b/vrecord index 1ba96c04..01c2ffa5 100755 --- a/vrecord +++ b/vrecord @@ -776,6 +776,11 @@ SIDECAR_FILES_GUI=" \"${FRAMEMD5_CHOICE}\" FRAMEMD5_CHOICE + + + \"${TIMECODEVTT_CHOICE}\" + TIMECODEVTT_CHOICE + $(_gtk_vbox_list "QCTOOLSXML_CHOICE" "180" "QCTools XML?" "${QCTOOLSXML_OPTIONS[@]}") @@ -3247,6 +3252,16 @@ if [[ "${DEVICE_INPUT_CHOICE}" = 0 ]] ; then _report -d "QCTools analysis is complete." fi + # make a timecode vtt + if [[ "$TIMECODEVTT_CHOICE}" = "true" ]] && [[ "${FORMAT}" = "Matroska" ]] && [[ -n "${TIMECODE_CHOICE}" ]] && [[ "${TIMECODE_CHOICE}" != "none" ]] ; then + _report -d "Working on the timecode vtt file..." + TIMECODEXML_TMP="$(_maketemp .mediatimecode.txt)" + TIMECODEXML_VTT="${LOGDIR}/${FULL_OUTPUT_ID}.timecode.vtt" + mediainfo --ParseSpeed=1 --Output=TimeCodeXML "${VRECORD_OUTPUT}" > "${TIMECODEXML_TMP}" + # need to test if timecode file has any data or not before committing to a vtt + timecodexml2webvtt "${TIMECODEXML_TMP}" > "${TIMECODEXML_VTT}" + _mv_tmp_file "${TIMECODEXML_TMP}" "${TIMECODEXML_VTT}" + fi # check for discontinuities in the Frame MD5s; if user chose not to use Frame MD5s, check for frame discontinuties in the FFmpeg file if [[ "${FRAMEMD5_CHOICE}" = "true" ]] ; then PTS_DISCONTINUITY=$(cat "${FRAMEMD5NAME}" | grep -v "^#" | cut -d, -f3 | sed 's/ //g' | grep -v "^0$" | awk '{if($1!=p+1){if(p+1==$1-1){printf p+1" "}else{printf p+1"-"$1-1" "}}{p=$1}}') From dcf0a19703cabf5ba3388d125f107a32def07b61 Mon Sep 17 00:00:00 2001 From: Dave Rice Date: Mon, 12 Jan 2026 09:59:11 -0500 Subject: [PATCH 2/4] add in option to get ALL the timecode requires ffmpeg-ma 8.0_2 or greater --- vrecord | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vrecord b/vrecord index 01c2ffa5..16950a27 100755 --- a/vrecord +++ b/vrecord @@ -1956,7 +1956,7 @@ _lookup_choice(){ S_RATE='-ar 44.1k' MIDDLEOPTIONS_PRES+=(${S_RATE}) ;; # timecode options - "none"|"rp188vitc"|"rp188vitc2"|"rp188ltc"|"rp188any"|"vitc"|"vitc2"|"serial") + "none"|"all"|"rp188vitc"|"rp188vitc2"|"rp188ltc"|"rp188any"|"vitc"|"vitc2"|"serial") TC_TYPE="${1}" TC_INPUT_OPTION=(-timecode_format "${TC_TYPE}") MIDDLEOPTIONS_PRES+=(-map_metadata 0:s:v:0) @@ -2845,7 +2845,7 @@ 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") 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") +TIMECODE_OPTIONS=("none" "all" "rp188vitc" "rp188vitc2" "rp188ltc" "rp188any" "vitc" "vitc2" "serial") if [[ ${HD_CHOICE} != "true" ]] ; then STANDARD_OPTIONS=("NTSC" "PAL") else From 4ff268c8175331a07b5bd5dafad545b22b64f9e1 Mon Sep 17 00:00:00 2001 From: Dave Rice Date: Mon, 12 Jan 2026 14:38:04 -0500 Subject: [PATCH 3/4] fix typo in timecode post-processing --- vrecord | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vrecord b/vrecord index 16950a27..bc07491b 100755 --- a/vrecord +++ b/vrecord @@ -3253,14 +3253,13 @@ if [[ "${DEVICE_INPUT_CHOICE}" = 0 ]] ; then fi # make a timecode vtt - if [[ "$TIMECODEVTT_CHOICE}" = "true" ]] && [[ "${FORMAT}" = "Matroska" ]] && [[ -n "${TIMECODE_CHOICE}" ]] && [[ "${TIMECODE_CHOICE}" != "none" ]] ; then + if [[ "${TIMECODEVTT_CHOICE}" = "true" ]] && [[ "${FORMAT}" = "matroska" ]] && [[ -n "${TIMECODE_CHOICE}" ]] && [[ "${TIMECODE_CHOICE}" != "none" ]] ; then _report -d "Working on the timecode vtt file..." TIMECODEXML_TMP="$(_maketemp .mediatimecode.txt)" TIMECODEXML_VTT="${LOGDIR}/${FULL_OUTPUT_ID}.timecode.vtt" mediainfo --ParseSpeed=1 --Output=TimeCodeXML "${VRECORD_OUTPUT}" > "${TIMECODEXML_TMP}" # need to test if timecode file has any data or not before committing to a vtt timecodexml2webvtt "${TIMECODEXML_TMP}" > "${TIMECODEXML_VTT}" - _mv_tmp_file "${TIMECODEXML_TMP}" "${TIMECODEXML_VTT}" fi # check for discontinuities in the Frame MD5s; if user chose not to use Frame MD5s, check for frame discontinuties in the FFmpeg file if [[ "${FRAMEMD5_CHOICE}" = "true" ]] ; then From cf8f9f8a1839902ed18ec0f4cf583b0a3ed8565f Mon Sep 17 00:00:00 2001 From: Dave Rice Date: Fri, 16 Jan 2026 15:14:08 -0500 Subject: [PATCH 4/4] add nostdin to timecode scanner --- vrecord | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vrecord b/vrecord index bc07491b..89877e45 100755 --- a/vrecord +++ b/vrecord @@ -1582,7 +1582,7 @@ _edit_mode(){ echo "Timecode Type | Timecode Value" echo "--------------|---------------" for timecode_type in "${TIMECODE_OPTIONS[@]}" ; do - tc_value="$("${FFMPEG_BIN}" -timecode_format "${timecode_type}" "${GRAB_INPUT[@]}" -loglevel info 2>&1 | grep " timecode " | cut -d ":" -f2- | sed 's/ //g')" + tc_value="$("${FFMPEG_BIN}" -nostdin -timecode_format "${timecode_type}" "${GRAB_INPUT[@]}" -loglevel info 2>&1 | grep " timecode " | cut -d ":" -f2- | sed 's/ //g')" printf " %-11s | %-12s \n" "${timecode_type}" "${tc_value:-none}" done echo "--------------|---------------"