Share via

Negative MediaStreamSourceSample SampleLag

Rich Logan 1 Reputation point
2020-10-13T13:44:49.723+00:00

Hi there,

I'm having some occassional issues with MediaPlayer playback - this specifically appears to occur on the ARM64 Hololens 2 but this is more a question around MediaPlayer APIs.

I am using MediaPlayer/MediaStreamSample to decode and render a live H264 stream. Everything is working pretty well, but ocassionally when running the SampleLag (https://learn.microsoft.com/en-us/uwp/api/windows.media.core.mediastreamsourcesamplerenderedeventargs.samplelag?view=winrt-19041) will continually get reported as negative from the start of a stream (and never recover). The visual result of this is about a second or two of additional latency behind "realtime". Most of the time the SampleLag will be consistent ~30ms and effectively be rendering in real-time correctly. A teardown of the MediaPlayer will usually fix it even while keeping the live stream up, which suggests the stream itself is okay.

I can't figure out why this is happening and all timestamps seem to be correct. Does a negative SampleLag not mean that the MediaPlayer thinks it's rendering the frames ahead of when they should be shown? Is that possible in a live stream? My MediaPlayer is operating in realtime mode with real time playback, frame server and isLive all turned on; buffer time 0; can seek false.

This problem does seem to be localized to ARM64 but I can't 100% guarentee that.

Community Center | Not monitored
0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2020-10-14T02:56:20.867+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Currently, Microsoft Q&A supports the products listed over here: supported topics (more to be added later on).

    Your question about Hololens is not supported yet now. The Hololens support team is actively answering questions with hololens tag on stackoverflow.

    Thank you.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.