diff --git a/src/App.jsx b/src/App.jsx index 6a25a018..db598da5 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -378,6 +378,16 @@ const App = memo(() => { return formatDuration({ seconds, shorten, fileNameFriendly }); }, [detectedFps, timecodeFormat, getFrameCount]); + const formatTimeAndFrames = useCallback((seconds) => { + const frameCount = getFrameCount(seconds); + + const timeStr = timecodeFormat === 'timecodeWithFramesFraction' + ? formatDuration({ seconds, fps: detectedFps }) + : formatDuration({ seconds }); + + return `${timeStr} (${frameCount ?? '0'})`; + }, [detectedFps, timecodeFormat, getFrameCount]); + const { captureFrameFromTag, captureFrameFromFfmpeg, captureFramesRange } = useFrameCapture({ formatTimecode, treatOutputFileModifiedTimeAsStart }); // const getSafeCutTime = useCallback((cutTime, next) => ffmpeg.getSafeCutTime(neighbouringFrames, cutTime, next), [neighbouringFrames]); @@ -2365,6 +2375,7 @@ const App = memo(() => { currentSegIndexSafe={currentSegIndexSafe} inverseCutSegments={inverseCutSegments} formatTimecode={formatTimecode} + formatTimeAndFrames={formatTimeAndFrames} onZoomWindowStartTimeChange={setZoomWindowStartTime} playing={playing} isFileOpened={isFileOpened} diff --git a/src/Timeline.jsx b/src/Timeline.jsx index 9660127c..efaeac66 100644 --- a/src/Timeline.jsx +++ b/src/Timeline.jsx @@ -55,7 +55,7 @@ const CommandedTime = memo(({ commandedTimePercent }) => { const Timeline = memo(({ durationSafe, startTimeOffset, playerTime, commandedTime, relevantTime, zoom, neighbouringKeyFrames, seekAbs, apparentCutSegments, - setCurrentSegIndex, currentSegIndexSafe, inverseCutSegments, formatTimecode, + setCurrentSegIndex, currentSegIndexSafe, inverseCutSegments, formatTimecode, formatTimeAndFrames, waveforms, shouldShowWaveform, shouldShowKeyframes, thumbnails, onZoomWindowStartTimeChange, waveformEnabled, showThumbnails, playing, isFileOpened, onWheel, commandedTimeRef, goToTimecode, isSegmentSelected, @@ -330,7 +330,7 @@ const Timeline = memo(({