python-codecs: h265 parsing fixes

This commit is contained in:
Koushik Dutta
2023-10-17 11:02:39 -07:00
parent f8bcf196d3
commit 06c8b397f0
3 changed files with 6 additions and 10 deletions

View File

@@ -346,6 +346,8 @@ async def generateVideoFramesGstreamer(
)
if videoCodec == "h264":
pipeline += " ! rtph264depay ! h264parse"
elif videoCodec == "h265":
pipeline += " ! rtph265depay ! h265parse"
decoder = None
@@ -372,13 +374,7 @@ async def generateVideoFramesGstreamer(
setDecoderClearDefault(h265Decoder)
if not decoder:
# hw acceleration is "safe" to use on mac, but not
# on other hosts where it may crash.
# defaults must be safe.
if platform.system() == "Darwin":
decoder = "vtdec_hw"
else:
decoder = "avdec_h265 output-corrupt=false"
decoder = "avdec_h265 output-corrupt=false"
else:
# decodebin may pick a hardware accelerated decoder, which isn't ideal
# so use a known software decoder for h264 and decodebin for anything else.