FFmpegInteropX: Duration does not Update with HLS Live Streams

There are so many duration properties…

                var d1 = this.FfmpegMss.FormatInfo.Duration;
                var d2 = this.FfmpegMss.Duration;
                var d3 = this.FfmpegMss.GetMediaStreamSource().Duration;
                var d4 = this.FfmpegMss.PlaybackItem.StartTime;
                var d5 = this.FfmpegMss.PlaybackItem.Source.Duration;
                var d6 = this.FfmpegMss.PlaybackItem.Source.MediaStreamSource.Duration;
                var d7 = this.FfmpegMss.PlaybackSession?.NaturalDuration;
                var d8 = this.FfmpegMss.PlaybackSession?.MediaPlayer.TimelineController.Duration;

Unfortunately all are zero when using an HLS live stream (where the duration is continuously expanding). Do you have any idea how to get accurate duration values in this case?

I haven’t tried the Windows.Media adaptive streaming source, but then I would loose all FFmpegInteropX functionality, right?

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Comments: 72 (12 by maintainers)

Most upvoted comments

If you use an AdaptiveMediaSource, do you get the desired behavior?

The really annoyance of all that is not the IDL editing - it’s that you need to always (when manually) need to make the same change at 5 different places and make no mistakes…I really don’t like that, it just slows you down.

Ooups, it is not in the IDL. Having to manually edit the IDL was a problem waiting to happen.