-
Notifications
You must be signed in to change notification settings - Fork 28
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
Playback rates higher than 400% #1764
Comments
Increasing playback rate usually places more demand on the video decoder and also on the disk/network source, so these limit how high you can set the playback rate. Obviously running Unity itself will have increased overheads as well. What platform are you using? |
OK, I have built this PC for this purpose with a RAID drive and decent GPU. I seem to be able to run the same clips at 1000% of the original speed on Resolume without any issues. I've also use similar videos with VDMX on a Mac rig with similar specs and I was running playback rates this high without an issue. |
You can set the playback rate to values higher than 4x by calling mediaPlayer.Control.SetPlaybackRate. It's set to a maximum of 4 in the editor as we need a reasonable max value to make the slider useful. Simply do the following to playback a video at 30x speed: IEnumerator Start()
{
MediaPlayer mediaPlayer = null;
if (!TryGetComponent<MediaPlayer>(out mediaPlayer))
{
yield return null;
}
// Wait for end of frame to make sure the media player has been initialised
yield return new WaitForEndOfFrame();
mediaPlayer.Control.SetPlaybackRate(30.0f);
} |
Thanks for taking the time to post that. Unfortunately, that doesn't seem to work for me and I have already tried something similar via VS as it still seems to be capped at 400%. I can confirm the correct float (30 in your example) is displayed in the Media Player component while I'm running in editor view and I've also tried changing the range in the Media Player script but that didn't help either. |
I can confirm it works and at a much higher frame rate on MacOS when using OpenCore on the same system. Could it be related to the APFS filesystem? |
No idea why using OpenCore would make a difference. |
I'm not sure either but here are my relevant specs in case it helps and please let me know if you want more details: Gigabyte X299X MB The videos I'm using are encoded in HAP A at 3840 X 2160 with 120fps and it looks like the exact same project in MacOS is handling 3 of them playing at the same time with at least 10x the playback and the build is running at around twice the frame rate compared to Windows. Basically, I'm using audio input levels to drive the playback rate of video loops and I've had good results using VDMX to achieve this on the my old X99 board using the Clover boot loader which is why I thought I'd test it out. |
It would be nice to have the ability to adjust the playback float to a value greater than 4.
I can play videos encoded with the HAP codec smoothly at up to 1200% of the original speed on other software on the same computer.
Thanks for making a plugin that works so well at 400% anyway!
The text was updated successfully, but these errors were encountered: