stream.segmented: add --stream-segmented-duration #6705
Merged
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.
Closes #5450
Replaces #5493, #5601
This is a rebase of #5601 with some additional changes. The main goal is to replace
--hls-durationwith a new--stream-segmented-durationCLI arg + session option that affects all segmented streams.In addition to that,
DASHStreams now also have adurationargument that can be used fordash://URL duration=...inputs.The last commit is a fix for the Twitch plugin. Since ad segments always get filtered out, ad segments need a duration of zero, or they affect the duration counter. I'm aware that other plugins also filter out segments and that there's the (not-so-well-designed)
--hls-ignore-namesoption, but those affect the writer threads, so durations of those filtered-out segments always are counted. This can be fixed at some point later.The related
hls-start-offsetcan be done later. I don't care about this for now. I want to finally update the stream implementations, and this is a first step that needs to be done. One small change at a time.