RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
236 stars 28 forks source link

AVPro Video Windows Edition Livestream HLS Latency #989

Closed KasperSeas closed 2 years ago

KasperSeas commented 2 years ago

Describe the issue When receiving a livestream as HLS, there's a delay of about ~32 sec and we're looking for the lowest delay possible. I tried the offset solution found here: https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/741. The lowest latency I got was about ~25 sec using the seek method that was proposed. Both with WinRT and MediaFoundation Low Live Latency and Low Latency checked. We noticed that when the Unity instance is played right after the stream goes live for 6 seconds, that there's only a 6 second delay. If the Unity instance is played any time after 6 seconds, the delay accumulates all the way up to ~32sec. The 6 second delay seems achievable but it's impractical for our application because we cant time to launch the stream right before a unity instance launches. How could we get that 6 second delay after a stream has launched after a while? Thanks!

Your Setup (please complete the following information):

To Reproduce

  1. Go to AVProVideo demo scene "Demo_MediaPlayer"
  2. Add livestream HLS url .m3u8 as source
  3. Choose Media Foundation video api with "Use Low Latency" checked or WinRT video api with "Low Live Latency" checked *To reproduce 6 second delay:
  4. Start stream (on OBS for example)
  5. Wait close to 6 seconds (I play the scene right away because it takes about 6 seconds to load and play anyways)
  6. Start "Demo_MediaPlayer" scene
  7. Should see a minimum of 6 seconds of delay depending on timing of starting the stream and scene

Delay9sec *Notice the live time on OBS. 15 seconds of being live - 6 second buffer = 9 second delay

*To reproduce up to ~30 seconds delay:

  1. Start stream (on OBS for example)
  2. Wait for 30 seconds
  3. Start "Demo_MediaPlayer" scene
  4. Should see maximum 30 seconds of delay depending on timing of starting the stream and scene.

Delay30sec9

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

skewerb commented 2 years ago

Bumping this issue to prevent it from closing

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

KasperSeas commented 2 years ago

Bumping to remove stale mark

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had recent activity. If you wish to continue this issue, then please create a new issue as we do not monitor closed issues.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had recent activity. If you wish to continue this issue, then please create a new issue as we do not monitor closed issues.