-
Notifications
You must be signed in to change notification settings - Fork 62
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
Changes from 2 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
f3d5d93
multi-input & multi-period concat proposal
mariocynicys d562720
doc string for inputs_list and single_inputs
mariocynicys 8fa9720
adding period concatenation for dash
mariocynicys e806d66
adding period concat to LIVE for DASH
mariocynicys f239954
using regex for iso8601 duration parsing
mariocynicys 0ce17f6
reverting unrelated changes
mariocynicys 3f0aaef
limiting to 2 conflicting/required-exclusive fields
mariocynicys 71e50b0
using BaseURL to specify the nested period directories
mariocynicys 6b51750
minor edits
mariocynicys 5a91827
minor edits2
mariocynicys 9c5d4c1
minor edits3
mariocynicys e9cc4da
minor edits4
mariocynicys 17ca8c2
so to not to stuck Running if one packager node errors
mariocynicys 95d7510
adding tests
mariocynicys d1dd0cf
using getDuration() instead of seekRange()
mariocynicys 11ea3a2
style code
mariocynicys ab8574e
text and video streams concatenation for hls
mariocynicys 7f781b2
substitution for missing langs + audio concatenation
mariocynicys 079213a
add the language attribute only if it's not undefined
mariocynicys 9ffece7
support for audio-only period concatenation
mariocynicys d8c90a6
minor edits
mariocynicys 395b3cc
removing support for non-existing audio or video for some periods
mariocynicys 85c63ea
no need for this conditional
mariocynicys 3d987ea
we should break after we find the nearest channel
mariocynicys 109a485
cleaning
mariocynicys 1125784
more cleaning
mariocynicys 18d6ae5
Merge branch 'multi-period' into HLS-merge-conflicts
mariocynicys a80c398
Merge pull request #2 from meryacine/HLS-merge-conflicts
mariocynicys efdf6ea
to pass the assertion for the subtitle playlists
mariocynicys 442d456
amend this
mariocynicys 91da441
channel as an input feature
mariocynicys 54f2e6e
channel_layouts, a list of channel layouts to encode
mariocynicys aef9678
updating the docstring for channel_layout input field
mariocynicys 9bd8c7e
printing the right values of a field when malformedfield error is raised
mariocynicys 24e6cfd
Revert "printing the right values of a field when malformedfield erro…
mariocynicys 0a12113
printing the valid values of a validating type for RuntimeMapKeyValid…
mariocynicys a732206
dont push, amend!
mariocynicys 77eca8c
a proposal to make resolutions and channel_layouts fields non-required
mariocynicys 057cc7f
dont push, amend!
mariocynicys dcf39b4
defaulting to the whole bitrate configuration lists when not set
mariocynicys a1db72f
resolving conflicts
mariocynicys 3cfbbc9
editing config files
mariocynicys 3dede6d
resolving conflicts?
mariocynicys 097447c
we will no longer use this module
mariocynicys a245b78
much expressive examples
mariocynicys fe4fbb8
Merge branch 'master' into channel-as-input-feature
mariocynicys 92b9f03
using the windows monkey-patch for subprocess
mariocynicys 805bf2b
type: ignore because 'streamer\subprocessWindowsPatch.py:100: error: …
mariocynicys d671575
addressing a tiny TODO
mariocynicys 07dd21d
using sys.platform so mypy doesn't check platform specific code areas…
mariocynicys ac439e8
minor edit
mariocynicys 53af11e
merging with latest changes
mariocynicys d6366bf
amend to this
mariocynicys d97823c
Major change for the concat_aud_common
mariocynicys 2377623
basic refactoring
mariocynicys 31922b7
amend to me
mariocynicys c2575de
open files for appending so we can have the logs from all the nodes
mariocynicys b367aae
1-indexing the period dircotry names
mariocynicys 5bbcf39
no need to store the output_stream to the media playlist
mariocynicys 0cdafc1
some clarifications, comments, doc strings, and assertions
mariocynicys 9000caa
merging with master for a clear diff
mariocynicys 794225a
fixing typos
mariocynicys 3cf34c8
var instead of inf + spliting a long line
mariocynicys d1bd891
forgot to raise it O_O
mariocynicys b1956da
addressing the requested changes, revision-1
mariocynicys f36ec02
addressing the requested changes, revision-2
mariocynicys c1118ee
indexing the trancoder and packager nodes
mariocynicys 8cd1a38
fix indexing
mariocynicys 1d7f98b
omitting the count and remaining variables
mariocynicys 0539d10
resolving conflicts
mariocynicys 9a142dc
typos :(
mariocynicys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,8 +144,9 @@ def _set_features(self, streams_map: Dict[str, OutputStream]) -> None: | |
# will have the URI we need, but if we encounter a byterange tag we need to | ||
# advance one more line. | ||
for i in range(len(lines)): | ||
# Don't use #EXT-X-MAP to get the codec, because HLS specs says | ||
# it is an optional tag. | ||
# Don't use the URIs from any tag to try to extract codec information. | ||
# We should not rely on the exact structure of file names for this. | ||
# Use stream_maps instead. | ||
line = lines[i] | ||
if line.startswith('#EXTINF'): | ||
line = lines[i + 1] | ||
|
@@ -406,22 +407,15 @@ def non_nones(items: List[Optional[MediaPlaylist]]) -> List[MediaPlaylist]: | |
# If a playlist is there, append it. | ||
concat_txt_playlist.content += optional_txt_playlist.content | ||
else: | ||
# If the no playlist were found for this period, | ||
# Create a time gap filled with dummy data for the period's duration. | ||
dummy = 'data:text/vtt;charset=utf-8,WEBVTT%0A%0A\n' | ||
# Break the period's duration into target duration count and remains, | ||
# because the target duration might be a prime number, this might | ||
# cause an accumulated rounding error. | ||
td_count = durations[i] / concat_txt_playlist.target_duration | ||
for _ in range(math.floor(td_count)): | ||
concat_txt_playlist.content += '#EXTINF:' + str( | ||
concat_txt_playlist.target_duration) + ',\n' | ||
concat_txt_playlist.content += dummy | ||
# Put whats left in an #EXTINF. | ||
remains = round(durations[i] % concat_txt_playlist.target_duration, 3) | ||
if remains: | ||
concat_txt_playlist.content += '#EXTINF:' + str(remains) + ',\n' | ||
concat_txt_playlist.content += dummy | ||
# If the no playlist were found for this period, we create at time gap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo: at => a |
||
# by filling the period's duration with an empty string. | ||
ext_inf_count = math.ceil(durations[i] / | ||
concat_txt_playlist.target_duration) | ||
for _ in range(ext_inf_count): | ||
concat_txt_playlist.content += ( | ||
'#EXTINF:' + str(durations[i] / ext_inf_count) + ',\n' + | ||
'data:text/vtt;charset=utf-8,WEBVTT%0A%0A\n' | ||
) | ||
# Add a discontinuity after each period. | ||
concat_txt_playlist.content += '#EXT-X-DISCONTINUITY\n\n' | ||
concat_txt_playlists.append(concat_txt_playlist) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you're seeking to the first URI line in the file after EXTINF. Is that right?
This loop is so long, I think I could use a comment just before it, explaining what it's for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Ok, will do.