From 99a8dc66416d3f306156090fe1080d4dde44a32b Mon Sep 17 00:00:00 2001 From: Thomas Erlang Date: Sun, 17 Dec 2023 16:07:34 +0100 Subject: [PATCH] Fix overriding supported codeces --- seplis_play_server/transcoders/hls.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/seplis_play_server/transcoders/hls.py b/seplis_play_server/transcoders/hls.py index 27eefd6..2bc7688 100644 --- a/seplis_play_server/transcoders/hls.py +++ b/seplis_play_server/transcoders/hls.py @@ -12,11 +12,12 @@ class Hls_transcoder(video.Transcoder): media_name: str = 'media.m3u8' + CODECES = ('h264', 'hevc') def __init__(self, settings: video.Transcode_settings, metadata: dict): - if settings.transcode_video_codec not in ('h264', 'hevc'): + if settings.transcode_video_codec not in self.CODECES: settings.transcode_video_codec = 'h264' - settings.supported_video_codecs = ['h264', 'hevc'] + settings.supported_video_codecs = [c for c in settings.supported_video_codecs if c in self.CODECES] if settings.format == 'hls.js': # Find out if hls.js supports other that aac, e.g. eac3 doesn't work settings.supported_audio_codecs = ['aac',]