Skip to content

Commit

Permalink
feat: Add generate_iframe_playlist option
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Nov 11, 2024
1 parent 172b65c commit b28d98e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions streamer/packager_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from . import pipeline_configuration

from streamer.bitrate_configuration import AudioCodec
from streamer.bitrate_configuration import VideoCodec
from streamer.input_configuration import MediaType
from streamer.output_stream import OutputStream
from streamer.pipeline_configuration import EncryptionMode, PipelineConfig
Expand Down Expand Up @@ -141,6 +142,11 @@ def _setup_stream(self, stream: OutputStream) -> str:
if stream.type == MediaType.AUDIO:
dict['hls_group_id'] = str(cast(AudioCodec, stream.codec).value)

if stream.type == MediaType.VIDEO &&
self._pipeline_config.generate_iframe_playlist:
dict['iframe_playlist_name:'] = str(cast(VideoCodec, stream.codec).value) +
'.m3u8'

if stream.input.drm_label:
dict['drm_label'] = stream.input.drm_label

Expand Down
3 changes: 3 additions & 0 deletions streamer/pipeline_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ class PipelineConfig(configuration.Base):
Must be true for live content.
"""

generate_iframe_playlist = configuration.Field(bool, default=True).cast()
"""If true, the iFrame playlist will be generated."""

availability_window = configuration.Field(int, default=300).cast()
"""The number of seconds a segment remains available."""

Expand Down

0 comments on commit b28d98e

Please sign in to comment.