-
Notifications
You must be signed in to change notification settings - Fork 178
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
Put real segment duration into .m3u8 manifest on the broadcaster #1522
Comments
They should add it.
In theory we could also update the duration after insertion. Probably not good for playback, but maybe OK for metrics. We could also reset the "default" duration after the first segment is transcoded, or set the default duration to the largest seen so far. This helps with the actual reasons we track durations on the node: latency calculations, segment timeout and fee estimation. Might be okay if the duration is somewhat consistent. Yet another approach would be to formalize HLS ingest by taking m3u8s and parsing the segmemt duration out of that. But that doesn't work if HLS is not being used (eg, MP4 sources), and won't do us any favors with latency or internal complexity. |
Yes, this will solve our immediate problem, but generally we shouldn't be relying on the information provided by sender.
Love this idea!
Can you explain this please? I don't understand. |
If it's there we should be able to trust it (absent obviously outrageous values which we already check for), because that's the fastest method of getting everything to work reliably. If they send us incorrect values, they are only hurting their own success rate. We could still use a post-transcode fixup as a form of double-checking the duration; it's not mutually exclusive with a user-supplied duration.
Perhaps; I hadn't thought of it until now. The initial duration would still be incorrect (might affect timeouts, for example), and I think we'd have similar issues if the duration has a tendency to fluctuate between segments. But as a data point, receiving the duration from the transcoder could still be helpful.
We can do HLS ingest, eg |
Totally agree.
Filed livepeer/lpms#195
Got it, thanks. I know that ffmpeg send .m3u8 manifests, but didn't think anyone really uses this. Anyway, supporting such thing is really out of scope for us. |
Is your feature request related to a problem? Please describe.
Currently HTTP ingest relies on the sender to determine segment duration (duration being sent
using HTTP header). In case duration was not sent (and Mist server do not sends duration) default
value of 2 seconds used.
Segment duration value is not used in the transcoding pipeline, but it being set to the .m3u8
manifest. And .m3u8 manifest is only way we can get statistical data out of broadcaster.
In Livepeer API we want to count segments transcoded by the broadcaster and also we want to
get duration of each segment. We can get number of segments passed through broadcaster by
constantly retrieving stream manifest and counting segments in them, but there is no accurate
duration information in them.
Possible solutions
1.1. Add probing functino to LPMS
1.2. Probe using
joy4
- quicker to implement, but less compatibilityWith this variant there will be no duration information for the source segment at
the time it gets inserted in the playlist, but this will not add additional compute.
The text was updated successfully, but these errors were encountered: