RenderHeads / UnityPlugin-AVProVideo

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

Video with spatial audio is started only once #1870

Closed rrenderr closed 1 week ago

rrenderr commented 1 month ago

Describe the issue Video with spatial audio is started only once. After the second start of the same video, it doesn't play anymore. Also, I get MediaPlayerEvent.EventType.MetaDataReady event only once, at first start. I started other videos with spatial audio and I don't get MetaDataReady event. If I open a video without spatial audio, everything works fine.

My Setup:

To Reproduce

  1. Start a video with spatial sound - currentPlayer.OpenMedia()
  2. Close media player - currentPlayer.CloseMedia()
  3. Start the same video again - currentPlayer.OpenMedia()
  4. The video doesn't play anymore.

Logs These are logs of events from MediaPlayer Screen1

Screenshots MediaPlayer setup Screen2

Chris-RH commented 1 month ago

Are you able to provide a sample of the media played? either here or unitysupport@renderheads.com Can you provide a full logcat of the error occurring please, from when the app is opened. Have you tried enabling looping? Have you tried playing the same video, but with the audio track removed?

rrenderr commented 1 month ago

Yes, ofcourse.

logs.txt FB360_CB.zip

Have you tried enabling looping?

It doesn't help.

Have you tried playing the same video, but with the audio track removed?

It works without spatial audio.

Also, I've tried to destroy the player when closing UnityEngine.Object.Destroy(_myPlayer) and create new one when open another. It works, but there is another problem. After a few closures, my app just freezes.

By the way, I have this problem: https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1838 also. Maybe it will help.

Before we used the version of AVP 2.7.3, all these problems weren't presented there.

Ste-RH commented 2 weeks ago

I think this might have been fixed in v3.0.2. I have tried to reproduce this here with the latest version and cannot.

Would it be possible to update, re-test, and feedback @rrenderr ?

Chris-RH commented 2 weeks ago

Any luck @rrenderr ?

rrenderr commented 1 week ago

@Chris-RH I've checked v3.0.3. It works for me now! I can open a video with spatial audio multiple times.

But I have other crash when using SeekFast. I replaced this code

        public override void SeekFast(double toTime)
        {
            SeekWithTolerance(toTime, double.PositiveInfinity, double.PositiveInfinity);
        }

to

        public override void SeekFast(double toTime)
        {
            SeekWithTolerance(toTime, 1000.0, 1000.0);
        }

And it works. It seems like old issue.

Ste-RH commented 1 week ago

That was a bug that was fixed in v3.0.2 and I do not get an issue using SeekFast here.

Can we get a logcat for the crash please?

rrenderr commented 1 week ago

@Ste-RH @Chris-RH Here is the log image FullLog.log

Ste-RH commented 1 week ago

That is not a full log. We need everything from app start (AVPro creation) right through to crash please.

Ste-RH commented 1 week ago

This is the same as #1903 . Please report back in that issue on the SeekFast issue. We will be closing this issue now as the original problem has been addressed.

rrenderr commented 1 week ago

@Ste-RH Done