Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame index is not consistent #1332

Closed
cecarlsen opened this issue Oct 14, 2022 · 7 comments
Closed

Frame index is not consistent #1332

cecarlsen opened this issue Oct 14, 2022 · 7 comments
Labels
stale Stale Windows Windows platform

Comments

@cecarlsen
Copy link

cecarlsen commented Oct 14, 2022

Describe the issue
The actual frame displayed and the frame index that you can deduct from the values provided by AVProVideo does not always match up. This is extremely important in my case because I am unpacking each frame using frame index specific metadata.

Your Setup (please complete the following information):

  • Unity version: 2022.1.11f1
  • AVPro Video version (number and edition (trial/core/ultra/enterprise)): 2.6.4 Ultra.
  • Operating system version: Windows 10.
  • Device model: RTX 3070
  • Video specs (resolution, frame-rate, codec, file size): 4K, tried both frame rates of 25, 29.97 and 30, HAP, 73mb.

To Reproduce

  1. Download test package from here [redacted] (also send to support email)
  2. Run the scene "VideoPlayerFrameIndexConsistency".
  3. Pause the Editor at random times and you will see that the index in the video and the index computed are not matching.

Screenshots
FrameIndexInconsistencyAVProMedia

Forum posts
https://forum.unity.com/threads/released-avpro-video-complete-video-playback-solution.385611/page-98#post-8320803
https://forum.unity.com/threads/released-avpro-video-complete-video-playback-solution.385611/page-98#post-8390547

@Chris-RH Chris-RH added the Windows Windows platform label Oct 14, 2022
@Chris-RH
Copy link
Collaborator

Hi @cecarlsen,
If you use Directshow video API, it is more accurate the MediaFoundation.

@cecarlsen
Copy link
Author

I am already using DirectShow. I need accurate, not "more accurate".

@Ste-RH
Copy link
Collaborator

Ste-RH commented Oct 24, 2022

We believe this is a rounding error. Whilst we investigate, you can make the following adjustment in Helper.cs that should provide you with a 1:1 relationship. Do let us know.

image

@cecarlsen
Copy link
Author

Thanks for getting back @Ste-RH unfortunately it does not help. I am testing using the test project I send you. Unity 2020.1.11.f1.

@Ste-RH
Copy link
Collaborator

Ste-RH commented Oct 25, 2022

Using the editor to pause is not a reliable way to test.

Instead I added video pausing/playing to your AVProVideoMediaPlayerController class:

void Update()
{
	if (Input.GetKeyUp(KeyCode.Q))
	{
		_player.Pause();
	}
	if (Input.GetKeyUp(KeyCode.P))
	{
		_player.Play();
	}
}

@cecarlsen
Copy link
Author

Aha! I see. It actually works. + 0.01 ... who would have known! Thank you =)

@stale
Copy link

stale bot commented Nov 12, 2022

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 stale bot added the stale Stale label Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale Windows Windows platform
Projects
None yet
Development

No branches or pull requests

3 participants