Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix motion returning lower values than it should #541

Merged
merged 1 commit into from
Sep 27, 2024
Merged
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: 1 addition & 1 deletion auto_editor/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "25.3.0"
__version__ = "25.3.0rc1"
7 changes: 5 additions & 2 deletions auto_editor/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def iter_motion(src, tb, stream: int, blur: int, width: int) -> Iterator[np.floa

prev_frame = None
current_frame = None
total_pixels = src.videos[0].width * src.videos[0].height
total_pixels = None
index = 0
prev_index = -1

Expand All @@ -132,10 +132,13 @@ def iter_motion(src, tb, stream: int, blur: int, width: int) -> Iterator[np.floa
continue

graph.push(unframe)
frame = graph.pull()
frame = graph.vpull()
assert frame.time is not None
index = round(frame.time * tb)

if total_pixels is None:
total_pixels = frame.width * frame.height

current_frame = frame.to_ndarray()
if prev_frame is None:
value = np.float32(0.0)
Expand Down
2 changes: 2 additions & 0 deletions changelogs/2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
## Features
- Add `-dn` option. Allows data streams to be dropped from final output.
- Allow using older version of final cut pro. Example: `--export final-cut-pro:version=10`

## Fixes
- Add file "last modified time" to cache string. Fixes #536
- Fix `motion` returning lower values than it should.

**Full Changelog**: https://github.com/WyattBlue/auto-editor/compare/25.2.0...25.3.0

Expand Down