Skip to content

Commit

Permalink
Fix motion returning lower values than it should
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Sep 27, 2024
1 parent aa46fd1 commit e88f5f5
Showing 3 changed files with 8 additions and 3 deletions.
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
@@ -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

@@ -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)
2 changes: 2 additions & 0 deletions changelogs/2024.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e88f5f5

Please sign in to comment.