Skip to content

Commit

Permalink
Use pyproject.toml only
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Dec 9, 2023
1 parent 4e9eaa1 commit cb42932
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 78 deletions.
1 change: 1 addition & 0 deletions auto_editor/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ def pixeldiff(self, s: int) -> NDArray[np.uint64]:
axis=0,
)

assert isinstance(frame, av.VideoFrame)
image = frame.to_image()

if prev_image is not None:
Expand Down
3 changes: 1 addition & 2 deletions auto_editor/make_layers.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from __future__ import annotations

import os
from fractions import Fraction
from typing import TYPE_CHECKING, Any, NamedTuple

import numpy as np

from auto_editor.analyze import FileSetup, Levels
from auto_editor.ffwrapper import FFmpeg, FileInfo, initFileInfo
from auto_editor.ffwrapper import FFmpeg, FileInfo
from auto_editor.lang.palet import Lexer, Parser, env, interpret, is_boolarr
from auto_editor.lib.data_structs import print_str
from auto_editor.lib.err import MyError
Expand Down
4 changes: 2 additions & 2 deletions auto_editor/render/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def render_av(
stream = cn.streams.video[0]
stream.thread_type = "AUTO"

if args.no_seek or stream.average_rate is None:
if args.no_seek or stream.average_rate is None or stream.time_base is None:
sc_val = 4294967295 # 2 ** 32 - 1
tou = 0
else:
Expand All @@ -105,7 +105,7 @@ def render_av(
tous[src] = tou
decoders[src] = cn.decode(stream)

if src == first_src:
if src == first_src and stream.pix_fmt is not None:
target_pix_fmt = stream.pix_fmt

log.debug(f"Tous: {tous}")
Expand Down
40 changes: 40 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[build-system]
requires = ["setuptools>=48.0.0", "wheel"]

[project]
name = "auto-editor"
description = "Auto-Editor: Effort free video editing!"
readme = "README.md"
license = { text = "Unlicense" }
authors = [{ name = "WyattBlue", email = "[email protected]" }]
requires-python = ">=3.10"
dependencies = [
"numpy>=1.22.0",
"pillow==10.1.0",
"pyav==11.4.1",
"ae-ffmpeg==1.1.*",
]
keywords = [
"video", "audio", "media", "editor", "editing",
"processing", "nonlinear", "automatic", "silence-detect",
"silence-removal", "silence-speedup", "motion-detection",
]
dynamic = ["version"]

[tool.setuptools.packages]
find = {}

[tool.setuptools.dynamic]
version = {attr = "auto_editor.__version__"}

[project.urls]
"Bug Tracker" = "https://github.com/WyattBlue/auto-editor/issues"
"Source Code" = "https://github.com/WyattBlue/auto-editor"
homepage = "https://auto-editor.com"

[project.scripts]
"auto-editor" = "auto_editor.__main__:main"
aedesc = "auto_editor.subcommands.desc:main"
aeinfo = "auto_editor.subcommands.info:main"
aesubdump = "auto_editor.subcommands.subdump:main"
aelevels = "auto_editor.subcommands.levels:main"
74 changes: 0 additions & 74 deletions setup.py

This file was deleted.

0 comments on commit cb42932

Please sign in to comment.