Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi period for HLS #83

Merged
merged 71 commits into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
f3d5d93
multi-input & multi-period concat proposal
mariocynicys Jun 9, 2021
d562720
doc string for inputs_list and single_inputs
mariocynicys Jun 9, 2021
8fa9720
adding period concatenation for dash
mariocynicys Jun 20, 2021
e806d66
adding period concat to LIVE for DASH
mariocynicys Jun 21, 2021
f239954
using regex for iso8601 duration parsing
mariocynicys Jun 22, 2021
0ce17f6
reverting unrelated changes
mariocynicys Jun 23, 2021
3f0aaef
limiting to 2 conflicting/required-exclusive fields
mariocynicys Jun 23, 2021
71e50b0
using BaseURL to specify the nested period directories
mariocynicys Jun 23, 2021
6b51750
minor edits
mariocynicys Jun 23, 2021
5a91827
minor edits2
mariocynicys Jun 23, 2021
9c5d4c1
minor edits3
mariocynicys Jun 23, 2021
e9cc4da
minor edits4
mariocynicys Jun 23, 2021
17ca8c2
so to not to stuck Running if one packager node errors
mariocynicys Jun 23, 2021
95d7510
adding tests
mariocynicys Jun 26, 2021
d1dd0cf
using getDuration() instead of seekRange()
mariocynicys Jun 27, 2021
11ea3a2
style code
mariocynicys Jun 28, 2021
ab8574e
text and video streams concatenation for hls
mariocynicys Jul 11, 2021
7f781b2
substitution for missing langs + audio concatenation
mariocynicys Jul 15, 2021
079213a
add the language attribute only if it's not undefined
mariocynicys Jul 15, 2021
9ffece7
support for audio-only period concatenation
mariocynicys Jul 15, 2021
d8c90a6
minor edits
mariocynicys Jul 17, 2021
395b3cc
removing support for non-existing audio or video for some periods
mariocynicys Jul 17, 2021
85c63ea
no need for this conditional
mariocynicys Jul 17, 2021
3d987ea
we should break after we find the nearest channel
mariocynicys Jul 17, 2021
109a485
cleaning
mariocynicys Jul 19, 2021
1125784
more cleaning
mariocynicys Jul 19, 2021
18d6ae5
Merge branch 'multi-period' into HLS-merge-conflicts
mariocynicys Jul 20, 2021
a80c398
Merge pull request #2 from meryacine/HLS-merge-conflicts
mariocynicys Jul 20, 2021
efdf6ea
to pass the assertion for the subtitle playlists
mariocynicys Jul 20, 2021
442d456
amend this
mariocynicys Jul 21, 2021
91da441
channel as an input feature
mariocynicys Jul 21, 2021
54f2e6e
channel_layouts, a list of channel layouts to encode
mariocynicys Jul 28, 2021
aef9678
updating the docstring for channel_layout input field
mariocynicys Jul 28, 2021
9bd8c7e
printing the right values of a field when malformedfield error is raised
mariocynicys Jul 28, 2021
24e6cfd
Revert "printing the right values of a field when malformedfield erro…
mariocynicys Jul 28, 2021
0a12113
printing the valid values of a validating type for RuntimeMapKeyValid…
mariocynicys Jul 28, 2021
a732206
dont push, amend!
mariocynicys Jul 29, 2021
77eca8c
a proposal to make resolutions and channel_layouts fields non-required
mariocynicys Jul 31, 2021
057cc7f
dont push, amend!
mariocynicys Aug 2, 2021
dcf39b4
defaulting to the whole bitrate configuration lists when not set
mariocynicys Aug 3, 2021
a1db72f
resolving conflicts
mariocynicys Aug 5, 2021
3cfbbc9
editing config files
mariocynicys Aug 5, 2021
3dede6d
resolving conflicts?
mariocynicys Aug 5, 2021
097447c
we will no longer use this module
mariocynicys Aug 5, 2021
a245b78
much expressive examples
mariocynicys Aug 5, 2021
fe4fbb8
Merge branch 'master' into channel-as-input-feature
mariocynicys Aug 6, 2021
92b9f03
using the windows monkey-patch for subprocess
mariocynicys Aug 6, 2021
805bf2b
type: ignore because 'streamer\subprocessWindowsPatch.py:100: error: …
mariocynicys Aug 6, 2021
d671575
addressing a tiny TODO
mariocynicys Aug 6, 2021
07dd21d
using sys.platform so mypy doesn't check platform specific code areas…
mariocynicys Aug 7, 2021
ac439e8
minor edit
mariocynicys Aug 9, 2021
53af11e
merging with latest changes
mariocynicys Aug 9, 2021
d6366bf
amend to this
mariocynicys Aug 9, 2021
d97823c
Major change for the concat_aud_common
mariocynicys Aug 10, 2021
2377623
basic refactoring
mariocynicys Aug 11, 2021
31922b7
amend to me
mariocynicys Aug 12, 2021
c2575de
open files for appending so we can have the logs from all the nodes
mariocynicys Aug 15, 2021
b367aae
1-indexing the period dircotry names
mariocynicys Aug 15, 2021
5bbcf39
no need to store the output_stream to the media playlist
mariocynicys Aug 15, 2021
0cdafc1
some clarifications, comments, doc strings, and assertions
mariocynicys Aug 16, 2021
9000caa
merging with master for a clear diff
mariocynicys Aug 16, 2021
794225a
fixing typos
mariocynicys Aug 16, 2021
3cf34c8
var instead of inf + spliting a long line
mariocynicys Aug 16, 2021
d1bd891
forgot to raise it O_O
mariocynicys Aug 16, 2021
b1956da
addressing the requested changes, revision-1
mariocynicys Aug 17, 2021
f36ec02
addressing the requested changes, revision-2
mariocynicys Aug 17, 2021
c1118ee
indexing the trancoder and packager nodes
mariocynicys Aug 17, 2021
8cd1a38
fix indexing
mariocynicys Aug 17, 2021
1d7f98b
omitting the count and remaining variables
mariocynicys Sep 2, 2021
0539d10
resolving conflicts
mariocynicys Sep 3, 2021
9a142dc
typos :(
mariocynicys Sep 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions streamer/controller_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ def start(self, output_location: str,
# Create one Transcoder node and one Packager node for each period.
for i, singleperiod in enumerate(self._input_config.multiperiod_inputs_list):
sub_dir_name = 'period_' + str(i + 1)
self._append_nodes_for_inputs_list(singleperiod.inputs, output_location, sub_dir_name)
self._append_nodes_for_inputs_list(singleperiod.inputs,
output_location,
sub_dir_name, i)

if self._pipeline_config.streaming_mode == StreamingMode.VOD:
packager_nodes = [node for node in self._nodes if isinstance(node, PackagerNode)]
Expand All @@ -180,14 +182,18 @@ def start(self, output_location: str,

return self

def _append_nodes_for_inputs_list(self, inputs: List[Input], output_location: str,
period_dir: Optional[str] = None) -> None:
def _append_nodes_for_inputs_list(self, inputs: List[Input],
output_location: str,
period_dir: Optional[str] = None,
index: int = 0) -> None:
"""A common method that creates Transcoder and Packager nodes for a list of Inputs passed to it.

Args:
inputs (List[Input]): A list of Input streams.
output_location (str): A path were the packager will write outputs in.
period_dir (Optional[str]): A subdirectory name where a single period will be outputted to.
If passed, this indicates that inputs argument is one period in a list of periods.
index (int): The index of the current Transcoder/Packager nodes.
"""

outputs: List[OutputStream] = []
Expand Down Expand Up @@ -249,7 +255,8 @@ def _append_nodes_for_inputs_list(self, inputs: List[Input], output_location: st

self._nodes.append(TranscoderNode(inputs,
self._pipeline_config,
outputs))
outputs,
index))

# If the inputs list was a period in multiperiod_inputs_list, create a nested directory
# and put that period in it.
Expand All @@ -259,7 +266,8 @@ def _append_nodes_for_inputs_list(self, inputs: List[Input], output_location: st

self._nodes.append(PackagerNode(self._pipeline_config,
output_location,
outputs))
outputs,
index))

def check_status(self) -> ProcessStatus:
"""Checks the status of all the nodes.
Expand Down
Loading