Skip to content

Commit

Permalink
Fix crash on certain res for legacy macs
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Jan 17, 2024
1 parent a26310b commit 0f2182c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion auto_editor/render/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os.path
from dataclasses import dataclass
from subprocess import DEVNULL, PIPE
from sys import platform
from typing import TYPE_CHECKING

import av
Expand Down Expand Up @@ -111,7 +112,6 @@ def make_image_cache(tl: v3) -> dict[tuple[FileInfo, int], np.ndarray]:
format="rgb24"
)
break

return img_cache


Expand Down Expand Up @@ -198,6 +198,10 @@ def render_av(
target_pix_fmt,
]

if platform == "darwin":
# Fix videotoolbox issue with legacy macs
cmd += ["-allow_sw", "1"]

if apply_video_later:
cmd += ["-c:v", "mpeg4", "-qscale:v", "1"]
else:
Expand Down

0 comments on commit 0f2182c

Please sign in to comment.