Skip to content

Commit e727497

Browse files
committed
Use target frame rate for op to handle downsampling
1 parent 73a7e8d commit e727497

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

client/src/components/annotators/NativeVideoAnnotator.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ export default defineComponent({
128128
* Get the URL for a specific frame
129129
*/
130130
function getFrameUrl(frameNumber: number): string {
131-
const fps = videoInfo.value?.fps || props.originalFps || props.frameRate;
132-
return `${baseApiUrl}/frame?path=${encodeURIComponent(props.nativeVideoPath)}&frame=${frameNumber}&fps=${fps}`;
131+
// Use annotation frame rate since frameNumber is an annotation frame number.
132+
// timestamp = frameNumber / annotationFps gives the correct time in the video.
133+
return `${baseApiUrl}/frame?path=${encodeURIComponent(props.nativeVideoPath)}&frame=${frameNumber}&fps=${props.frameRate}`;
133134
}
134135
135136
/**

0 commit comments

Comments
 (0)