Skip to content

Commit

Permalink
bump to 31 and attempt to fix vulkan/cuda interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
GBeauregard committed Jun 29, 2024
1 parent ea0659d commit 86038d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi"
name = "pyffstream"
readme = "README.md"
license = {file = "LICENSE"}
version = "0.0.30"
version = "0.0.31"
authors = [{name = "Gregory Beauregard", email = "[email protected]"}]
dynamic = ["description"]
keywords = ["ffmpeg", "streaming", "srt", "rtmp"]
Expand Down
4 changes: 3 additions & 1 deletion src/pyffstream/encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -1898,13 +1898,15 @@ def set_input_flags(fv: EncodeSession) -> None:
"-hwaccel", "cuda",
"-init_hw_device", "cuda=cud",
"-hwaccel_device", "cud",
"-filter_hw_device", "cud",
*(("-filter_hw_device", "cud") if not fv.ev.vulkan else ()),
]
# fmt: on
elif fv.ev.hwaccel:
hwaccel_flags = ["-hwaccel", "auto"]
if fv.ev.vulkan and "vulkan" in ffmpeg.ff_bin.hwaccels:
device_str = "" if fv.ev.vulkan_device == -1 else f":{fv.ev.vulkan_device}"
if fv.ev.vencoder.type is EncType.NVIDIA:
device_str += ",disable_multiplane=1"
hwaccel_flags += ["-init_hw_device", f"vulkan=vulk{device_str}"]
input_flags = [
*fv.ev.ffprogress.flags(0.25),
Expand Down

0 comments on commit 86038d6

Please sign in to comment.