Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions Resources/vrecord_functions
Original file line number Diff line number Diff line change
Expand Up @@ -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}\""
Expand Down Expand Up @@ -265,6 +266,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
Expand Down
17 changes: 16 additions & 1 deletion vrecord
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,11 @@ SIDECAR_FILES_GUI="
<default>\"${FRAMEMD5_CHOICE}\"</default>
<variable>FRAMEMD5_CHOICE</variable>
</checkbox>
<checkbox tooltip-text=\"If enabled, this will make a vtt file alongside any Matroska that captured timecode.\">
<label>Timecode VTT</label>
<default>\"${TIMECODEVTT_CHOICE}\"</default>
<variable>TIMECODEVTT_CHOICE</variable>
</checkbox>
</vbox>
$(_gtk_vbox_list "QCTOOLSXML_CHOICE" "180" "QCTools XML?" "${QCTOOLSXML_OPTIONS[@]}")
</hbox>
Expand Down Expand Up @@ -2939,7 +2944,7 @@ if [[ "${DEVICE_INPUT_CHOICE}" = "0" ]] ; then
MP4NAME="${DIR}/${FULL_OUTPUT_ID}.mp4"
EXTRAOUTPUTS+=("${MIDDLEOPTIONS_ALL[@]}" -movflags write_colr+faststart "${RECORD_COMMAND_MP4[@]}" -pix_fmt yuv420p -c:v h264 -c:a aac -map "[mp4_v_out]" "${AUDIO_CHANNEL_MAP[@]}" "${MP4NAME}")
fi
if [[ "${FORMAT}" = "matroska" ]] ; then
if [[ "${FORMAT}" = "Matroska" ]] ; then
_review_option "EMBED_LOGS_CHOICE" "${EMBED_LOGS_OPTIONS[@]}"
fi
fi
Expand Down Expand Up @@ -3154,6 +3159,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}}')
Expand Down