Skip to content

Commit

Permalink
Fix overriding supported codeces
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaserlang committed Dec 17, 2023
1 parent d3a5dc7 commit 99a8dc6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions seplis_play_server/transcoders/hls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',]
Expand Down

0 comments on commit 99a8dc6

Please sign in to comment.