Skip to content

Commit

Permalink
Fix issue with e.g. edge supporting eac3 but eac3 doesn't work with h…
Browse files Browse the repository at this point in the history
…ls.js
  • Loading branch information
thomaserlang committed Dec 14, 2023
1 parent d91e6ab commit f018809
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions seplis_play_server/transcoders/hls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions seplis_play_server/transcoders/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f018809

Please sign in to comment.