RenderHeads / UnityPlugin-AVProVideo

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

PlaylistMediaPlayer Bugs #903

Closed michelepanegrossi closed 2 years ago

michelepanegrossi commented 3 years ago

Describe the issue A clear and concise description of what the issue is.

I am trying to have a plylist where I can occasionally pause one video and scrub it using a slider.

I am experiencing the follwoing bugs when using the PlaylistMediaPlayer component:

It could be an issues with my test.mp4 video (included in emailed project) (HEVC HLG HDR format) or it could be an issue with my graphics card being too old. Or is this a bug?

My code here:

`using System.Collections; using System.Collections.Generic; using UnityEngine; using RenderHeads.Media.AVProVideo; using UnityEngine.UI;

public class testPlay : MonoBehaviour { public PlaylistMediaPlayer pmp; int frame = 0;

public Slider _slider;

bool scrubbing = false;

private void Update()
{

    if(scrubbing)
    {
        float frameRate = pmp.Info.GetVideoFrameRate();
        float totalFrames = pmp.Info.GetMaxFrameNumber();
        double time = Helper.ConvertFrameToTimeSeconds(frame, frameRate);

        pmp.Control.Seek(time);
        frame = (int)(_slider.value * totalFrames);
    }

}

//This functon is called from UI buttons
public void PlayVideoAtPosition(int position)
{

    if (pmp.CanJumpToItem(position))
    {
        pmp.JumpToItem(position);
    }

    if (position == 2)
    {
        frame = 0;
        _slider.value = 0f;
        pmp.Control.Pause();
        scrubbing = true;
    }
    else
    {
        pmp.Control.Play();
        scrubbing = false;
    }
}

} `

Your Setup (please complete the following information):

To Reproduce

  1. Project has been emailed as requested
  2. Open AvPro Video -> Demos -> Scenes -> Test
  3. Use buttons 0,1,2 to jump through the playlist. Only video 2 can be scrubbed. Use the slider to scrub. Jumping a few times between videos highlights the issues described above, as they do not happen every time.

Logs If applicable, add error logs to help explain your problem.

Screenshots If applicable, add screenshots to help explain your problem.

Videos If applicable, add a copy of your video or the URL

I am using AVPro provided videos apat from one video which is included in project streaming assets folder and it is called test.mp4. Project has been emailed as requested.

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

Instead email the link to us unitysupport@renderheads.com

kahnivore commented 3 years ago

Hi @michelepanegrossi

Yes, the first issue regarding the volume of the first item of playlist being zero has been confirmed and will be fixed in our next release 2.1.9 which should be out soon.

Haven't managed to reproduce the second issue regarding pause() - both playlist.Pause() and playlist.Control.Pause() pause the audio in my test project.

Will have a look at the project you sent regarding issue 2 and 3.

stale[bot] commented 3 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.

Ste-RH commented 2 years ago

AVPro Video v2.5.3 has just been released and includes fixes for this issue.