python-codecs: use non hw accelerated h265 by default

This commit is contained in:
Koushik Dutta
2023-10-17 10:38:14 -07:00
parent d1b57ed3ad
commit f8bcf196d3
4 changed files with 32 additions and 4 deletions

View File

@@ -62,6 +62,7 @@ class GstreamerGenerator(
options,
filter,
self.storage.getItem("h264Decoder"),
self.storage.getItem("h265Decoder"),
self.storage.getItem("postProcessPipeline"),
)
@@ -81,6 +82,20 @@ class GstreamerGenerator(
],
"combobox": True,
},
{
"key": "h265Decoder",
"title": "H25 Decoder",
"description": "The Gstreamer pipeline to use to decode H265 video.",
"value": self.storage.getItem("h265Decoder") or "Default",
"choices": [
"Default",
"decodebin",
"vtdec_hw",
"nvh265dec",
"vaapih265dec",
],
"combobox": True,
},
{
"key": "postProcessPipeline",
"title": "Post Process Pipeline",
@@ -229,11 +244,12 @@ class CodecFork:
options: scrypted_sdk.VideoFrameGeneratorOptions,
filter: Any,
h264Decoder: str,
h265Decoder: str,
postProcessPipeline: str,
) -> scrypted_sdk.VideoFrame:
async for data in self.generateVideoFrames(
gstreamer.generateVideoFramesGstreamer(
mediaObject, options, filter, h264Decoder, postProcessPipeline
mediaObject, options, filter, h264Decoder, h265Decoder, postProcessPipeline
),
"gstreamer",
options and options.get("firstFrameOnly"),