diff --git a/seplis_play_server/transcoders/hls.py b/seplis_play_server/transcoders/hls.py index c9f7103..c6ef052 100644 --- a/seplis_play_server/transcoders/hls.py +++ b/seplis_play_server/transcoders/hls.py @@ -18,6 +18,10 @@ def __init__(self, settings: video.Transcode_settings, metadata: dict): settings.transcode_video_codec = 'h264' # Still issues with hevc settings.supported_video_codecs = ['h264',] + 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',] + settings.transcode_audio_codec = 'aac' super().__init__(settings, metadata) def ffmpeg_extend_args(self) -> None: diff --git a/seplis_play_server/transcoders/video.py b/seplis_play_server/transcoders/video.py index b4ad53b..e04baf1 100644 --- a/seplis_play_server/transcoders/video.py +++ b/seplis_play_server/transcoders/video.py @@ -15,7 +15,7 @@ class Transcode_settings: source_index: int supported_video_codecs: Annotated[list[constr(min_length=1)], Query()] supported_audio_codecs: Annotated[list[constr(min_length=1)], Query()] - format: Literal['pipe', 'hls', 'dash'] + format: Literal['pipe', 'hls', 'hls.js', 'dash'] transcode_video_codec: Literal['h264', 'hevc', 'vp9'] transcode_audio_codec: Literal['aac', 'opus', 'dts', 'flac', 'mp3'] @@ -243,7 +243,7 @@ def set_video(self): self.ffmpeg_args.extend([ {'-start_at_zero': None}, {'-avoid_negative_ts': 'disabled'}, - #{'-copyts': None}, + {'-copyts': None}, ]) else: if config.ffmpeg_hwaccel_enabled: