Skip to content

Fix bug in the video cropping where it wasn't using the videos pts but using the cpu's system current millis - #248

Merged
PotatoPeeler3000 merged 1 commit into
developfrom
bugfix/cropping-video-speeds
Jul 13, 2026
Merged

Fix bug in the video cropping where it wasn't using the videos pts but using the cpu's system current millis#248
PotatoPeeler3000 merged 1 commit into
developfrom
bugfix/cropping-video-speeds

Conversation

@PotatoPeeler3000

Copy link
Copy Markdown
Collaborator

No description provided.

long videoTimestamp = CaptureTimeTools.timeSinceStartedCaptureInMicroseconds(System.currentTimeMillis(), startTime);
// Use the frame's original PTS (relative to the crop start) so playback speed matches the source
// recording, regardless of how fast this machine happens to decode/encode during cropping.
long videoTimestamp = magewellDemuxer.getCurrentPTS() - startVideoTimestamp;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to depend on System.currentTimeMillis() because different CPU performances will have different timings

@PotatoPeeler3000
PotatoPeeler3000 merged commit d2b118b into develop Jul 13, 2026
3 checks passed
@PotatoPeeler3000
PotatoPeeler3000 deleted the bugfix/cropping-video-speeds branch July 13, 2026 16:10
PotatoPeeler3000 added a commit that referenced this pull request Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant